VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Nov 2009
    Location
    United States
    Search Comp PM
    I'm trying to convert an mp4 to a .avi file. No matter what kind of Divx or xvid format I use, the file still comes out without sound, and without subtitles (I'm using .srt). Sometimes it has sound, and sometimes it has subtitles, but never both.

    This is the log from the last file I tried to convert:

    Last login: Thu Nov 19 23:21:51 on ttys001
    /Applications/ffmpegX.app//Contents/Resources/pbpaste | sh
    meggo:~ Meghan$ /Applications/ffmpegX.app//Contents/Resources/pbpaste | sh
    Encoding started on Thu Nov 19 23:48:23 EST 2009
    FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
    Mac OSX universal build for ffmpegX
    configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
    libavutil version: 49.0.0
    libavcodec version: 51.9.0
    libavformat version: 50.4.0
    built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Meghan/Movies/forsub/video.mp4':
    Duration: 00:01:08.0, start: 0.000000, bitrate: 605 kb/s
    Stream #0.0(und): Audio: aac, 44100 Hz, stereo
    Stream #0.1(und), 29.97 fps(r): Video: h264, yuv420p, 480x360
    Output #0, avi, to '/Users/Meghan/Movies/forsub/video.mp4.ff.avi':
    Stream #0.0, 29.97 fps(c): Video: xvid, yuv420p, 480x272, q=2-9, 878 kb/s
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
    Stream mapping:
    Stream #0.1 -> #0.0 [sync #0.0]
    Stream #0.0 -> #0.1 [sync #0.1]
    Press [q] to stop encoding
    frame= 2020 q=2.0 Lsize= 5624kB time=67.4 bitrate= 683.9kbits/s
    video:1495kB audio:1053kB global headers:0kB muxing overhead 120.730975%
    bench: utime=11.777s
    Encoding completed on Thu Nov 19 23:48:35 EST 2009

    meggo:~ Meghan$
    Also, when I try to preview the file, and find that I don't get sound, I close out of the Preview window in the filters tab and this error, which I don't know how to fix, shows up

    FIXME:Hardenabling SSE and SSE2 without detection
    MOV: selected audio stream (1) does not exists


    MPlayer interrupted by signal 11 in module: uninit_vo
    - MPlayer crashed by bad usage of CPU/FPU/RAM.
    Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
    disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
    - MPlayer crashed. This shouldn't happen.
    It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
    gcc version. If you think it's MPlayer's fault, please read
    DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
    won't help unless you provide this information when reporting a possible bug.
    I don't know what's wrong... my computer crashed recently, and I didn't have a problem with FFmpegx then. Although before it crashed I was running Mac OSX 10.4 and now I'm running 10.5.

    Thanks in advance for your help!
    Quote Quote  
  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by meggo
    I close out of the Preview window in the filters tab and this error, which I don't know how to fix, shows up

    MPlayer interrupted by signal 11 in module: uninit_vo
    - MPlayer crashed by bad usage of CPU/FPU/RAM.
    Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
    disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
    - MPlayer crashed. This shouldn't happen.
    It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
    gcc version. If you think it's MPlayer's fault, please read
    DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
    won't help unless you provide this information when reporting a possible bug.
    ffmpegX's mplayer will crash if you close the player window by clicking the red close-button in the upper left corner. (I presume that is because this mplayer was compiled without GUI and thus has no GUI-awareness.) Mplayer will close without crashing if you use the keyboard keys it listens to: 'q' or 'Esc'.

    mplayer basic keys
    Quote Quote  
  3. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by meggo
    I'm trying to convert an mp4 to a .avi file. No matter what kind of Divx or xvid format I use, the file still comes out without sound, and without subtitles (I'm using .srt). Sometimes it has sound, and sometimes it has subtitles, but never both.
    ffmpegX does not support embedding subtitles into an AVI (as the AVI container format doesn't officially support it). However, subtitles can be hardcoded by burning them into the video. This type of encoding requires the mencoder engine. For encoding to DivX/XviD AVI, ffmpegX has two encoding engines available: ffmpeg and mencoder. So use the DivX mencoder or XviD mencoder preset for creating an AVI with subtitles.
    Quote Quote  
  4. Member
    Join Date
    Nov 2009
    Location
    United States
    Search Comp PM
    Originally Posted by Case
    Originally Posted by meggo
    I'm trying to convert an mp4 to a .avi file. No matter what kind of Divx or xvid format I use, the file still comes out without sound, and without subtitles (I'm using .srt). Sometimes it has sound, and sometimes it has subtitles, but never both.
    ffmpegX does not support embedding subtitles into an AVI (as the AVI container format doesn't officially support it). However, subtitles can be hardcoded by burning them into the video. This type of encoding requires the mencoder engine. For encoding to DivX/XviD AVI, ffmpegX has two encoding engines available: ffmpeg and mencoder. So use the DivX mencoder or XviD mencoder preset for creating an AVI with subtitles.
    Thanks for your help!

    I tried encoding from my MP4 to .avi with DivX mencoder, and the subs get loaded fine, but there's still no audio (I tried putting on "invert mapping" as well). Same thing for the XviD mencoder. They both get to 56% at a normal pace during encoding process and then jump to 100% (which just can't be right).

    When I look at the logs, I see something about "MOV: selected audio stream (1) does not exists", which can't be good, but what can I do about it. Here are the logs from DivX and Xvid mencoder:

    MP4 to .avi with DivX mencoder:
    Encoding started on Sat Nov 21 16:19:56 EST 2009
    MEncoder dev-CVS-060307-04:23-4.0.1 (C) 2000-2006 MPlayer Team
    Mac OSX static build for ffmpegX
    FIXME:Hardenabling SSE and SSE2 without detection
    (Family: 6, Stepping: 10)
    CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
    success: format: 0 data: 0x0 - 0x4e8e96
    ISO: File Type Major Brand: ISO/IEC 14496-1 (MPEG-4 system) v2
    MOV: selected audio stream (1) does not exists
    Quicktime/MOV file format detected.
    VIDEO: [avc1] 480x360 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:7 fourcc:0x31637661 size:480x360 fps:29.97 ftime:=0.0334
    SUB: Detected subtitle file format: subviewer
    SUB: Read 19 subtitles.
    SUB: Adjusted 3 subtitle(s).
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    Opening video filter: [scale w=480 h=360]
    ================================================== ========================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
    ================================================== ========================
    Forcing output fourcc to 58564944 [DIVX]
    VDec: vo config request - 480 x 360 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
    SwScaler: using unscaled Planar YV12 -> Planar YV12 special converter
    videocodec: libavcodec (480x360 fourcc=58564944 [DIVX])
    Writing header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
    Writing header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
    Flushing video frames
    Writing index...
    Writing header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
    Video stream: 953.265 kbit/s (119158 B/s) size: 8102914 bytes 68.001 secs 2038 frames
    Encoding completed on Sat Nov 21 16:20:07 EST 2009
    And then Xvid with mencoder:
    Encoding started on Sat Nov 21 16:23:58 EST 2009
    MEncoder dev-CVS-060307-04:23-4.0.1 (C) 2000-2006 MPlayer Team
    FIXME:Hardenabling SSE and SSE2 without detection
    Mac OSX static build for ffmpegX
    CPU: Intel (Family: 6, Stepping: 10)
    CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
    success: format: 0 data: 0x0 - 0x4e8e96
    MOV: selected audio stream (1) does not exists
    ISO: File Type Major Brand: ISO/IEC 14496-1 (MPEG-4 system) v2
    Quicktime/MOV file format detected.
    VIDEO: [avc1] 480x360 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:7 fourcc:0x31637661 size:480x360 fps:29.97 ftime:=0.0334
    SUB: Detected subtitle file format: subviewer
    SUB: Read 19 subtitles.
    SUB: Adjusted 3 subtitle(s).
    xvid: using library version 1.2.-127 (build xvid-1.2.0-dev)
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    Opening video filter: [scale w=480 h=272]
    ================================================== ========================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
    ================================================== ========================
    VDec: vo config request - 480 x 360 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
    SwScaler: FAST_BILINEAR scaler, from Planar YV12 to Planar YV12 using MMX2
    videocodec: XviD (480x272 fourcc=44495658 [XVID])
    xvid: par=0/0 (vga11), displayed=480x360, sampled=480x272
    xvid: CBR Rate Control -- bitrate=878kbit/s
    Writing header...
    ODML: vprp aspect is 4:3.
    Writing header...
    ODML: vprp aspect is 4:3.
    Flushing video frames
    Writing index...
    Writing header...
    ODML: vprp aspect is 4:3.
    Video stream: 868.401 kbit/s (108550 B/s) size: 7381557 bytes 68.001 secs 2038 frames
    Encoding completed on Sat Nov 21 16:24:20 EST 2009
    Why am I still not getting any sound? Any clues?

    Thanks again
    Quote Quote  
  5. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by meggo
    Why am I still not getting any sound? Any clues?
    I did some tests, and came to a conclusion that surprised me... I knew that ffmpeg cared about stream order, but I found out that mplayer fails to see the audio stream in an .mp4 file if it has audio at stream 1 and video at stream 2. So it seems that in some special circumstances mplayer cares about stream order too! (This could be limited to this version of mplayer only (other versions not being tested), but that's what ffmpegX works with.) This kinda sucks, as using mplayer/mencoder used to mean that you wouldn't have to worry about stream order. And "invert mapping" only works with ffmpeg.

    To reverse the stream order in an MP4 file, you could use MP4Box CLI. The syntax is
    Code:
    $ MP4Box -add source.mp4#trackID=2 -add source.mp4#trackID=1 target.mp4
    For your file this would be:
    Code:
    $ MP4Box -add /Users/Meghan/Movies/forsub/video.mp4#trackID=2 -add /Users/Meghan/Movies/forsub/video.mp4#trackID=1 /Users/Meghan/Movies/forsub/video-new.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.

    (MP4Box documentation)
    Quote Quote  
  6. Member
    Join Date
    Nov 2009
    Location
    United States
    Search Comp PM
    Thanks for such a detailed response. I'll try this out soon and see if I can't get it to work

    Thanks again!
    Quote Quote  
  7. Member
    Join Date
    Dec 2009
    Location
    France
    Search Comp PM
    Hello,

    Just joined the forum in order to answer this post, as I might have an additional piece of information.

    I was just trying to resize some videos, and I came across the same problem with missing audio in the ouptut file. I tried to track down the problem, by keeping the default settings, with the divx mencoder preset for output. Here is the result of the process window:

    Encoding started on Thu Dec 31 11:35:35 CET 2009
    MEncoder dev-CVS-051126-18:35-3.3 (C) 2000-2005 MPlayer Team
    Mac OSX static build for ffmpegX
    AltiVec found
    CPU: PowerPC
    success: format: 0 data: 0x0 - 0x16294a3
    ISO: File Type Major Brand: ISO/IEC 14496-1 (MPEG-4 system) v2
    MOV: selected audio stream (1) does not exists
    Quicktime/MOV file format detected.
    --------------
    MOV track #0: 187 chunks, 4097 samples
    Audio bits: 16 chans: 2 rate: 44100
    MOV: Found MPEG4 audio Elementary Stream Descriptor atom (39)!
    Fourcc: a4pm
    --------------
    MOV track #1: 187 chunks, 2854 samples
    MOV: AVC decoder configuration record atom (49)!
    MOV: Found unknown movie atom btrt (20)!
    Image size: 1280 x 720 (24 bpp)
    Display size: 1280 x 720
    Fourcc: 1cva Codec: ''
    --------------
    MOV: longest streams: A: #0 (4097 samples) V: #1 (2854 samples)
    VIDEO: [avc1] 1280x720 24bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:7 fourcc:0x31637661 size:1280x720 fps:30.00 ftime:=0.0333
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    Opening video filter: [scale w=1280 h=720]
    ================================================== ========================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
    ================================================== ========================
    Forcing output fourcc to 58564944 [XVID]
    VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
    SwScaler: using unscaled Planar YV12 -> Planar YV12 special converter
    videocodec: libavcodec (1280x720 fourcc=58564944 [XVID])
    Writing AVI header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
    Skipping frame!
    Skipping frame!
    Flushing video frames
    Writing AVI index...
    Fixing AVI header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
    Video stream: 1982.629 kbit/s (247828 B/s) size: 23583821 bytes 95.162 secs 2854 frames
    Encoding completed on Thu Dec 31 11:41:39 CET 2009
    The problem seems to come from this part:
    MOV: selected audio stream (1) does not exists
    So I had a look at the command line generated by ffmpegX, and I also noticed something interesting there:

    /Library/Application Support/ffmpegX/mencoder /Users/jorge/Movies/Miro/Uploads-by-nqtv/video.mp4 -oac lavc -lavcopts acodec=mp3:abitrate=128 -srate 48000 -aid 1 -ovc lavc -sws 0 -lavcopts threads=2:vcodec=mpeg4:vbitrate=940:keyint=240:vqm in=2:vqmax=15 -ofps 29.97 -vop scale=1280:720 -noodml -ffourcc DIVX -o /Users/jorge/Movies/Miro/Uploads-by-nqtv/video.mp4.ff.avi
    The "-aid 1" option means that mplayer has to look for audio stream number 1. The number may depend on the file type, or on how it has been encoded. I'm still investigating.

    Anyways, with my files, these two command lines work, with sound playback:

    /Library/Application\ Support/ffmpegX/mplayer -v video.mp4
    /Library/Application\ Support/ffmpegX/mplayer -v video.mp4 -aid 0
    And this one does not (only video and no sound):

    /Library/Application\ Support/ffmpegX/mplayer -v video.mp4 -aid 1
    The error is the same as what ffmpegX gets :

    MOV: selected audio stream (1) does not exists
    The "-v" option is useful to see what mplayer finds. It seems that with all the files having the same problem, there is an audio stream number 0, and a video stream number 1. However, it's not a problem with mplayer itself, as it can play the videos with sound just fine on its own. But if you tell it to take a sound stream that is not there, it can't find it.

    The problem is that ffmpegX generates a command line that always includes the "-aid" option, but if you select audio stream number n in the GUI, the command line says "-aid n+1". I tried with 0 (default), you get "-aid 1", and with 1, "-aid 2".

    I can't see a way to work around this presently, other than typing the command line myself. What is the use of the pretty ffmpegX GUI then? Good thing that I 'm a linux user, I know the mplayer/mencoder command line and I can get along just fine this way, but it would still be useful to correct the problem in ffmpegX which seems to be a very nice tool.
    --
    jvh
    Quote Quote  



Similar Threads

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