VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Hi all

    I have a mov file with a MJPEG video stream and AAC audio stream. I would like to encode this mov file with x264 codec to a mp4 file. Basically doesn't matter if the audio stream is converted with mp3lame or copied as AAC.

    So what I did was: I installed ffmpegx, mp3lame, faac, faad and selected my file and the desired way of convertion. I choose x264 (mencoder) and mp3lame. And of course - it worked just fine (video & audio). I tested mp3lame as well as AAC - both worked.

    Next step was to automate things, because I have a lot of mov files ! So I decided to try to use the mencoder to do the same on the command line interface, so that I could integrate the command into a batch file. Unfortunately, the audio part didn't work. There was absolutely no audio.

    So I was very confused. ffmpegx uses the same tool to convert my mov file (mencoder) and the audio conversion worked fine. Now as soon as I use mencoder itself, there is NO audio. How comes? What do I miss here?

    I tried the following command:
    mencoder input.mov -ovc x264 -x264encopts subq=5:8x8dct:frameref=2:bframes=3:b_pyramid:weigh t_b -vf scale=640:480 -oac mp3lame -lameopts cbr:br=64:vol=0 -srate 48000 -aid 0 -ofps 25 -lavfopts format=mp4 -o output.mp4

    I already tested the mp3lame part of this command with mpeg4 video codec which worked fine. So I guess my bug has to be somewhere within the video part. Anyone sees a bug there?

    I'm not familiar with ffmpegx command line interface. I installed the CLI on my Mac OSX SL. How does the x264 conversion look like with ffmepgx?

    Is it somehow possible to extract the CLI command from the ffmpegx interface?

    The output of the mencoder shows the following lines:
    Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
    FAAD: Failed to initialize the decoder!
    ADecoder init failed
    ADecoder init failed
    Cannot find codec for audio format 0x6134706D.
    Read DOCS/HTML/en/codecs.html!

    But: faad is installed. ffmepgx finds it and obviously can convert the file.

    I appriciate any help!

    Thank you very much!
    Quote Quote  
  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by mmz27 View Post
    I installed ffmpegx, mp3lame, faac, faad
    ffmpegX doesn't require you to install mp3lame, faac and faad, nor does it make use of these extra copies if you do install them. The ffmpeg version in ffmpegX is already compiled with those enabled. The mencoder and mplayer binaries are also self-contained (with the exception of reallib).

    Originally Posted by mmz27
    ... and selected my file and the desired way of convertion. I choose x264 (mencoder) and mp3lame.
    For encoding to H.264 MP4, ffmpegX offers the choice between "h.264 mencoder" and "h.264 x264". There is no "x264 (mencoder)" option in the interface. Even if you select the "h.264 x264" preset and change the audio encoding to MP3 in the interface, the encoder will still encode audio to AAC. Nowhere does the interface mention "mp3lame", it just refers to "MP3". (Without explicitly mentioning it, mencoder of course uses x264 for H.264, and ffmpegX uses mp3lame for MP3 encodings.)

    Originally Posted by mmz27
    I'm not familiar with ffmpegx command line interface. I installed the CLI on my Mac OSX SL. How does the x264 conversion look like with ffmepgx?
    Is it somehow possible to extract the CLI command from the ffmpegx interface?
    It is a bit hidden, but the command line can be found. Please see the topic "Get corresponding ffmpeg command after using ffmpegX" for details.
    Basically, when encoding to H.264 MP4 with ffmpegX, the program first encodes the video to a raw .264 stream, then decodes the audio to uncompressed WAV, then encodes the WAV to AAC, then uses mp4box for muxing. I'm sure the developer of ffmpegX had good reasons at the time to choose this route.
    Quote Quote  
  3. thanks for your help!

    it worked: encode video, encode sound, mux 'em
    Quote Quote  
  4. Hello, I have trouble converting a mp4 video to avi, the problem if the video looks good but no audio, I hope I can help.
    Audio Options
    Codec. Mp2
    44 100 sampling
    Stereo channel
    CBR Mode
    Quote Quote  
  5. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by PabloFX View Post
    mp4 video to avi
    Next time please start a new thread for new issues, instead of replying to an older existing one. Thanks.

    Originally Posted by PabloFX
    no audio
    Audio Options: Codec. Mp2; 44 100 sampling; Stereo channel; CBR Mode
    1/ ffmpegX likes mencoder to encode audio in MP3 (or AC3) format for use in AVIs, not MP2.
    2/ Many MP4s (from QuickTime export) have audio as the first stream and video as the second stream. This is reverse from what ffmpegX expects, and it specifies the audio stream number for (this) conversion, resulting in "selected audio stream (1) does not exists".

    You could reverse the stream order yourself for MP4 files, before conversion, so ffmpegX can use it, by using command line MP4Box.
    Code:
    MP4Box -add source.mp4#trackID=2 -add source.mp4#trackID=1 target.mp4
    This operation is pretty fast, as it copies the content to a new file without any transcoding, with only a different stream order: track 2 (video) becomes track 1 and track 1 (audio) becomes track 2.

    See also MP4 to AVI - no sound, no subs.
    Last edited by Case; 5th Sep 2010 at 02:42.
    Quote Quote  



Similar Threads

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