Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > (HD) DVD, Blu-ray & (S)VCD > (HD) DVD & Blu-ray authoring

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th September 2008, 15:59   #1  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Multiple AVC-videos+DTS/subs/multiaudio on one DVD(DL) or FAT32: AVCHD menu-generator

Okay, so I made it (and I'm quite proud! ;-): I've hacked my own menu driven AVCHD-DVD with several completely different H.264-tracks that plays beautifully on my PS3.
You get the full (PS3)AVCHD-featureset with all its pros and cons (as compared to playing H.264 in .mp4, .m2ts or .vob from the PS3 XMB):

Pros: Supports multiple audiotracks, DTS, AC3 (no AC3 in MP4, yes in m2ts/vob), subtitles and chaptermarkers

Cons: Video needs to be exactly 1280x720 or 1920x1080 and a certain framerate. I've verified 720p in 23,9 and 59,9fps, though 24, 50 and 60fps should also be possible according to the spec. I also verified 1080p to work with 24 and 23,9 fps, no go on 25fps in either 720p or 1080p! I could not find any material in 1080i that would work, though theoretically it should (in 60/50fps).. I have a creeping suspicion that tsMuxer's BD muxer is broken for 1080i, since I tried 3 different 1080is (25p/50fps, which is in the spec!) and all of them resulted in a black screen (PS3 needs to be reset)...
Update: I have seen 25fps AVCHDs play fine on PS3s connected via component (720p) and on composite on a normal TV. So the black screen seems to be a HDMI/HDCP issue, I'll try on other HDMI-monitors/TVs, maybe it's just mine! How is 25fps working out for you guys? Still no beef on 1080i AVCHDs, anyone ever got that to work with TsMuxer (or TsRemux)?

Of course the video itself must be playable on the PS3 (Levelflag set to 4.1 max, not too many reference frames), but the totally awesome tsMuxer does a fantastic job in making everything but a few idiotic encodes (15 ref-frames for 1080p - right!) playable..

The Problem

Since H.264/AVC is pretty damn efficient, you can fit a lot of HD-content even on a good old DVD (even more so with DVD-DL). It's so efficient, that sometimes you would like to put multiple tracks onto one DVD because one does not fill it up (e.g. several documentaries or several episodes of a TV series).

Unfortunately tsMuxer's "BD mux" feature leaves a lot to be desired (especially in the Linux-version, where it simply does not seem to work!), since you cannot put multiple tracks onto one AVCHD. You can append tracks, but then they would have to have the same resolution and you'd need to set the chapter markers exactly right, it's not very pretty..

With my solution you can integrate several tracks with 1080p, 720p, AC3 and DTS to nicely fill up that DVD, DVD-DL or FAT32 volume to your heart's content - as long as the material is AVCHD-ready in general! You can now also use it to overcome the limitations of the XMB (no DTS/subtitles/multiple audiotracks) by using it as an intermediate to integrate your videos on a FAT32 volume! Split streams (see tsmuxers "split" tab) are now supported, so tracks over 4GB on FAT32 volumes are working..

Hacking your own menu driven AVCHD

I knew you guys would want to do the same thing, so I spent the last 2 days compiling a nice little package for you! ;-) It contains empty menu structures for AVCHDs with 2 to 6 tracks and a shellscript that chooses the right menu, creates the AVCHD-structure and does the integration of the single-track AVCHD/BD-structures that tsMuxer generated. Unfortunately very little is known about crafting your own AVCHD menues, so I don't know how to generate individual labels for buttons, title etc. So, for now, it's a generic menu (Track 1, Track 2 etc), but I spent some time to make it look nice. It's just a single static screen with overlays, but hey, it's in HD and has fancy shmancy alphablended overlays! ;-) Just write on the DVD itself which track is what...

