VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Hey all,

    This has been asked multiple times in various ways, but I'm looking for specifics that I can't seem to figure out on my own.

    What I want to do is this:

    - take an existing MKV file with DTS or AAC (5.1 or 7.1 channel) audio, convert/extract AC3 audio from it and then remux the AC3 track into the file as the primary audio without removing anything from the original file. I'd like to do this with a single command, if possible.

    This would allow me to keep the existing DTS/AAC audio for when I get a better home theatre receiver that can decode those audio formats, but will allow my existing hardware to give me 5.1 audio from my files in the meantime.

    I'd love to use a GUI application that could do everything in one go, but I don't expect a single app to do everything I want so am willing to go the FFMPEG.exe route via command line. However, I'm unsure as to what the exact switches to use would be.

    So far, I've got this as a command:

    ffmpeg -i "input.mkv" -map 0 -map 0:a:0 -c copy -c:a:0 ac3 -b:a:0 640k "output.mkv"

    but that actually converts the DTS track and replaces it in the output file instead of leaving it alone and just adding the AC3 audio. It's important the DTS track is kept in the file for future use. I'd also like the new AC3 track to be the first and default track for audio when the file is played.

    I've been able to achieve this using Clever-FFMPEG GUI and MKVToolNix, but that becomes a 2 to 3 step process, with audio sync becoming an issue as well.

    Any help here would be appreciated. I feel I'm close...
    Last edited by kssxs; 14th Apr 2024 at 05:32.
    Quote Quote  
  2. No synch issue with clever Ffmpeg-GUI.
    Quote Quote  
  3. Originally Posted by ProWo View Post
    Can be done with clever Ffmpeg-GUI.
    I appreciate your answer, but naturally need to ask 'how, exactly' can I get what I want without having to jump through multiple hoops? I was able to use it to extract the AC3 file, but couldn't figure out how to both extract the file, and remux it into the original in doing a one-step process.

    Can you elaborate, please?

    Thanks in advance!
    Quote Quote  
  4. Load your movie, click main, click encode audio stream, select your DTS stream, click go to the encoder.
    Set ac3 as codec, set channels and bitrate, click encode.
    if finished, click multiplex, swap the audiostreams so that the new created ac3 stream is the first audiostream, on the left side all streams should be selected and click multiplex.
    Done.
    Quote Quote  
  5. Originally Posted by ProWo View Post
    Load your movie, click main, click encode audio stream, select your DTS stream, click go to the encoder.
    Set ac3 as codec, set channels and bitrate, click encode.
    if finished, click multiplex, swap the audiostreams so that the new created ac3 stream is the first audiostream, on the left side all streams should be selected and click multiplex.
    Done.
    AWESOME! Thank you so much for the complete instructions!

    There still seem to be audio-sync issues, but I guess that's going to be an issue no matter which tool you use as every file is going to be different. I adjusted the 'Delay' for the stream, and it worked fine once I re-multiplexed it. I also realized, after the multiplex was complete, that I had left the 'Default' stream checkmarks for everything (they were all selected when the 'Multiplex' window opened up) and, as a result, the incorrect subtitles were playing when I opened the file in VLC after multiplexing it. I adjusted the checkmarks, re-multiplexed, and it was fine.

    I believe you're the developer, correct? If so, I'd love to see a couple of features added/changed:

    1) An option to output a test file, say 2-10 minutes (user adjustable) in length so that we can check the output to see if things like audio delays and other values need to be adjusted. As it stands, if you hit 'Abort', it deletes the file that is being multiplexed, which means you can't check the output unless the job finishes. This could mean potentially waiting upwards of 10 minutes for large multi-gigabyte files to finish to be able to test it. The workaround I found is that if you DON'T hit 'OK' on the 'Process Aborted' popup window (which tells you 'The created file is deleted.'), the output file is still in the output folder, and you can play it in VLC to test your selections. Once you hit 'OK' on the dialog box, the file is deleted. It would be nice to just have an option to test encode 2-10 minutes of video instead to finalize your settings before encoding the final file.

    2) An option to set the default audio encoding bitrate so that it doesn't need to be changed with every file that we create for a batch job. Most DTS streams are very high bitrate, and being able to set the 'Default Output Bitrate' to maximum (640 Bitrate kb/s for AC3 files) would be great so we don't have to type that in manually for each job before queing. I understand the values in the 'Encoder' files may be FFMPEG defaults, but if possible to set them to values that we want to use in each batch job would be great.

    3) In the 'Multiplex' window, the ability to drag and drop the streams to put them in whichever order we want/need with the moved stream auto-renumbering themselves. Unmovable streams would just be greyed-out. It would make the streams faster to deal with instead of manually re-numbering them and then hitting the 'Swap streams' button.

    4) The ability to see what the actualy FFPMEG command(s) looks like with the selections we make in the utility. If there are multiple command lines, show them all. Just for learning purposes.

    I realize you're building this tool on top of FFMPEG itself, and it's free, so don't know if it's possible to request any of those features.

    The tool is great, regardless, so thank you so much for this and for your help!
    Last edited by kssxs; 14th Apr 2024 at 16:35.
    Quote Quote  
  6. Originally Posted by kssxs View Post
    I believe you're the developer, correct? If so, I'd love to see a couple of features added/changed:

    1) An option to output a test file, say 2-10 minutes (user adjustable) in length so that we can check the output to see if things like audio delays and other values need to be adjusted. As it stands, if you hit 'Abort', it deletes the file that is being multiplexed, which means you can't check the output unless the job finishes. This could mean potentially waiting upwards of 10 minutes for large multi-gigabyte files to finish to be able to test it. The workaround I found is that if you DON'T hit 'OK' on the 'Process Aborted' popup window (which tells you 'The created file is deleted.'), the output file is still in the output folder, and you can play it in VLC to test your selections. Once you hit 'OK' on the dialog box, the file is deleted. It would be nice to just have an option to test encode 2-10 minutes of video instead to finalize your settings before encoding the final file.

    2) An option to set the default audio encoding bitrate so that it doesn't need to be changed with every file that we create for a batch job. Most DTS streams are very high bitrate, and being able to set the 'Default Output Bitrate' to maximum (640 Bitrate kb/s for AC3 files) would be great so we don't have to type that in manually for each job before queing. I understand the values in the 'Encoder' files may be FFMPEG defaults, but if possible to set them to values that we want to use in each batch job would be great.

    3) In the 'Multiplex' window, the ability to drag and drop the streams to put them in whichever order we want/need with the moved stream auto-renumbering themselves. Unmovable streams would just be greyed-out. It would make the streams faster to deal with instead of manually re-numbering them and then hitting the 'Swap streams' button.

    4) The ability to see what the actualy FFPMEG command(s) looks like with the selections we make in the utility. If there are multiple command lines, show them all. Just for learning purposes.

    I realize you're building this tool on top of FFMPEG itself, and it's free, so don't know if it's possible to request any of those features.

    The tool is great, regardless, so thank you so much for this and for your help!
    1) Will be implement it in the next beta.
    2) Already implemented. The last audio encoder settings used (incl. bitrate) are automatcally saved (download the newest beta, v5.2.5.02).
    3) ATM not possible because the type of used datagrid does not allow it.
    4) The command line remains hidden.
    But there is a workaround: If you use the batch mode, close the program after entering all batches without executing them.
    This creates a file (BE_open.txt) in which the command line is visible.
    Quote Quote  
  7. Originally Posted by kssxs View Post
    What I want to do is this:

    - take an existing MKV file with DTS or AAC (5.1 or 7.1 channel) audio, convert/extract AC3 audio from it and then remux the AC3 track into the file as the primary audio without removing anything from the original file. I'd like to do this with a single command, if possible.
    There can be some audio channel layout problem (5.1: FL+FR+FC+LFE+BL+BR vs. 5.1side: FL+FR+FC+LFE+SL+SR) and channel downmixing (7.1 vs 5.1/5.1side where there is many 7.1 flavors e.g. 7.1: FL+FR+FC+LFE+BL+BR+SL+SR, 7.1wide: FL+FR+FC+LFE+BL+BR+FLC+FRC, 7.1wide-side: FL+FR+FC+LFE+FLC+FRC+SL+SR ).
    Also AC3 640 kbps can be issue (shouldn't be but it may be) - 512kbps is recommended AC3 bitrate.
    Quote Quote  
  8. Originally Posted by pandy View Post
    Originally Posted by kssxs View Post
    What I want to do is this:

    - take an existing MKV file with DTS or AAC (5.1 or 7.1 channel) audio, convert/extract AC3 audio from it and then remux the AC3 track into the file as the primary audio without removing anything from the original file. I'd like to do this with a single command, if possible.
    There can be some audio channel layout problem (5.1: FL+FR+FC+LFE+BL+BR vs. 5.1side: FL+FR+FC+LFE+SL+SR) and channel downmixing (7.1 vs 5.1/5.1side where there is many 7.1 flavors e.g. 7.1: FL+FR+FC+LFE+BL+BR+SL+SR, 7.1wide: FL+FR+FC+LFE+BL+BR+FLC+FRC, 7.1wide-side: FL+FR+FC+LFE+FLC+FRC+SL+SR ).
    Also AC3 640 kbps can be issue (shouldn't be but it may be) - 512kbps is recommended AC3 bitrate.
    Great, thank you for the suggestion to go to 512kbps for AC3. As for the channel layouts... I don't have the time to analyze 180 odd movies to get the optimal 5.1 AC3 output. I'll leave it as standard for now. The few movies I've done have seemed ok.

    Regardless, I appreciate you mentioning that!
    Quote Quote  
  9. Originally Posted by ProWo View Post
    Originally Posted by kssxs View Post
    I believe you're the developer, correct? If so, I'd love to see a couple of features added/changed:

    1) An option to output a test file, say 2-10 minutes (user adjustable) in length so that we can check the output to see if things like audio delays and other values need to be adjusted. As it stands, if you hit 'Abort', it deletes the file that is being multiplexed, which means you can't check the output unless the job finishes. This could mean potentially waiting upwards of 10 minutes for large multi-gigabyte files to finish to be able to test it. The workaround I found is that if you DON'T hit 'OK' on the 'Process Aborted' popup window (which tells you 'The created file is deleted.'), the output file is still in the output folder, and you can play it in VLC to test your selections. Once you hit 'OK' on the dialog box, the file is deleted. It would be nice to just have an option to test encode 2-10 minutes of video instead to finalize your settings before encoding the final file.

    2) An option to set the default audio encoding bitrate so that it doesn't need to be changed with every file that we create for a batch job. Most DTS streams are very high bitrate, and being able to set the 'Default Output Bitrate' to maximum (640 Bitrate kb/s for AC3 files) would be great so we don't have to type that in manually for each job before queing. I understand the values in the 'Encoder' files may be FFMPEG defaults, but if possible to set them to values that we want to use in each batch job would be great.

    3) In the 'Multiplex' window, the ability to drag and drop the streams to put them in whichever order we want/need with the moved stream auto-renumbering themselves. Unmovable streams would just be greyed-out. It would make the streams faster to deal with instead of manually re-numbering them and then hitting the 'Swap streams' button.

    4) The ability to see what the actualy FFPMEG command(s) looks like with the selections we make in the utility. If there are multiple command lines, show them all. Just for learning purposes.

    I realize you're building this tool on top of FFMPEG itself, and it's free, so don't know if it's possible to request any of those features.

    The tool is great, regardless, so thank you so much for this and for your help!
    1) Will be implement it in the next beta.
    2) Already implemented. The last audio encoder settings used (incl. bitrate) are automatcally saved (download the newest beta, v5.2.5.02).
    3) ATM not possible because the type of used datagrid does not allow it.
    4) The command line remains hidden.
    But there is a workaround: If you use the batch mode, close the program after entering all batches without executing them.
    This creates a file (BE_open.txt) in which the command line is visible.
    Thanks for your reply and for implementing a feature request!

    Again, the tool makes using FFMPEG easy, and batch jobs make handling a large number of files super convenient.

    Much appreciated!
    Quote Quote  
  10. Originally Posted by kssxs View Post
    the tool makes using FFMPEG easy, and batch jobs make handling a large number of files super convenient.
    Much appreciated!
    If you like it, give a positive rating.
    Follow the link on the startscreen.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!