[MEncoder-users] mpg to mp4 help

Bill Moseley moseley at hank.org
Thu Dec 27 02:16:46 CET 2007


I've got a Sony Walkman player and I'm trying to create videos that will
play on it.  I have an existing movie trailer that does play on it (as
well as in mplayer).

So, I'm trying to convert an mpg from my digital camera to mp4.
This plays fine with mplayer, but not on the Walkman.

Video:
$ mencoder -vf format=i420 -nosound -ovc raw -of rawvideo -ofps 29.970 -o video.raw example.mpg
$ x264 -o video.264 --fps 29.970 --crf 26 --progress video.raw 352x240


Extract audio and encode
$ mplayer -ao pcm -vc null -vo null example.mpg
$ faac --mpeg-vers 4 audiodump.wav

Combine into mp4 container
$ MP4Box -add video.264 -add audiodump.aac -fps 29.970 example.MP4

But, the Walkman says it's a format that it cannot play.
I noted the audio was 44100Hz instead of 48000Hz, and the video sizes
vary.


Here's the output from running my created mp4 and the "Spider
Man" trailer:


Playing example.MP4.
Quicktime/MOV file format detected.
VIDEO:  [avc1]  352x240  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 44100 Hz, 2 ch, s16le, 132.9 kbit/9.42% (ratio: 16617->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 352 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 352x240 => 352x240 Planar YV12 




Playing Spider-Man 3 Trailer.MP4.
ISO: Unknown File Type Major Brand: MSNV
Quicktime/MOV file format detected.
VIDEO:  [avc1]  320x240  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 320x240 => 320x240 Planar YV12


Any ideas how to make it work?




-- 
Bill Moseley
moseley at hank.org




More information about the MEncoder-users mailing list