The shellscript should be pretty foolproof and I went to great lengths to include many checks, good documentation and I extensively commented it. It runs under MacOS X, but Linux should be no problem (may need some minor tweaks)... Basically what it does is choosing the right menu for you and copying the .mpls/.clpi/.m2ts files where they belong (and naming them correctly). The .mpls files need a little binary tweaking to change the video they point to, hence perl is required (couldn't get sed to NOT add that stupid $0a linebreak at the end, sorry!)

Here's what you do: download the zip and extract it. Do NOT extract the menu tarballs (tgz), the script will do that for you when you need them!
Put the script and tarballs wherever you want to (preferrably somewhere within your $PATH), if the script does not find the tarballs it will ask where they are.

Start the script from a folder that contains one directory for each track you want to include. Make sure the total of all your videos fits onto one DVD/DVD-DL (or your FAT32 volume), and remember that muxing anything into .m2ts adds some extra padding! Right now anything from 2 to 6 tracks is supported, which should cover most needs.
Each directory should contain an AVCHD ready track (such as tsMuxer's "BD mux" generates, but stuff from your AVCHD-camera should work nicely, too - as long as it's numbered sequentially!), more specifically: The script is only looking for sequentially named .mpls, .clpi and .m2ts files within each track directory, and it does not matter where exactly they are and what they're called (well, as long as they still have the correct file extension and no spaces or other weird characters in the filename!)

After the script has done its job, either burn the contents of the generated avchd-Xitems folder onto DVD/DVD-DL with the burning program of your choice that supports UDF 2.5. Make sure the BDMV and CERTIFICATE folders are on the root level, otherwise it will not work. Or, if you chose FAT32, copy the AVCHD folder into the root of your FAT32 volume.

Here's what it looks like:


Enjoy your menu-driven AVCHD on your PS3! ;-) Press Square to switch between menu and video, when a track is finished it will jump back to the menu automatically. So far the PS3 is all I could test on, but it should work on other BD-players, too (especially those from Sony and Panasonic, since they mainly specified the AVCHD format). If you have a regular BD-player, please let me know if it works for you...

Update v0.2: I added support for FAT32 output. Split file support will come soon. Is there any need to accept FAT32 AVC input, too, e.g. from a Flash-based camera? If so, I must know if the .MPL files do reference MTS or M2TS (right now I did not change the M2TS to MTS within the MPL for the output, it works nonetheless! The PS3 seems to have some fault-tolerance built in there! ;-)

Update v0.3: Added split stream support as promised, so the 4GB limit of FAT32 volumes should not be an issue anymore. Up to 16 chunks per track are supported, which covers tracks up to 64GB at 4GB per chunk. Quite often there's a pause and/or the PS3 skips a few seconds when going from one chunk to the next (sometimes over 20 seconds!), but I've verified this to be the exact same behaviour with the original tsMuxer BD-muxed structure, so it's not my fault. But maybe that's just my 1GB FAT16 USB-stick, or I just split my testfiles too small (30MB).. Feel free to try this with larger files and on other media and let me know your findings!

Download AVCHD-menugenerator v0.3 (for anything that can run bash-scripts)

Version History

v0.1 - 16th Sep 2009:
initial release

v0.2 - 19th Sep 2009:
-support for FAT32 AVCHD folders
-minor updates (tarball-dir endslash irrelevant, cannot enter wrong path)

v0.3 - 22nd Sep 2009:
-support for split tracks (up to 16 chunks) to compensate for the 4GB FAT32-limit
-minor improvements

Last edited by kaid; 16th October 2008 at 03:08. Reason: Version update
kaid is offline   Reply With Quote
Old 17th September 2008, 13:05   #2  |  Link
mmace
Registered User
 
Join Date: Mar 2007
Posts: 123
brilliant, thanks for this, will give it a go over the weekend
mmace is offline   Reply With Quote
Old 18th September 2008, 17:38   #3  |  Link
jagaskywalker
Registered User
 
Join Date: Apr 2007
Posts: 49
I think this is very good news !

Thanks for your effort.

I already see a couple of points for improvement:

