View Full Version : 2 pass encoding
Moviewatcher666
28th November 2010, 03:08
Hmmm....not sure why I can't find the answer to my question in the forum. The question is...how do you enable 2 pass encoding in BD-RB? What combination of settings enables the 2 pass encoding?
Just wanted to try 2 pass encoding on Monsters vs Aliens to see if it might fix the PIP Secondary video and audio being out of sync. I still haven't been able to figure a way to fix it. Anybody else have any other settings I could try to fix the out of sync issue?
Thanks!
Moviewatcher666
Ch3vr0n
28th November 2010, 05:08
untick the selection in settings > encoder settings > "automatic quality settings". Then go back to that same option and untick at the bottom where it sais "One Pass (ABR) Encoding". Your movies will now be processed in 2 pass. To speed things up a bit more you can also select mode > "quicker for extra's"
jdobbs
28th November 2010, 14:47
PiP by default always does a single pass at a fixed CRF for the sake of time. So in order to do 2-Pass for PiP, in addition to selecting 2-Pass in the quality setting, you would also have to add this to the INI.
SECONDARY_USE_QUALITY=1
Moviewatcher666
28th November 2010, 15:36
Thanks guys. Will give it a try and see if the PIP works better.
@jdobbs
Just a note on a previous post:
http://forum.doom9.org/showpost.php?p=1442088&postcount=9486
I was able to determine a "workaround" fix. When I deselect "quicker encode for extras", the PIP works again on the standalone player.
Not sure if this issue is consistent on other movies and other players as I only have one Blu-ray player to test on.
Thanks again.
jdobbs
28th November 2010, 16:04
Thanks guys. Will give it a try and see if the PIP works better.
@jdobbs
Just a note on a previous post:
http://forum.doom9.org/showpost.php?p=1442088&postcount=9486
I was able to determine a "workaround" fix. When I deselect "quicker encode for extras", the PIP works again on the standalone player.
Not sure if this issue is consistent on other movies and other players as I only have one Blu-ray player to test on.
Thanks again. I think it was a coincidence. There's really no connection between "quicker encode for extras" and PiP processing. The more likely cause was a crash during encoding of the PiP.
Moviewatcher666
28th November 2010, 18:48
A crash? That's interesting. Wouldn't the program or operating system give some type of error message if that was the case? Or is there no error handling in this case?
jdobbs
29th November 2010, 00:08
A crash? That's interesting. Wouldn't the program or operating system give some type of error message if that was the case? Or is there no error handling in this case? Every once in a blue moon you'll see a crash of some sort while X264 is executing -- and no error is returned to BD-RB. It seems to happen more frequently when there is a non-recommended version of HAALI running. In fact, I had to add a check for a zero-length output file just to catch certain less-than-graceful exits. My guess would be that something happened and X264 exited without an error code -- but a small portion of the file had been written. It's just a wild guess, though.
Moviewatcher666
29th November 2010, 23:09
Well, changing to 2 pass didn't fix the audio/video sync issues with the secondary video. Also changing the hidden option switch SECONDARY_USE_QUALITY=1 didn't help either.
@jdobbs - Have you had a chance to obtain Monsters vs Aliens yet and got a successful encode?
Capsbackup
29th November 2010, 23:25
@Moviewatcher666;
If you were to load the playlist (.mpls) of the associated .m2ts/m2ts's that contains the secondary video into tsMuxer, then highlight the audio file corresponding to the secondary audio, does it say there is an audio delay?
Moviewatcher666
30th November 2010, 01:06
@Moviewatcher666;
If you were to load the playlist (.mpls) of the associated .m2ts/m2ts's that contains the secondary video into tsMuxer, then highlight the audio file corresponding to the secondary audio, does it say there is an audio delay?
Hey Capsbackup,
Thanks for the reply!
Yes....there is a delay showing on the E-AC3 (DD+) track of 2503 ms.
Never used the tsMuxeR Gui before. What does this mean in relation to BD-RB? (I love learning this stuff, man!!)
Capsbackup
30th November 2010, 01:26
Hey Capsbackup,
Thanks for the reply!
Yes....there is a delay showing on the E-AC3 (DD+) track of 2503 ms.
Never used the tsMuxeR Gui before. What does this mean in relation to BD-RB? (I love learning this stuff, man!!)
If you check the mux.meta for this vid_xxx # in the Workfiles folder, see if the delay is there for the given E-AC3 (DD+) track audio.
I'm sure jdobbs will let you know if BD-RB corrects the delay for the secondary audio upon remux.
Moviewatcher666
30th November 2010, 01:38
If you check the mux.meta for this vid_xxx # in the Workfiles folder, see if the delay is there for the given E-AC3 (DD+) track audio.
I'm sure jdobbs will let you know if BD-RB corrects the delay for the secondary audio upon remux.
Sounds good. I am processing the BD again right now. So I will check as soon as it is done and report back.
Thanks for the assist!
Capsbackup
30th November 2010, 01:42
Sounds good. I am processing the BD again right now. So I will check as soon as it is done and report back.
Thanks for the assist!
Don't delete the Workfiles folder upon rebuild/completion!
Just curious, does your audio delay on the completed backup appear to be off by about 2 seconds?
EDIT:
The link to your previous log file shows you have Remove Workfiles folder selected, so you may want to change that in your setup.
When complete, check the mux.meta for VID_00024 to see if the audio delay is listed in the list of files to remux. ( You could post it here.)
You can use the quickest settings for this test to complete.
Moviewatcher666
30th November 2010, 23:04
Don't delete the Workfiles folder upon rebuild/completion!
Just curious, does your audio delay on the completed backup appear to be off by about 2 seconds?
EDIT:
The link to your previous log file shows you have Remove Workfiles folder selected, so you may want to change that in your setup.
When complete, check the mux.meta for VID_00024 to see if the audio delay is listed in the list of files to remux. ( You could post it here.)
You can use the quickest settings for this test to complete.
Hey Capsbackup,
Just got home from work. Had a chance to look at the file you mentioned (I changed my configuration to keep the workfiles...no worries).
Here is what was in the mux_00024.meta file:
MUXOPT --no-pcr-on-video-pid --new-audio-pes --blu-ray --vbr --auto-chapters=5 --vbv-len=500
V_MPEG4/ISO/AVC, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\VID_00024.AVS.264", fps=23.976, insertSEI, contSPS
V_MPEG4/ISO/AVC, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\VID_00024_2.AVS.264", fps=23.976, secondary, insertSEI, contSPS
A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_4352.AC3", lang=eng
A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_4355.AC3", lang=eng
A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_6656.AC3", timeshift=2502ms, lang=eng
S_HDMV/PGS, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_4608.sup", lang=eng
S_HDMV/PGS, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_4609.sup", lang=eng
S_HDMV/PGS, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_4612.sup", lang=eng
S_HDMV/PGS, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_4615.sup", lang=eng
There is definitely a time shift on the 00024.track_6656.AC3 file as shown above which is the audio for the secondary track.
I have about a 2-3 second delay of the audio to the video. Does this give any clues to the problem?
Thanks!
Capsbackup
30th November 2010, 23:15
Well it looks like BD-RB accounts for the delay:
A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_6656.AC3", timeshift=2502ms, lang=eng
Are you playing the backup on a standalone or a PC with software player?
If PC, you should burn to BD-RE and check with a standalone player, there can be a difference.
Moviewatcher666
30th November 2010, 23:46
Well it looks like BD-RB accounts for the delay:
Are you playing the backup on a standalone or a PC with software player?
If PC, you should burn to BD-RE and check with a standalone player, there can be a difference.
I always test on my standalone player, Panasonic DMP-BD35 using a BD rewritable.
Any suggestions?
Capsbackup
1st December 2010, 00:06
If you are into testing.. :) and familiar with command line runs..
Determine which direction the audio delay is off. Make a copy of the mux_00024.meta, place it somewhere different than the original location (in your C:\)
Edit the line where the delay is for your A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_6656.AC3", timeshift=2502ms, lang=eng
If you think the delay is not accurate, try removing 2502ms. It will look like:
A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_6656.AC3", lang=eng
If you think the delay is off by 2 - 3 seconds, you could try:
A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_6656.AC3", timeshift=5004ms, lang=eng
You will have to "choose wisely" :p
Remux this file. Upon its completion, you will need to do a "creative rebuild" back into/with the other files in the Workfiles folder :cool:
Moviewatcher666
1st December 2010, 00:35
If you are into testing.. :) and familiar with command line runs..
Determine which direction the audio delay is off. Make a copy of the mux_00024.meta, place it somewhere different than the original location (in your C:\)
Edit the line where the delay is for your A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_6656.AC3", timeshift=2502ms, lang=eng
If you think the delay is not accurate, try removing 2502ms. It will look like:
A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_6656.AC3", lang=eng
If you think the delay is off by 2 - 3 seconds, you could try:
A_AC3, "E:\MONSTERS_VS_ALIENS TRANSCODED\WORKFILES\00024.track_6656.AC3", timeshift=5004ms, lang=eng
You will have to "choose wisely" :p
Remux this file. Upon its completion, you will need to do a "creative rebuild" back into/with the other files in the Workfiles folder :cool:
Cool...love to try some testing. Such a great way to learn. As a 50 year old user of computers, I have taught myself a lot of stuff in the last 25 years!
So no problem with editing the mux_00024.meta file. The question I have is what do I use to remux the file and how to do a "creative rebuild" into the Workfiles folder? Hope I am not asking too much!
Capsbackup
1st December 2010, 01:07
From a long time ago!
The format for the muxing command line is:
x:\pathtoBD-RB\tools\tsmuxer.exe x:\pathto\MUX_000XX.META x:\TMP
x:\pathto of course changes based upon where you put BD-RB and where you want it to output.
Once you have this complete, it should be( if my memory is still ok :p) 00024.m2ts, or similar. Save this file and it should have the exact same name as the one you are going to replace in the Workfiles folder.
So open BD-RB, make sure you have the exact same settings you ran the original project with. Click Backup. There should be a warning that a previous job has already been started and do you want to continue? Say yes.
From your previous log, there are six files BD-RB reencodes. They are already complete. So BD-RB will begin to re-mux them all again. When the final one is remuxed, VID_00024, BD-RB will start the next phase. Click Abort.
Now substitute the 00024.m2ts that you previously created by the command line procedure with the new remuxed one BD-RB just finished in the Workfiles folder. Remember the name has to be identical!
Once you switched them, start BD-RB again, click Backup, you should see the same message as before, a previous job has already been started and do you want to continue? Say yes.
Let BD-RB rebuild the Blu-ray structure and correct the timings, etc.. and when complete you will now have a new rebuilt Blu-ray that hopefully, if you guessed the audio delay correctly, will be in sync. :p
Capsbackup
1st December 2010, 01:26
Perhaps a potential easier alternative to the above mentioned, you could try the program delaycut 1.3.0.0 on the secondary audio file to correct/test different delay values, and substitute the changed audio file for the original audio file in the Workfiles folder and do another rebuild only. Remember to name exactly as to what you replace, and always keep a copy of the original! :)
Delaycut may or may not work with DD Plus files. ;)
Moviewatcher666
1st December 2010, 02:57
Thanks Capbackup,
I tried the DelayCut but it does not seem to work with DD+ as you suspected.
So I am doing the remuxing now with tsmuxer according to your instructions. I am doing it first by deleting the timeshift completely to see what that does.
If that doesn't work, I am going to have to try to find what the actual timeshift delay is. Not quite sure how to do that yet but I will work on it when I get to that point.
I will keep you posted. Thanks again for the kind helping hand!
Capsbackup
1st December 2010, 03:55
I am not sure about this idea, but you could give it a shot. Using tsMuxeR GUI, try to load just the secondary video .264 BD-RB reencoded and the DD Plus audio file from the Workfiles folder into tsMuxeR and create a new .ts file. Now play that new .ts file with mplayer classic. There is an audio delay feature within mplayerc that should allow you to test different delays to see what the audio delay should be to have sync. This may help with your editing the BD-RB meta file. :)
Good luck, have patience and fun! :p
tapidlittle
1st December 2010, 15:59
Is there any documentation about the 2nd pass option, what it does exactly?
I'm always looking for the highest possible quality on a BD-25.
Is the 2nd pass faster or slower than the first one?
jdobbs
1st December 2010, 16:27
The second pass is always slower -- and two passes always results in the best quality for a given target.
My recommendation is to select "Automatic Quality" and you don't have to worry about it. Two pass will be used when it is needed, and not when it is overkill.
Moviewatcher666
2nd December 2010, 02:12
Well Holy Freakin' Awesome!!!!
I fixed it! PIP audio is in perfect sync with the video on the secondary track! Based on your great advise and suggestions, Capsbackup, I got rid of the time delay and remuxed.
Now it works and it is a perfect copy!
Thanks very much Capsbackup for the experienced suggestions and advice. Now I have a little more knowledge to do more "tweaking".
And of course additional credit to jdobbs. Definitely would not have even got this far without his fabulous knowledge and program!
Until the next problem!?
Capsbackup
2nd December 2010, 04:03
Glad to have helped! :)
These issues are extremely rare, but sometimes a little tweaking can be beneficial. :cool:
tapidlittle
2nd December 2010, 16:30
The second pass is always slower -- and two passes always results in the best quality for a given target.
My recommendation is to select "Automatic Quality" and you don't have to worry about it. Two pass will be used when it is needed, and not when it is overkill.
thanks!
I always set it to automatic quality and BD-25 output, and it always selects fastest speed.
jdobbs
2nd December 2010, 18:06
thanks!
I always set it to automatic quality and BD-25 output, and it always selects fastest speed. That's because at that output size and bitrate it may not need two passes or the bells-and-whistles of higher quality settings. The point is that if using slower settings doesn't change the visible quality, there is really no point in doing so.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.