[MEncoder-users] Strange output format of mencoder

briconaut at gmx.de briconaut at gmx.de
Fri Dec 10 01:12:50 CET 2010


Hi,
I've been using mencoder to transcode videos for my iPad for some time
without any problems. Recently some of the transcoded files were not usable
anymore. Neither itunes nor the ipad could play them, but playing them with
mplayer on my debian box still works. To understand this behavior, I took a
good and a bad file and compared the output of 'mplayer -identify' of both
 the original and the transcoded file. While the original '-identify' output
of the files is really similar, the '-identify' output for the transcoded
files appears to be radically different (at least to my untrained eye).
I'm posting the '-identify' output and my transcoding command below in the
hope that someone might be able to answer these questions:
- What is the difference in the input files that makes mencoder produce two
so apparently different output formats?
- How can I detetct this difference? The '-identify' option apparently
doesn't show the crucial piece of information.
- How can I encode my 'bad' files to get them to play just like the good
ones.

Thanks for any help and suggestions in advance,
Thomas.

My system:
   Debian/Lenny on 2.6.32-bpo.5-amd64

My mencoder version:
   MEncoder dev-SVN-r26940 (C) 2000-2008 MPlayer Team
   CPU: Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz (Family: 6, Model:
23, Stepping: 10)
   CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
   Compiled with runtime CPU detection.

My transcoding command:
mencoder -sws 9 \
   -of lavf \
   -lavfopts format=mp4 \
   -vf 'scale=1024:768,dsize=1024:-2,harddup' \
   -ovc x264 \
   -x264encopts
'bitrate=800:vbv_maxrate=1000:vbv_bufsize=2000:nocabac:me=umh:subq=6:frameref=6:trellis=1:level_idc=30:global_header:threads=2'
\
   -oac faac \
   -faacopts 'mpeg=4:object=2:br=160:raw' \
   -channels 2 -srate 24000 \
   file.avi -o file.mp4
(Comments on how to do this better/right are welcome, I got this command
from google...)

Output of '-identify' on the original 'good' file:
   Playing good.avi.
   AVI file format detected.
   ID_VIDEO_ID=0
   [aviheader] Video stream found, -vid 0
   ID_AUDIO_ID=1
   [aviheader] Audio stream found, -aid 1
   VIDEO:  [XVID]  624x352  12bpp  23.976 fps  1033.3 kbps (126.1 kbyte/s)
   Clip info:
    Software: MEncoder SVN-r32669-4.3.2
   ID_CLIP_INFO_NAME0=Software
   ID_CLIP_INFO_VALUE0=MEncoder SVN-r32669-4.3.2
   ID_CLIP_INFO_N=1
   ID_FILENAME=good.avi
   ID_DEMUXER=avi
   ID_VIDEO_FORMAT=XVID
   ID_VIDEO_BITRATE=1033336
   ID_VIDEO_WIDTH=624
   ID_VIDEO_HEIGHT=352
   ID_VIDEO_FPS=23.976
   ID_VIDEO_ASPECT=0.0000
   ID_AUDIO_FORMAT=85
   ID_AUDIO_BITRATE=125776
   ID_AUDIO_RATE=0
   ID_AUDIO_NCH=0
   ID_LENGTH=1255.00
   ID_SEEKABLE=1
   ==========================================================================
   Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
   Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
   ==========================================================================
   ID_VIDEO_CODEC=ffodivx

Output of '-identify' on the transcoded 'good' file:
   Playing good.mp4.
   libavformat file format detected.
   ID_VIDEO_ID=0
   [lavf] Video stream found, -vid 0
   ID_AUDIO_ID=1
   [lavf] Audio stream found, -aid 1
   VIDEO:  [avc1]  1024x768  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
   ID_FILENAME=good.mp4
   ID_DEMUXER=lavfpref
   ID_VIDEO_FORMAT=avc1
   ID_VIDEO_BITRATE=0
   ID_VIDEO_WIDTH=1024
   ID_VIDEO_HEIGHT=768
   ID_VIDEO_FPS=23.976
   ID_VIDEO_ASPECT=0.0000
   ID_AUDIO_FORMAT=255
   ID_AUDIO_BITRATE=0
   ID_AUDIO_RATE=24000
   ID_AUDIO_NCH=2
   ID_LENGTH=1255.13
   ID_SEEKABLE=1
   ==========================================================================
   Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
   Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
   ==========================================================================
   ID_VIDEO_CODEC=ffh264

Output of '-identify' on the original 'bad' file:
   Playing bad.avi.
   AVI file format detected.
   ID_VIDEO_ID=0
   [aviheader] Video stream found, -vid 0
   ID_AUDIO_ID=1
   [aviheader] Audio stream found, -aid 1
   VIDEO:  [XVID]  624x352  24bpp  23.976 fps  1454.3 kbps (177.5 kbyte/s)
   Clip info:
    Software: Nandub v1.0rc2
   ID_CLIP_INFO_NAME0=Software
   ID_CLIP_INFO_VALUE0=Nandub v1.0rc2
   ID_CLIP_INFO_N=1
   ID_FILENAME=bad.avi
   ID_DEMUXER=avi
   ID_VIDEO_FORMAT=XVID
   ID_VIDEO_BITRATE=1454256
   ID_VIDEO_WIDTH=624
   ID_VIDEO_HEIGHT=352
   ID_VIDEO_FPS=23.976
   ID_VIDEO_ASPECT=0.0000
   ID_AUDIO_FORMAT=85
   ID_AUDIO_BITRATE=154368
   ID_AUDIO_RATE=0
   ID_AUDIO_NCH=0
   ID_LENGTH=2848.30
   ID_SEEKABLE=1
   ==========================================================================
   Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
   Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
   ==========================================================================
   ID_VIDEO_CODEC=ffodivx

Output of '-identify' on the transcoded 'bad' file:
   Playing bad.mp4.
   libavformat file format detected.
   ID_VIDEO_ID=0
   libavformat file format detected.
   RAWDV file format detected.
   ID_VIDEO_ID=0
   ID_AUDIO_ID=0
   VIDEO:  [DVSD]  720x480  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
   ID_FILENAME=bad.mp4
   ID_DEMUXER=rawdv
   ID_VIDEO_FORMAT=DVSD
   ID_VIDEO_BITRATE=0
   ID_VIDEO_WIDTH=720
   ID_VIDEO_HEIGHT=480
   ID_VIDEO_FPS=29.970
   ID_VIDEO_ASPECT=0.0000
   ID_AUDIO_FORMAT=RADV
   ID_AUDIO_BITRATE=0
   ID_AUDIO_RATE=0
   ID_AUDIO_NCH=0
   ID_LENGTH=43.41
   ID_SEEKABLE=1
   ==========================================================================
   Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
   Selected video codec: [ffdv] vfm: ffmpeg (FFmpeg DV decoder)
   ==========================================================================
   ID_VIDEO_CODEC=ffdv


More information about the MEncoder-users mailing list