- could you make it work for FAT32 devices ? The only differences would be in the filenaming (8.3 formatted). Many of us are using FAT32 hard disks to store data and a menu to access it from the PS3 would be great.

- allow for multiple-tracks per "movie". Due to the fact that FAT32 is limited to 4 Gb files we usually split the files in <4Gb chunks (AVCHD cameras also generate a separate file per scene).

Do you think you could manage with this ?

THX
jagaskywalker is offline   Reply With Quote
Old 18th September 2008, 19:23   #4  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Quote:
Originally Posted by jagaskywalker View Post
I think this is very good news !

Thanks for your effort.

I already see a couple of points for improvement:

- could you make it work for FAT32 devices ? The only differences would be in the filenaming (8.3 formatted). Many of us are using FAT32 hard disks to store data and a menu to access it from the PS3 would be great.

- allow for multiple-tracks per "movie". Due to the fact that FAT32 is limited to 4 Gb files we usually split the files in <4Gb chunks (AVCHD cameras also generate a separate file per scene).

Do you think you could manage with this ?

THX
The first should not be fairly easy, since as far as I know a FAT32 AVCHD folder only differs from an UDF AVCHD in the filenames. If that's not the case and the filename is also stored somewhere in the files (i know it is in the .mpls files, but i'm patching that already, so changing M2TS to MTS shan't be a problem!) I'll try to patch it.

The second is a little more tricky, since I need to rework my script to handle multiple m2ts, clpi and mpls files, the copy loop also needs to be rewritten. But it should also be doable....
When I find some time I'll work on it, prolly next week...
kaid is offline   Reply With Quote
Old 18th September 2008, 21:52   #5  |  Link
fffuusky
Registered User
 
Join Date: Sep 2008
Posts: 4
What are men really like

Removed: Spam

Last edited by manono; 19th September 2008 at 00:32.
fffuusky is offline   Reply With Quote
Old 19th September 2008, 02:54   #6  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Jaga, your request just sparked an idea: Theoretically one could use my menu as a dummy to overcome the limitations of the XMB by using a FAT32 formatted external HD with my FAT32-compatible Menu as a frontend and "injecting" whatever you want to watch - with DTS, multiple audiotracks or subtitles...
Basically someone could make a simple drag & drop solution for MKVs that does all the work for you: putting it through tsmuxer, muxing it as BD, splitting it and moving/modifying the files accordingly! ;-)
The problem so far is that if you used an AVCHD folder on a FAT32 volume, it was the only track you could play. Not so anymore with my menu! ;-D

The problem of cropped video not being AVCHD compatible however remains.. Someone knows if uncropping without re-encoding the whole video is possible at all? I mean macroblocks are still macroblocks, right? Adding a few black ones on the top and bottom should theoretically be possible... But then again I have only a vague idea of all the far-out tricks that H.264 uses, so I should not make such assumptions... ;-)
kaid is offline   Reply With Quote
Old 19th September 2008, 08:41   #7  |  Link
jagaskywalker
Registered User
 
Join Date: Apr 2007
Posts: 49
Quote:
Originally Posted by kaid View Post
The first should not be fairly easy, since as far as I know a FAT32 AVCHD folder only differs from an UDF AVCHD in the filenames....
As far as I know the only difference is in the filenames, and there is no change within them.... (although my experience is only for AVCHD disks without menu...)

Thank you for taking on board the recommendations. Actually what I would like to see is what you describe in your last post... a way to select among different AVCHD encoded files from within the XMB in the PS3...
jagaskywalker is offline   Reply With Quote
Old 19th September 2008, 16:23   #8  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Version update. Added FAT32 support, minor improvements. Split file support coming soon!...
kaid is offline   Reply With Quote
Old 19th September 2008, 20:09   #9  |  Link
frank
Banned
 
Join Date: Oct 2001
Location: https://t.me/pump_upp
Posts: 811
Quote:
It runs under MacOS X, but Linux should be no problem
Should be written in the title!!!

What can xp users do??

