eac3to & tsMuxeR Sample BAT & META files.

Discussion in 'High Definition Software' started by mike_r, Dec 24, 2008.

  1. mike_r

    mike_r Moderator (de)

    {EDIT}Please see this forum

    eac3to, tsMuxer & ImgBurn Made Easy

    I can't wait for CloneBD, and I'm too lazy to mess around with command line programs. My needs are simple, I want 1 .m2ts file with:

    . Main Movie
    . English audio (in AC3 format)
    . German audio (in AC3 format)

    the new version of eac3to (V2.84) seems to have got 2 pass processing (incase of seamless branching gaps) running smoothe.

    This is what I do (one time only):

    Create a file called 'Demux Entire Movie.BAT' (you should change the path names to whatever you use)
    @echo off
    set pathToEac=E:\TVIX\eac3to\
    set pathToTSM=E:\TVIX\tsMuxeR\tsMuxeR_1.8.4(b)\
    set pathToMovie=Q:\
    "%pathToEac%eac3to.exe" "%pathToMovie%"
    SET /P Playlist="Type Playlist (eg 1) And Press Enter "
    If not "%Playlist%"=="" Set Playlist=%Playlist:~0,1%
    echo Entered %Playlist%)
    "%pathToEac%eac3to.exe" "%pathToMovie%" %Playlist%)
    SET /P Movie="Type Main Movie (eg 2) And Press Enter "
    If not "%Movie%"=="" Set Movie=%Movie:~0,1%
    echo Entered %Movie%:
    SET /P MType="Type Video (eg h264 VC1 MPEG2) And Press Enter "
    If not "%MType%"=="" Set MType=%MType:~0,5%
    echo Entered %MType%:
    SET /P English="Type English Audio (eg 3) And Press Enter "
    If not "%English%"=="" Set English=%English:~0,1%
    echo Entered %English%:
    SET /P German="Type German Audio (eg 4) And Press Enter "
    If not "%German%"=="" Set German=%German:~0,1%
    echo Entered %German%:
    "%pathToEac%eac3to.exe" "%pathToMovie%" %Playlist%) %Movie%: Movie.%MType% %English%: English.ac3 %German%: German.ac3
    "%pathToTSM%tsMuxeR.exe" %MType%.meta Movie.m2ts
    Create 3 META files:

    MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr  --vbv-len=500
    V_MPEG-2, "Movie.MPEG2"
    A_AC3, "English.ac3", lang=eng
    A_AC3, "German.ac3", lang=ger
    MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr  --vbv-len=500
    V_MS/VFW/WVC1, "Movie.vc1"
    A_AC3, "English.ac3", lang=eng
    A_AC3, "German.ac3", lang=ger
    MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr  --vbv-len=500
    V_MPEG4/ISO/AVC, "Movie.h264", insertSEI, contSPS
    A_AC3, "English.ac3", lang=eng
    A_AC3, "German.ac3", lang=ger
    Save these files in directory 'eac3to_BAT_ENG+GER'. Now make a new directory, let's say 'DEMUX' and a sub directory let's say 'FILM_XYZ'. Copy the 4 files from 'eac3to_BAT_ENG+GER', and double click on 'Demux Entire Movie.BAT'. Follow the simple dialogue, and at the end you should have a .M2TS file at the end.

    Of course, if you want other languages - please change the files in your versions. If you only need English, just remove the German references in all 4 files.

    For ease, I've added a ZIP file with the following:



    Attached Files:

    Last edited: Mar 10, 2009
  2. fast eddie

    fast eddie Well-Known Member


    How do we get the file "demux entire movie.bat"

    changed from/to:


  3. mike_r

    mike_r Moderator (de)

    the 3 lines with the 'SET' command, should be customised to your own installation:

    set pathToEac=[COLOR="Red"]E:\TVIX\eac3to\[/COLOR]
    set pathToTSM=[COLOR="Red"]E:\TVIX\tsMuxeR\tsMuxeR_1.8.4(b)\[/COLOR]
    set pathToMovie=[COLOR="Red"]Q:\[/COLOR]
  4. lwgreen

    lwgreen Well-Known Member

    I've been trying to follow your instructions on this, but it's not working out for me. I downloaded the zip file and used the English only file. After editing the batch file for my locations for eac3to, tsMuxeR and my blu ray drive, I ran the file on Enchanted. This gave me three files: English.ac3, Movie.h264 and Movie-Log.txt instead of the .m2ts file I expected, although I'm not sure I would know how to get this file into a blu ray structure anyway.
    You also say, "Now make a new directory, let's say 'DEMUX' and a sub directory let's say 'FILM_XYZ'. Copy the 4 files from 'eac3to_BAT_ENG+GER', and double click on 'Demux Entire Movie.BAT'." I assume you mean to copy the four files to "DEMUX," but I'm not sure what "FILM_XYZ" is for. Should this subdirectory's name be included somewhere in the batch file as the output folder? Thanks for any help.
  5. mike_r

    mike_r Moderator (de)

    it's a new sub directory in your 'DEMUX' folder, it can be anything you want, leave it as 'New Folder' or call it Enchanted_Rip in you case.

    all 4 files from eac3to_BAT_ENG should be copied to Enchanted_Rip. You are staying in this new folder now, and then double click on 'Demux Entire Movie.BAT'


    now in your case, you obviously didn't have h264.meta in Enchanted_Rip. you can either restart from scratch, or simply open tsmuxer and drag'n'drop English.ac3 + Movie.h264 into the gui, select destination and 'start muxing'
  6. lwgreen

    lwgreen Well-Known Member

    I did have h264.meta in the folder. Why would I leave one file out? I did it twice with the same results. Obviously I'm doing something else wrong. To try to finish this, I put the two files that were created by the .bat file into tsMuxer, chose "Create Blu-ray disk" and started muxing. When it finished, it did create the blu ray structure. I burned it to a 25 GB disc. It worked, except the sound was out of sync. In fact, the sound wasn't even in the same scene with the movie. I don't know how that could happen, but it did. Anyway, thanks for your help with this.
  7. mike_r

    mike_r Moderator (de)

    what version of eac3to ?

    perhaps post Movie-Log.txt + your version of the BAT file (with your file locations)
    Last edited: Jan 13, 2009
  8. lwgreen

    lwgreen Well-Known Member

    I'm using version 2.87. I ran the .bat file (with the four meta files) in a folder I created called AA-Demux. I also created a sub folder called movie, but it was not used. The three files created stayed in the AA-Demux folder with all the other files. I moved them to the Movie folder manually. I'm attaching the log file. I remember the last line on the screen (but not in the log file) when it finished was something to the effect that it couldn't find a path. This is why I thought it might be trying to find the sub folder I created but was not listed in the .bat file.

    Attached Files:

  9. lwgreen

    lwgreen Well-Known Member

    Forgot to post the .bat file.

    edit: Well, that didn't work. Are we not allowed to post .bat files? If not, I can zip it.
    Last edited: Jan 13, 2009
  10. lwgreen

    lwgreen Well-Known Member

    Here's the .bat file zipped.

    Attached Files:

  11. mike_r

    mike_r Moderator (de)

    i guess you type in h264/ --- there is no validation. garbage in garbage out

    eac3to v2.87
    command line: "C:\AA-eac3to\eac3to.exe"  "F:\" 1) 2: Movie.h264[COLOR="Red"]/[/COLOR] 3: English.ac3
    when asked the video format type

    this would have meant your tsMuxer command line would have been looking for a file called h264/.meta that didn't exist.

    why the audio is out of sync, I can't say - other than please try again with v3.01 or latest if it's now updated
    Last edited: Jan 13, 2009
  12. lwgreen

    lwgreen Well-Known Member

    Ahh, I see what I did. I tried to type in what it showed, which was h264/AVC, and I guess it only took the first five characters. I will download the latest version of eac3to and try again. Thanks for your help.
  13. lwgreen

    lwgreen Well-Known Member

    Same results as before, three files including the log file. This also ended with a path it couldn't find. Here is the log file.

    Attached Files:

  14. mike_r

    mike_r Moderator (de)

    go into DOS mode. Make sure you're in the directory where Movie.h264, English.ac3 & h264.meta are located.


    "C:\AA-tsMuxer\tsMuxeR_1.8.4(b)\tsMuxeR.exe" h264.meta Movie.m2ts
    what happens ? file not found or something like that ?

    that's basically what the last line in the BAT does, your path to tsMuxeR.exe is wrong in

    set pathToTSM=C:\AA-tsMuxer\tsMuxeR_1.8.4(b)\
  15. lwgreen

    lwgreen Well-Known Member

    Hot damn! It finally worked.:) I left in the "tsMuxeR_1.8.4(b)" part of your path because I thought for some reason it needed to know the version of tsMuxeR. Instead, it was just another one of your sub folders. When I took that out of the path, it worked just fine. It created the same three files as before, but also a "Movie.m2ts" file. Now I need to know how you get these files into a blu ray structure suitable for burning to disc. Thanks for your help on this.
  16. mike_r

    mike_r Moderator (de)

    you'll have to use the tsmuxer GUI to do that. simply drag'n'drop and select the correct option and start muxing.
  17. mike_r

    mike_r Moderator (de)

    As I've recently been bombarded with questions, I decided to change the BAT to a GUI.

    It's still in development, and I need to run more tests (VC1 & MPEG2 video), but here of some screen shots to show you how it's been working on H264. It works on XP and Vista x64:

    Set up your defaults (same as the SET= command in the BAT, but with validation):

    Call eac3to & show the playlists:

    Call eac3to & show the streams:

    Call eac3to & demux what you selected (downconverting audio to AC3)

    Call tsMuxer based on the dynamically created meta file:

    MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr  --vbv-len=500
    V_MPEG4/ISO/AVC, "C:\Documents and Settings\I9U985\My Documents\AHK 20090115a\AHK\Video_2_1080p24 /1.001 (16:9).h264", insertSEI, contSPS
    A_AC3, "C:\Documents and Settings\I9U985\My Documents\AHK 20090115a\AHK\Audio_3_English.AC3", lang=Eng
    A_AC3, "C:\Documents and Settings\I9U985\My Documents\AHK 20090115a\AHK\Audio_4_German.AC3", lang=Ger
    The default settings are held in an INI file & the screen text is held in a language file (both are created on 1st run).

    Anyone who wants to translate the language file to their preferred language can do so:

    EAC3TO_LOC="eac3to Location"
    TSMUXER_LOC="tsMuxeR Location"
    MOVIE_LOC="Movie Location"
    DEMUX_LOC="Demux Location"
    DoesNotExist_ERR="Does Not Exist"
    IsNotEmpty_ERR="Is Not Empty"
    MPLSNotSel_ERR="Playlist Not Selected"
    NoStreamSelected_ERR="No Streams Selected"
    EAC3TOPASS1_CONST="eac3to 1st Pass"
    EAC3TOPASS2_CONST="eac3to 2nd Pass"
    Any questions, comments or suggestions ?

    I'm thinking about adding:

    Converting audio to DTS (done)
    Blu-Ray structure + chapters
    Correct BD structure
    Call to imgburn to create ISO
    Play a sound at the end
    Power Down the PC at the end

    but as I don't need all of them, they're not so urgent for me.

    It is relatively fool-proof, but the validation (especially on failure of external modules) is limited. I'm sure someone can probably break it though.
    Last edited: May 20, 2009
  18. Biffa001

    Biffa001 Member

    can I put a request in for :

    Converting audio to DTS

    As I am backing up my BRD's to save space, having the sound converted will save more space and be very helpful.

    Looks like a good program. I will certainly try this out on a couple of mt BRD's later 8)
  19. mike_r

    mike_r Moderator (de)

    I've added that... (see new screenshot)
  20. lwgreen

    lwgreen Well-Known Member

    mrr19121970, thanks again for your help with my stumbling with your .bat file.

    I would like to have the option for including subtitles. This is necessary for movies like Apocalypto, which I recently backed up, but also nice for some movies that only have a scene or two with a foreign speaking character that uses subtitles. Patton has many scenes with subtitles. I see that you do have subtitles shown (unexpanded) in the "call eac3to & show the streams" example. I assume (hope) we would have that option in your finished product.

    This looks great. I'll certainly give it a try when it's complete.:)