VideoHelp Forum




+ Reply to Thread
Page 5 of 7
FirstFirst ... 3 4 5 6 7 LastLast
Results 121 to 150 of 199
  1. I understood the instructions, I just didn't know what serial meant. When the script is run nothing happens.
    Quote Quote  
  2. I'm sure it works. I just tested it (again). Make sure you have the paths correct. Make sure the .bat is in the same directory as the folder of mkv's. Note the "%" are double "%%"

    I copied your original test file and renamed it "a.mkv", made a copy of that file : "b.mkv"

    After the batch file, you're left with your orignal files a.mkv, b.mkv ; plus a.aac, a.AC3.mkv, b.aac, b.AC3.mkv


    Unless this is a different batch of h.264/aac/mkv's ? maybe those ones have problems ?
    Quote Quote  
  3. What's the purpose of those percentage signs. Am I supposed to put the directory the files are in? Or do I just put that in ("*.mkv")? Do I leave the asterisk?
    Quote Quote  
  4. Originally Posted by VideoFanatic View Post
    What's the purpose of those percentage signs. Am I supposed to put the directory the files are in? Or do I just put that in ("*.mkv")? Do I leave the asterisk?


    Just copy & paste it.

    The instructions said to place .bat file physically in the directory of the mkv's . The * is just a wildcard, so all mkv's are processed. The double "%%" is for windows batch files processed from a batch file , not directly from command line
    Quote Quote  
  5. OK I ran the exact script you gave me again the same way as before by double-clicking on it when it's in a directory of MKVs. The script fails saying no such file or directory with regards to .m4a I think.
    Quote Quote  
  6. Then set a specific path for your temp files

    Code:
    
    for %%a in ("*.mkv") do (
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i %%a -map 0:0 -map 0:1 -c:v copy -bsf:v h264_mp4toannexb -an "PATH\video.h264" -vn -c:a copy -absf aac_adtstoasc "PATH\gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 "PATH\gain.m4a"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "PATH\gain.m4a" -map 0:0 -vn -c:a copy "%%~da%%~pa%%~na.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "PATH\output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%%~da%%~pa%%~na.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "PATH\video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "PATH\output.ac3" ")" "--track-order" "0:0,1:0"
    
    del "PATH\gain.m4a"
    del "PATH\video.h264"
    del "PATH\output.ac3"
    
    )
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Change all the "PATH" to where you want your temp folder

    You should actually do all that in the beginning of the script (setting all your variables and paths, temp folders), so you only have to do it once. It keeps scripts better organized, important for when you do more complex scripts later



    Or Is this a different set of MKV's ? Maybe they have problems ?
    Quote Quote  
  7. OK tried the script and I added the path but got the same thing as before. The script fails and says no such file or directory:

    Code:
    for %%a in ("*.mkv") do (
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i %%a -map 0:0 -map 0:1 -c:v copy -bsf:v h264_mp4toannexb -an "E:\2 = New\Temp\video.h264" -vn -c:a copy -absf aac_adtstoasc "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain.exe" -r -k -m 0 "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%%~da%%~pa%%~na.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%%~da%%~pa%%~na.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\output.ac3" ")" "--track-order" "0:0,1:0"
    
    del "E:\2 = New\Temp\gain.m4a"
    del "E:\2 = New\Temp\video.h264"
    del "E:\2 = New\Temp\output.ac3"
    
    )
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Quote Quote  
  8. Post the exact error message verbatim

    You shouldn't need to add those paths for the temp files, because the way the script was, it would use the same directory as the video files (everything, temp files included will occur in the mkv folder directory)

    Are you sure the .bat file is in the same directory ?

    I tested on your original sample mkv, are you using different files? - perhaps they have different characteristics?
    Quote Quote  
  9. http://pastebin.com/FuhsciHV

    Tested on two copies of the following MKV with AAC file: https://www.dropbox.com/s/29oab5n5s9b12n0/2%20Test.mkv

    Yes the MKV and batch file are in the same directory. I just double-click on the batch file and it fails giving the above error message. Tried it with temp paths as well and the same thing happened.
    Quote Quote  
  10. Originally Posted by VideoFanatic View Post
    http://pastebin.com/FuhsciHV

    Tested on two copies of the following MKV with AAC file: https://www.dropbox.com/s/29oab5n5s9b12n0/2%20Test.mkv

    Yes the MKV and batch file are in the same directory. I just double-click on the batch file and it fails giving the above error message. Tried it with temp paths as well and the same thing happened.


    Notice your input has "-i %a" , not "-i %%a"

    Also, because you have spaces in your filenames it needs quotation marks. So the 1st line should be this


    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "%%a" -map 0:0 -map 0:1 -c:v copy -bsf:v h264_mp4toannexb -an "E:\2 = New\Temp\video.h264" -vn -c:a copy -absf aac_adtstoasc "E:\2 = New\Temp\gain.m4a"
    Like some of your other samples, you get those "invalid, non monotonically increasing dts to muxer" warnings in ffmpeg on this sample. It's probably ok, but you can also use something else to demux, like eac3to or mkvextract
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    ]

    Notice your input has "-i %a" , not "-i %%a"
    Adjusted the 2nd line in my script like this but the script still fails: "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "%%a"

    Here's the CMD output: http://pastebin.com/M4uQNJEn
    Quote Quote  
  12. Either use the 1st version of original script, without the extra paths or add the path that you're missing to the 2nd ffmpeg line . Check the template on post 126 again. You're missing the "PATH" for the input file on the 2nd ffmpeg line



    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a

    Notice "gain.m4a" doesn't have the same path you specified earlier , so ffmpeg can't find it

    -i "E:\2 = New\Temp\gain.m4a"

    You're also missing the path for output.ac3

    If you omit all those inserted "PATH" from the 2nd version in post 126, they will just use the same directory as the temp file
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    Like some of your other samples, you get those "invalid, non monotonically increasing dts to muxer" warnings in ffmpeg on this sample. It's probably ok, but you can also use something else to demux, like eac3to or mkvextract

    Thanks it's working now. Here's the working batch script:

    Code:
    for %%a in ("*.mkv") do (
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "%%a" -map 0:0 -map 0:1 -c:v copy -bsf:v h264_mp4toannexb -an "E:\2 = New\Temp\video.h264" -vn -c:a copy -absf aac_adtstoasc "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain.exe" -r -k -m 0 "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "E:\2 = New\Temp\gain.m4a" -map 0:0 -vn -c:a copy "%%~da%%~pa%%~na.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "E:\2 = New\Temp\output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%%~da%%~pa%%~na.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\output.ac3" ")" "--track-order" "0:0,1:0"
    
    del "E:\2 = New\Temp\gain.m4a"
    del "E:\2 = New\Temp\video.h264"
    del "E:\2 = New\Temp\output.ac3"
    
    )
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Yes the output is fine but like you say those messages concern me, does that slow the muxing down?

    What script should I use for the Batch script above but with MKV Extract?
    Quote Quote  
  14. Not sure, it probably slows it down

    To use mkvextract , you do it the same way, but instead of the 1st ffmpeg line, use mkvextract

    Code:
    "PATH\mkvextract.exe" --ui-language en tracks "%%a" 0:"PATH\video.h264" 1:"PATH\gain.m4a"

    Or you can use eac3to like you did before
    Quote Quote  
  15. Thanks that's working too.

    What about for the script you gave me to right-click a file and select "Sent To" the script?

    Here's the first line at the moment:
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i %1 -map 0:0 -map 0:1 -c:v copy -bsf:v h264_mp4toannexb -an "video.h264" -vn -c:a copy -absf aac_adtstoasc "gain.m4a"

    What would it be instead if I wanted to use mkvextract?
    Quote Quote  
  16. Use the same mvkextract command, but change the %%a to %1

    Code:
    "PATH\mkvextract.exe" --ui-language en tracks %1 0:"PATH\video.h264" 1:"PATH\gain.m4a"
    Quote Quote  
  17. Here's the MKVExtract script that I just run manually one at a time (Not the batch script):
    Code:
    "X:\Portable Installations\MKV Toolnix\mkvextract.exe"  --ui-language en tracks %1 0:"video.h264" 1:"gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del gain.m4a
    del video.h264
    del output.ac3
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Strangely the audio volume isn't changed at all, yet in the FFMPEG version I can hear an increase in volume. Same applies to the Batch script of MKVExtract:
    Code:
    for %%a in ("*.mkv") do (
    
    "X:\Portable Installations\MKV Toolnix\mkvextract.exe" --ui-language en tracks "%%a" 0:"E:\2 = New\Temp\video.h264" 1:"E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain.exe" -r -k -m 0 "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "E:\2 = New\Temp\gain.m4a" -map 0:0 -vn -c:a copy "%%~da%%~pa%%~na.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "E:\2 = New\Temp\output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%%~da%%~pa%%~na.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\output.ac3" ")" "--track-order" "0:0,1:0"
    
    del "E:\2 = New\Temp\gain.m4a"
    del "E:\2 = New\Temp\video.h264"
    del "E:\2 = New\Temp\output.ac3"
    
    )
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Do you know how to fix it please?
    Quote Quote  
  18. You need to fix the header with ffmpeg, -absf aac_adtstoasc similar to the ffmpeg example. Because mkvextract extracts raw AAC with ADTS headers before each packet. AACgain cannot process it like that

    So it's another step, slower. I colored in red what was added/changed

    Code:
    "X:\Portable Installations\MKV Toolnix\mkvextract.exe"  --ui-language en tracks %1 0:"video.h264" 1:"gain0.m4a"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "gain0.m4a" -vn -c:a copy -absf aac_adtstoasc "gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del gain0.m4a
    del gain.m4a
    del video.h264
    del output.ac3
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Quote Quote  
  19. Bonus! The mkvextract method is actually 20 seconds quicker than the FFMPEG method! Just wondering, why are 2 m4a files created in the mkvextract script?

    Should I add the same red text to the batch script version that processes all files in a folder?
    Quote Quote  
  20. Originally Posted by VideoFanatic View Post
    Bonus! The mkvextract method is actually 20 seconds quicker than the FFMPEG method! Just wondering, why are 2 m4a files created in the mkvextract script?
    Maybe it's slower because of those error messages? 2 m4a files are required, because ffmpeg doesn't allow in-place editing of files. (it can't read from a file and write to the same file at the same time).

    Should I add the same red text to the batch script version that processes all files in a folder?
    You should be able to figure this one out. I left it out on purpose - you have to learn what is going on. If you still can't figure it out after some honest attempts then ask again
    Last edited by poisondeathray; 8th Aug 2014 at 15:09.
    Quote Quote  
  21. I added the red text to the batch script and it seems to be working.
    Quote Quote  
  22. Originally Posted by VideoFanatic View Post
    Was I correct?
    If it's working ok you're correct
    Quote Quote  
  23. You gave me a script to mux an MPEG2 with MPA to MPEG2 with AC3 (AC3 is re-encoded) and to demux the MPA source. I'm trying to change it so that it does the same thing but so it works with an AAC source and normalizes it. I tried this script I made but it only gives me an a demuxed AAC and no MPEG2 file. Do you know how to fix it please?
    Code:
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i %1 -map 0:0 -map 0:1 -map 0:1 -c:v copy -an "copy.m2v" -vn -c:a copy -absf aac_adtstoasc "gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "X:\Portable Installations\MJPEG Tools\bin\mplex.exe" -o "%~d1%~p1%~n1.AC3.mpg" "copy.m2v" "128kbps_ac3.ac3" -f 3 
    
    del "copy.m2v"
    del "128kbps_ac3.ac3"
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Quote Quote  
  24. Notice in the 3rd line, it's called "output.ac3" , but in the 4th line it's called "128kbps_ac3.ac3" . The muxer in line 4 is looking for ""128kbps_ac3.ac3" but can't find it. Change them so they are matching . eg.. change "output.ac3" in the 3rd line to "128kbps_ac3.ac3"

    In the 1st line, you only need as many map statements, as you have output audio & video streams. So if you only have 1 video, 1 audio for output, you only need -map 0:0 (for video), and -map 0:1 (for audio)
    Quote Quote  
  25. OK I'm trying this Batch script for Muxing TS to TS but re-encode audio to AC3 and demux AAC source. It's not working. Any idea what I did wrong?

    Code:
    for %%a in ("*.ts") do (
    
    "X:\Portable Installations\eac3to\eac3to.exe" %1 1:"E:\2 = New\Temp\video.h264"
    
    "X:\Portable Installations\FFMPEG\bin\ffmpeg.exe" -i %1 -vn -c:a copy -absf aac_adtstoasc "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain.exe" -r -k -m 0 "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "E:\2 = New\Temp\gain.m4a" -map 0:0 -vn -c:a copy "%%~da%%~pa%%~na.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "E:\2 = New\Temp\output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%%~da%%~pa%%~na.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\output.ac3" ")" "--track-order" "0:0,1:0"
    
    del "E:\2 = New\Temp\gain.m4a"
    del "E:\2 = New\Temp\video.h264"
    del "E:\2 = New\Temp\output.ac3"
    
    )
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Quote Quote  
  26. Use the old template for batch. You've got to change all the inputs which say %1 to something else (hint : "%%a")
    Quote Quote  
  27. I tried that but it didn't work. Here's my MKV Batch script:

    Code:
    for %%a in ("*.mkv") do (
    
    "X:\Portable Installations\MKV Toolnix\mkvextract.exe" --ui-language en tracks "%%a" 0:"E:\2 = New\Temp\video.h264" 1:"E:\2 = New\Temp\gain0.m4a"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "E:\2 = New\Temp\gain0.m4a" -vn -c:a copy -absf aac_adtstoasc "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain.exe" -r -k -m 0 "E:\2 = New\Temp\gain.m4a"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i "E:\2 = New\Temp\gain.m4a" -map 0:0 -vn -c:a copy "%%~da%%~pa%%~na.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "E:\2 = New\Temp\output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%%~da%%~pa%%~na.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "E:\2 = New\Temp\output.ac3" ")" "--track-order" "0:0,1:0"
    
    del "E:\2 = New\Temp\gain0.m4a"
    del "E:\2 = New\Temp\gain.m4a"
    del "E:\2 = New\Temp\video.h264"
    del "E:\2 = New\Temp\output.ac3"
    
    )
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    For the non-batch TS script you used this line for extracting the video:

    "X:\Portable Installations\eac3to\eac3to.exe" %%a 1:"E:\2 = New\Temp\video.h264"

    I tried adding that but it didn't work. Any idea what the batch script should be for TS AAC to MKV but re-encode to AC3 and demux AAC?

    MPEG2 Script

    This script is MPEG2 AAC to MPEG2 AC3 128 + Demux AAC. However I've just realised that VideoRedo doesn't allow converting from AC3/WAV to AAC so I have to manually demux it then convert the file with DBPoweramp to AAC then remux before using below script which is time consuming. What should I add to the script so that before the below script runs the script will first convert AC3/MP2 to AAC?

    Code:
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i %1 -map 0:0 -map 0:1 -c:v copy -an "copy.m2v" -vn -c:a copy -absf aac_adtstoasc "gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "128kbps_ac3.ac3"
    
    "X:\Portable Installations\MJPEG Tools\bin\mplex.exe" -o "%~d1%~p1%~n1.AC3.mpg" "copy.m2v" "128kbps_ac3.ac3" -f 3 
    
    del "copy.m2v"
    del "128kbps_ac3.ac3"
    del "gain.m4a"
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Quote Quote  
  28. 1) If it's failing on the 1st line with mkvextract, use ffmpeg to extract from the TS instead (both audio & video) . Use one of the earlier examples as a template. I'm guessing you'll get those same errors but it will still work fine. Post the log file if you don't know where the problem is. If you can't figure it out after making some honest attempts, ask again

    2)

    What should I add to the script so that before the below script runs the script will first convert AC3/MP2 to AAC?

    I don't understand how videoredo fits , and what you're trying to do ? You have a separate AC3 or MP2 file that you are trying to convert to AC3 before that conversion ?
    Quote Quote  
  29. This works for me. You have to edit the paths. If you're using a different batch of .ts files with different characteristics than your earlier examples, then post a sample

    Code:
    for %%a in ("*.ts") do (
    
    eac3to "%%a" 1:"video.h264"
    
    ffmpeg -i "%%a" -vn -c:a copy -absf aac_adtstoasc "gain.m4a"
    
    aacgain -r -k -m 0 "gain.m4a"
    
    ffmpeg -i "gain.m4a" -map 0:0 -map 0:0 -vn -c:a copy "%%~da%%~pa%%~na.aac" -vn -c:a ac3 -b:a 128k "output.ac3"
    
    mkvmerge -o "%%~da%%~pa%%~na.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del "gain.m4a"
    del "video.h264"
    del "output.ac3"
    
    )
    
    pause
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!