Last edited by frank; 19th September 2008 at 20:15.
frank is offline   Reply With Quote
Old 19th September 2008, 21:56   #10  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Quote:
Originally Posted by frank View Post
Should be written in the title!!!
Okay, I'll do that the minute Windows-users do the same thing to all their threads! ;-)

Quote:
What can xp users do??
Install Linux or MacOS X! ;-D Or install Cygwin. It's just a script, should work right out of the box! ;-)
kaid is offline   Reply With Quote
Old 21st September 2008, 22:17   #11  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,885
Quote:
Install Linux or MacOS X!
most people use windows if you didn't know. BTW Good idea but we need win version...
Atak_Snajpera is offline   Reply With Quote
Old 21st September 2008, 22:26   #12  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Quote:
Originally Posted by Atak_Snajpera View Post
most people use windows if you didn't know.
No, I did not know! ;-)

Quote:
BTW Good idea but we need win version...
Yeah, just like we need Linux/MacOS versions of avisynth, besweet, megui, tsmuxer, tsremux, mkv2vob, godsent etc/pp!... ;-)

Last edited by kaid; 22nd September 2008 at 15:21.
kaid is offline   Reply With Quote
Old 22nd September 2008, 14:46   #13  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Version update. Split streams are now supported...
kaid is offline   Reply With Quote
Old 15th October 2008, 02:33   #14  |  Link
cantonesejim
Registered User
 
Join Date: Jan 2007
Posts: 13
any news on a version with more menu items?
cantonesejim is offline   Reply With Quote
Old 16th October 2008, 03:01   #15  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Quote:
Originally Posted by cantonesejim View Post
any news on a version with more menu items?
Well technically I could *maybe* support one more with a bit of hacking in the .mpls, maybe two, but I'd have to investigate first. But I think you want way more? ;-)

So is anyone actually using this? I haven't heard from anyone... Please do report on how it works for you!
kaid is offline   Reply With Quote
Old 15th October 2008, 08:50   #16  |  Link
Krawhitham
Registered User
 
Join Date: Dec 2002
Location: Ohio, USA
Posts: 58
Is it possible to add a "Play All" option to the next version?
Krawhitham is offline   Reply With Quote
Old 16th October 2008, 03:05   #17  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
Quote:
Originally Posted by Krawhitham View Post
Is it possible to add a "Play All" option to the next version?
*Maybe*, but I don't want to get your hopes too high! ;-) It may be possible to hack a special .mpls that plays all the files sequentially and link that to an extra menu item.. I have the tsremux source now which has BD/AVCHD generation in it, i expect to learn quite a bit about the structure from that...

But I won't have time to work on it within the next few weeks though...
kaid is offline   Reply With Quote
Old 27th October 2008, 05:58   #18  |  Link
cantonesejim
Registered User
 
Join Date: Jan 2007
Posts: 13
well i was thinking of maybe a max of 20 selections, i have a bunch of 2-4minute clips in 720p that i want to keep separate and distribute to friends and family on DVD5s
cantonesejim is offline   Reply With Quote
Old 6th November 2008, 01:37   #19  |  Link
Krawhitham
Registered User
 
Join Date: Dec 2002
Location: Ohio, USA
Posts: 58
Quote:
Originally Posted by kaid View Post
*Maybe*, but I don't want to get your hopes too high! ;-) It may be possible to hack a special .mpls that plays all the files sequentially and link that to an extra menu item.. I have the tsremux source now which has BD/AVCHD generation in it, i expect to learn quite a bit about the structure from that...

But I won't have time to work on it within the next few weeks though...
any news?
Krawhitham is offline   Reply With Quote
Old 21st December 2008, 12:24   #20  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
Windows solution

I'm working on something and will post the results later.

Windows executable (gui) that will let you:

* fix wrong clpi info generated by tsmuxer
* convert to 8.3 filenames
* generate avchd folder, containing multiple tracks (as kaid script does)

Dean
deank is offline   Reply With Quote
Reply

Tags
avchd, menu, mkv, ps3, tsmuxer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.