Not detecting no. of channels changing

PoBear

New member
I'm having a problem with the Quickstream fix and H.264 files which have both 2.0 and 5.1 included.

VR appears to detect a change from 5.1 to 2.0 but is not detecting a switch from 2.0 to 5.1 and encodes the rest of the video as 2.0

So as a simple example; I have recorded a TV programme which has the audio as 2.0 -> 5.1 -. 2.0. I can't cut out the 2.0 segments as there is an error in the video so I need to do a Quickstream fix I do this using the supplied H.264 MP4 profile, the fix works but the whole file is now 2.0.

Any ideas

Thanks
 

jmc

Active member
I'm having a problem with the Quickstream fix and H.264 files which have both 2.0 and 5.1 included.

VR appears to detect a change from 5.1 to 2.0 but is not detecting a switch from 2.0 to 5.1 and encodes the rest of the video as 2.0

So as a simple example; I have recorded a TV programme which has the audio as 2.0 -> 5.1 -. 2.0. I can't cut out the 2.0 segments as there is an error in the video so I need to do a Quickstream fix I do this using the supplied H.264 MP4 profile, the fix works but the whole file is now 2.0.

Any ideas

Thanks
Try setting the QSF setting options to 5.1 audio and force the whole thing to be 5.1.
 

PoBear

New member
I've tried setting the channels to 5.1 and for most videos, this works but on some, it corrupts the audio stream and I get stuttering so I was looking for an alternative solution.

I'm using a modified copy of the standard h.264 profile with encoding type set to AAC and channels to 5.1 the profile automatically sets bitrate to 128kps
 

Dan203

Senior Developer
Staff member
If you're QSFing why are you recoding the audio at all? Just leave everything alone and it'll be passes through as-is. If the audio is AAC just make sure to save to the TS format and NOT MP4 or MKV. MP4 and MKV strip the individual audio headers and save a single audio header in the container. So they can not handle a switch back and forth between 2.0 and 5.1. TS can just fine though. Once the file is fixed then you can edit and save to whatever format you want. However if you need MP4 or MKV as the final format you'll need to then force a recode of the audio to 5.1 so that it retains the 5.1 portions.
 

PoBear

New member
But that takes us back to the problem I reported in my first post, the video file starts in 2.0 and then goes to 5.1. VR is not detecting the change so if I just QSF it, the whole audio is turned into 2.0 so I lose the 5.1 from the actual section that I want and whilst I am not 100% certain I think I am also losing some of the audio content as I am not sure that VR is mapping all of the 5.1 channels down on to the 2.0
 

Dan203

Senior Developer
Staff member
Like I said that happens depending on the format you're saving to. If you save to MP4 or MKV then only one format is supported and VideoReDo just uses the first format it finds. So if the first frames are 2.0 the entire output will be 2.0. The only way to fix this would be to QSF to TS instead. Then open the TS and completely remove all 2.0 frames from the start of the file. Save as TS again. Then open that TS and make the rest of your edits and save as MP4 or MKV. That will make it so the first frames in the file are 5.1 and the output will be 5.1.
 

PoBear

New member
Sorry but this doesn't help me.

First, it's detecting 5.1 changing to 2.0 so I still think this is a bug.

Secondly, I can't remove the 2.0 at the start because VR won't process the file, that's why I am doing the QSF if in the first place.
 

Dan203

Senior Developer
Staff member
Let’s break this down into chunks....

First use QSF but save to the H.264 Transport Stream profile. Check the output. Is the audio ok?

Next open the TS file in VideoReDo and find the first frame IDR frame with 5.1 audio. Set the start point. Then go to Tools->Trim and copy and select the "use selection markers" option. Open the output and check that the audio is now detected as 5.1 in VideoReDo.

If the file is detected as 5.1 then you can safely edit and save as MP4 and the output will be 5.1.
 

PoBear

New member
I've tried doing a trim using the selection markers and whether I mark the bit to cut or the bit to keep it only copies the section at the start of the video and not the bit I actually want.
 

Dan203

Senior Developer
Staff member
Selection markers uses the actual start/end points. You can't do cuts. Just set the start marker to just after it changes to 5.1.

Also with TS there is a bit of extra logic to ensure it starts on a I/IDRframe, so you might need to make sure you pick the first I/IDR frame after the transition to 5.1 to ensure it works correctly.
 

PoBear

New member
Forgive me but I think I am missing something with what you are suggesting.

When I run Trim/Copy all that I am ending up with is a new video file with 2.0 content, it doesn't help me get to the 5.1 content
 

Dan203

Senior Developer
Staff member
Trim & copy allows you to remove the head or tail of certain files using standard bit copying. It doesn’t even need to know how to read the file. You don’t even have to open it if you don’t want. You can use MB instead of start marker if you want. Just open the file, seek to where the audio changes and make note of the MB position in the lower right. Then use Trim & copy and set the start MB to that value (round up) and set the MB to output to a huge number so you get the rest of the file. If it misses then jump up in MB until you get to the right spot.
 

PoBear

New member
So just to confirm, using the marker is not going to work as it only allows the trimming the beginning of the file and not the end?

I'll see how close I can get with "start at"
 

Dan203

Senior Developer
Staff member
Using markers should allow you to trim the start and the end, but it sounds like you're having trouble with that so I was offering an alternative. Using markers should only output the portion between the markers, using the same MB value you see in the lower right when you seek around. But for whatever reason that's not working for you, so I was simply pointing out that you can do it manually instead.
 
Top Bottom