SoniG
15th May 2010, 01:28
OK so this thread has been created to discuss about Multi-m2ts movies process and playback issues we could encounter after a rebuilding/remux/reencode or whatever.
I will talk about my own experience, issue I encounter, followed by some other users. I call of what these kind of BD are : Multi Versions main movie BD, Series BD or whatever. They are in fact structured with multiple m2ts part recognized and played thanks to real and virtual mpls playlists that indicate the player the good m2ts sequence of the right movie version that's supposed to be played seamlessly. Originals seems to play pretty well, unfortunately, reencoded/rebuilded BD don't. We mostly encounter slight frames freeze at the end of each m2ts before junctions, and/or image jumps of few frames in the begining of each m2ts junction. I first thanks again jdobbs for his BDRebuilder development, that is just irreplaceable, and that's why I would like to find a fix for it. I thank also Pelican9 for his very useful tool that allowed me to edit some clpi things to see if it could fix something, you will see the result right after. So I will try to be the fastest and the most succinct possible about what I discovered and what I'm doing to attempt to get better results with these BD. So nothing is better to give a concret exemple and work with it :
Process softwares used :
jdobbs's BD Rebuilder beta 0.33.0.6 : http://forum.doom9.org/showthread.php?t=143716
Pelican9's BDedit beta 0.34b : http://forum.doom9.org/showthread.php?t=125903
Smlabs's TSMuxer 1.10.6 : http://www.smlabs.net
Clown BD 0.76 + eac3to v3.18 : http://www.clownbd.com
x264 : 0.94.1563 fbcc1ec : http://x264.nl
Haali Media Splitter 1.9.42.1 : http://haali.su/mkv
ffdshow tryouts revision 3326 : http://sourceforge.net/projects/ffdshow-tryout
Adobe After Effects CS4 : http://www.adobe.com/products/aftereffects
Playback softwares used :
Cyberlink PowerDVD Pro 10 : http://www.cyberlink.com/products/powerdvd/overview_en_US.html
Corel WinDVD Pro 2010 : http://www.corel.com
Arcsoft TotalMedia Theatre 3 Platinum : http://www.arcsoft.com/en-us/software_title.asp?ProductCode=TMT3P
BD TESTED AND PROCESSED : LEON, THE PROFESSIONAL : 2 main movie versions (theatrical & extended), 2 main virtual mpls playlists for each version, 16 real mpls playlists linking the 16 m2ts movies parts. We will work with the theatrical version : 00001.mpls that is structured like this :
THEATRICAL MOVIE VERSION BD STRUCTURE :
http://lab.indof.com/tests/multim2tsbdr/LeonMpls01_Diagram.jpg
As we know we have an issue on process, I will begin to make some tests in touching the Delta values you can find on the clpi files, that contains following parts and seamless/following playback informations that should be used by BD Players with this kind of playlist.
ORIGINAL BD PLAYBACK, with or without ATC_Delta_entries data
http://lab.indof.com/tests/multim2tsbdr/PlaybackOriginal.jpg
- As we can see Delta datas has no influence on the process and I will stop testing it. I would add that I already tested this a bit with some reencode/re-authoring without it changed anything. However it only concerns software players here, and maybe other players would use these values. These datas has not been developed and integrated in BD structures for nothing, and should be supported by any process/re-authoring softwares to keep the best compliant process possible.
- TMT3 have a global issue with junctions playback. I first thought it was OK, but in fact it is not. I posted the issue on the Arcsoft support forum. TMT3 playback will be removed from the following tests.
Here is now the summarize of the playback tests I did, in changing step by step the process in attempt to have a good result :
PROCESSED BD PLAYBACK
http://lab.indof.com/tests/multim2tsbdr/PlaybackProcessed.jpg
- NO ENCODE : Demuxing with TSMuxer can cause an issue because of his present poor interleaving support, particularly with Video+DTS tracks, it seems some sync corrections are necessary and TSMuxer don't bother them. However, it don't stutter all the time and some BD work well, so it's difficult to have a final advise. According to crl2007 (http://forum.doom9.org/showthread.php?t=150511), this issue do exist and I would today join up with his opinion. However again, as a BDRebuilder user, I'm personally more interested by a ReEncode process, and this one works pretty differently.
- REENCODE : Avisynth or directshow seems to be the cause of the resulting stuttering frames, and we will debug this to determine what it's all about.
VISUAL PROCESS DEBUGING
http://lab.indof.com/tests/multim2tsbdr/VisualDebuging_Icon.gif (http://lab.indof.com/tests/multim2tsbdr/VisualDebuging.gif)
(click to enlarge)
That's an interesting result :
Original = OK : 00:03:02:765 TC length = 4382 frames
BD Rebuilder = M2TS --> AVS (with 'framecount 4382') --> x264 = MISMATCH : 4381 frames (1 frame missing) with 3 last images duplicated
TSMuxer --> .264 --> x264 --> TSMuxer = OK : 4382 frames
And here it seems to be our stutter issue. We had now to try to find from where the bug really comes from :
DIG OUT THE BUG
http://lab.indof.com/tests/multim2tsbdr/x264_Encode.gif
OK so I think the result speaks for itself. To resume, when playing the M2TS with Haali+ffdshow it misses about 2 or 3 images at the end. So while x264 is encoding with a specific number of frames to accomplish, like here : 4382, it encodes the frames ffdshow feed him until 4379 and duplicate this last frame twice or 3 times to match his frame number target. That's what generates the end stutter that in fact is not a stutter playback behavior but well real images that are duplicated at the end of each reencoded parts. And in fact it comes from Haali, but sshhht... It's a secret!
TEMPORARY ISSUE WORKAROUND
So here is the solution I'm applying to make work these BD :
- Rebuild all the BD with BD Rebuilder with tracks, reencode, final size needed to 'BDMini' folder (or whatever name you want)
- Rebuild the same project but with 'FORCE_NOENCODE=1' on the settings to 'BD-' folder (or whatever name you want too)
- Create a big .cmd* file with all the necessary demuxed.264 reencode commands from the BD- WORKFILES folder (so in bypassing Avisynth+Haali+ffdshow) to already reencoded.264 files of the BDMini folder (so in fact it reencodes and replaces them automatically)
- Just click the Rebuild button again from the first project, BD Rebuilder will remux and recreate the BD structure with all the new fixed/reencoded files.
*You need to specify the fps and the good bitrate. fps would normally be --fps 24000/1001. The good bitrate is the one that BD Rebuilder had already calculated, and can be found on the .INF file of the BDMini folder (RATE=xxx). We could add --frames 'FramesNumbers' too if needed.
Of course, this is not the solution. It's just here to explain what I do and to begin to think about an official and compliant process. And we would maybe first discuss about this strange haali/ffdshow behavior, to know if it's really a bug or another indirectly bad behavior or anything else?
In any case, I hope you found this interesting, apologize me for my risky English sometimes and I thank you to have read this until the end.
UPDATE : Issue fixed by jdobbs on BD Rebuilder since the 0.34.0.1 version.
I will talk about my own experience, issue I encounter, followed by some other users. I call of what these kind of BD are : Multi Versions main movie BD, Series BD or whatever. They are in fact structured with multiple m2ts part recognized and played thanks to real and virtual mpls playlists that indicate the player the good m2ts sequence of the right movie version that's supposed to be played seamlessly. Originals seems to play pretty well, unfortunately, reencoded/rebuilded BD don't. We mostly encounter slight frames freeze at the end of each m2ts before junctions, and/or image jumps of few frames in the begining of each m2ts junction. I first thanks again jdobbs for his BDRebuilder development, that is just irreplaceable, and that's why I would like to find a fix for it. I thank also Pelican9 for his very useful tool that allowed me to edit some clpi things to see if it could fix something, you will see the result right after. So I will try to be the fastest and the most succinct possible about what I discovered and what I'm doing to attempt to get better results with these BD. So nothing is better to give a concret exemple and work with it :
Process softwares used :
jdobbs's BD Rebuilder beta 0.33.0.6 : http://forum.doom9.org/showthread.php?t=143716
Pelican9's BDedit beta 0.34b : http://forum.doom9.org/showthread.php?t=125903
Smlabs's TSMuxer 1.10.6 : http://www.smlabs.net
Clown BD 0.76 + eac3to v3.18 : http://www.clownbd.com
x264 : 0.94.1563 fbcc1ec : http://x264.nl
Haali Media Splitter 1.9.42.1 : http://haali.su/mkv
ffdshow tryouts revision 3326 : http://sourceforge.net/projects/ffdshow-tryout
Adobe After Effects CS4 : http://www.adobe.com/products/aftereffects
Playback softwares used :
Cyberlink PowerDVD Pro 10 : http://www.cyberlink.com/products/powerdvd/overview_en_US.html
Corel WinDVD Pro 2010 : http://www.corel.com
Arcsoft TotalMedia Theatre 3 Platinum : http://www.arcsoft.com/en-us/software_title.asp?ProductCode=TMT3P
BD TESTED AND PROCESSED : LEON, THE PROFESSIONAL : 2 main movie versions (theatrical & extended), 2 main virtual mpls playlists for each version, 16 real mpls playlists linking the 16 m2ts movies parts. We will work with the theatrical version : 00001.mpls that is structured like this :
THEATRICAL MOVIE VERSION BD STRUCTURE :
http://lab.indof.com/tests/multim2tsbdr/LeonMpls01_Diagram.jpg
As we know we have an issue on process, I will begin to make some tests in touching the Delta values you can find on the clpi files, that contains following parts and seamless/following playback informations that should be used by BD Players with this kind of playlist.
ORIGINAL BD PLAYBACK, with or without ATC_Delta_entries data
http://lab.indof.com/tests/multim2tsbdr/PlaybackOriginal.jpg
- As we can see Delta datas has no influence on the process and I will stop testing it. I would add that I already tested this a bit with some reencode/re-authoring without it changed anything. However it only concerns software players here, and maybe other players would use these values. These datas has not been developed and integrated in BD structures for nothing, and should be supported by any process/re-authoring softwares to keep the best compliant process possible.
- TMT3 have a global issue with junctions playback. I first thought it was OK, but in fact it is not. I posted the issue on the Arcsoft support forum. TMT3 playback will be removed from the following tests.
Here is now the summarize of the playback tests I did, in changing step by step the process in attempt to have a good result :
PROCESSED BD PLAYBACK
http://lab.indof.com/tests/multim2tsbdr/PlaybackProcessed.jpg
- NO ENCODE : Demuxing with TSMuxer can cause an issue because of his present poor interleaving support, particularly with Video+DTS tracks, it seems some sync corrections are necessary and TSMuxer don't bother them. However, it don't stutter all the time and some BD work well, so it's difficult to have a final advise. According to crl2007 (http://forum.doom9.org/showthread.php?t=150511), this issue do exist and I would today join up with his opinion. However again, as a BDRebuilder user, I'm personally more interested by a ReEncode process, and this one works pretty differently.
- REENCODE : Avisynth or directshow seems to be the cause of the resulting stuttering frames, and we will debug this to determine what it's all about.
VISUAL PROCESS DEBUGING
http://lab.indof.com/tests/multim2tsbdr/VisualDebuging_Icon.gif (http://lab.indof.com/tests/multim2tsbdr/VisualDebuging.gif)
(click to enlarge)
That's an interesting result :
Original = OK : 00:03:02:765 TC length = 4382 frames
BD Rebuilder = M2TS --> AVS (with 'framecount 4382') --> x264 = MISMATCH : 4381 frames (1 frame missing) with 3 last images duplicated
TSMuxer --> .264 --> x264 --> TSMuxer = OK : 4382 frames
And here it seems to be our stutter issue. We had now to try to find from where the bug really comes from :
DIG OUT THE BUG
http://lab.indof.com/tests/multim2tsbdr/x264_Encode.gif
OK so I think the result speaks for itself. To resume, when playing the M2TS with Haali+ffdshow it misses about 2 or 3 images at the end. So while x264 is encoding with a specific number of frames to accomplish, like here : 4382, it encodes the frames ffdshow feed him until 4379 and duplicate this last frame twice or 3 times to match his frame number target. That's what generates the end stutter that in fact is not a stutter playback behavior but well real images that are duplicated at the end of each reencoded parts. And in fact it comes from Haali, but sshhht... It's a secret!
TEMPORARY ISSUE WORKAROUND
So here is the solution I'm applying to make work these BD :
- Rebuild all the BD with BD Rebuilder with tracks, reencode, final size needed to 'BDMini' folder (or whatever name you want)
- Rebuild the same project but with 'FORCE_NOENCODE=1' on the settings to 'BD-' folder (or whatever name you want too)
- Create a big .cmd* file with all the necessary demuxed.264 reencode commands from the BD- WORKFILES folder (so in bypassing Avisynth+Haali+ffdshow) to already reencoded.264 files of the BDMini folder (so in fact it reencodes and replaces them automatically)
- Just click the Rebuild button again from the first project, BD Rebuilder will remux and recreate the BD structure with all the new fixed/reencoded files.
*You need to specify the fps and the good bitrate. fps would normally be --fps 24000/1001. The good bitrate is the one that BD Rebuilder had already calculated, and can be found on the .INF file of the BDMini folder (RATE=xxx). We could add --frames 'FramesNumbers' too if needed.
Of course, this is not the solution. It's just here to explain what I do and to begin to think about an official and compliant process. And we would maybe first discuss about this strange haali/ffdshow behavior, to know if it's really a bug or another indirectly bad behavior or anything else?
In any case, I hope you found this interesting, apologize me for my risky English sometimes and I thank you to have read this until the end.
UPDATE : Issue fixed by jdobbs on BD Rebuilder since the 0.34.0.1 version.