VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. The faq/manual for megui hasn't been updated since 2006 and I need help on getting the audio passthru working..

    I'm trying to encode videos which have mp3 or aac audio which I want to keep without reencoding the audio stream. Megui has that option in the 1 click but I'd like to go through the autoencode option since I'm experimenting and tweaking the scripts. So whats the procedure for audio passthru?
    Quote Quote  
  2. There's a few ways to do it.
    Once the video has been indexed and you've set up the encode and saved the script, use the "X" box in the audio section to clear it. Click on AutoEncode and make sure the box for adding additional content is checked. Click on the Queue button and add the existing audio in the window which opens, then click on "Go" to add the job to the queue.

    I generally just add the video encoding job to the queue by itself using the Queue button in the video section, then add the existing audio manually. If it was extracted when the original video was indexed you can use one of MeGUI's muxers under the tools menu to add it and save the video and audio as a new file. Or if the audio wasn't extracted from the original video but it's in a container which MKVMergeGUI supports (AVI/MP4/MKV etc) you can open the encoded video, add the original file, deselect the original video stream and save the encoded video and existing audio as a new file. Of course if you use MKVMergeGUI the output will be MKV.

    Either way though (whether you use AutoEncode to add the existing audio or do it manually), the end result should be the same, although if you're specifying a file size AutoEncode might be easier as it includes the audio when calculating the video bitrate in order to give you the requested file size including both the audio and video.
    Last edited by hello_hello; 30th Mar 2013 at 14:52.
    Quote Quote  
  3. I think I wasn't clear enough. What I'm trying to do is encode an .avi file (xvid video, mp3 audio) to .mp4 (x264, retain existing mp3 without re-encoding). So I don't actually have the audio file lying around to mux it into the mp4 or mkv output. I could learn how to split it using one of the indexing or demuxing tools beforehand(if its usually done that way) but I thought it was handled routinely thru autoencode.

    I tried another file for testing (old mp1/2/3 codec), it was indexed by DGIndex (instead of the usual FFMSIndex) which split off the audio into an mp1/2/3 file. I did as you said to autoencode and tick add additional content, which sent me to the adaptive muxer menu where I added the audio mp1/2/3 file but still had no luck in the result. The output file did not have the audio muxed to it.

    I do not have the 'enable DGIndexNV' ticked under the external program settings.

    Indexing the avi using FFMSIndex does not extract the audio file for later muxing.
    Quote Quote  
  4. I don't re-encode AVIs much but thinking about it I'm not sure MeGUI can extract the audio from AVI files. I think it might create a script to re-encode the audio instead. If that's the case.... sorry.... I forgot.

    Where MeGUI is installed there's a sub-folder called mkvmerge and there's a file called "mmg.exe" inside. That's MKVMergeGUI. I'd create a shortcut to it as it's a pretty handy program, especially if you work with MKVs regularly (I wouldn't use MP4 unless there was a specific need to use it myself, as MKVs are much easier to work with). Run "mmg.exe" and use MKVMergeGUI to open the AVI you're wanting to re-encode. Hit the Remux button to resave it as an MKV. I have a vague feeling the OneClick encoder automatically remuxes AVIs as MKVs so it'll work correctly (extract the audio), but I've never used the OneClick encoder myself.

    Once the AVI is remuxed as an MKV, use the File/Open menu to open the remuxed MKV for encoding. MeGUI should extract the audio from it as part of the indexing process. If for some reason it doesn't, but I can't imagine why it wouldn't, MKVCleaver is another program which is handy to have installed. It'll extract all sorts of streams from MKV files.

    Once the video is indexed and you've saved the script for encoding you should be able to add the extracted audio to the AutoEncode job as I described previously. Just remember to use the "X" button to clear the audio section first otherwise I think AutoEncode will re-encode the audio and also add the original, so you'll end up with two audio streams in the output file.

    I've never seen the adaptive muxer fail to add the extracted audio to the final output file as it should, if you use AutoEncode. It simply does what you'd do "manually" anyway. Once MeGUI has finished encoding it opens the output MKV/MP4 file, adds the audio to it and then saves it as a new MKV/MP4. By default it'll probably have "muxed" added to the file name, so if there's more than one output file (ie something like "video.mp4" and "video_muxed.mp4") make sure you're opening the correct one, as only one will contain the audio.
    If MeGUI is set to delete the intermediate files when it's finished encoding you'll probably only have the one, final output file, but if it isn't, they should both be there.
    Last edited by hello_hello; 31st Mar 2013 at 09:58.
    Quote Quote  
  5. PS. If you're re-encoding a whole bunch of AVIs, Video To Video Converter will batch extract all the MP3 audio for you. Use it to open the AVIs, then in the window which opens for selecting the output format, choose MP3. Under "audio options" on the right, change the audio codec from "MP3" to "copy". Then you can use the convert button to extract all the audio and you should be able to open the original AVIs for encoding with MeGUI without having to remux them as MKVs first.

    The only downside to the above method is if the audio in the AVI files happens to use a delay, it can't be applied to the encoded MP4 automatically, whereas if you remux the AVIs as MKVs and open the MKVs with MeGUI, any audio delay should automatically be applied. You can check the AVIs to see if an audio delay is used with MediaInfo. If you switch to HTML view any delay will be listed as "delay relative to video" in the audio section.
    Quote Quote  



Similar Threads

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