UPDATE: Avidemux 2.5.2 with libx264-85 in Ubuntu 10.04 probably won't work. It keeps switching the Main profile on. I tried but failed.
. . .
Following information is based on my personal experiments and some research on other people experiences.
Sony Walkman, its media player - not music player, supports media files in MP4 (MPEG-4 ISO) container.
e.g.: $ file sample.mp4 $ ISO Media, MPEG v4 system, version 1
$ file sample2.mp4 $ ISO Media
Supported audio codec is only AAC-LC that is "MPEG2/4 Advanced Audio Coding" with LC - low complexity profile.
Supported video codecs are BOTH:
MPEG-4 part 2 fourcc: MP4V ffmpeg encoding setting: vcodec=mpeg4 Avidemux encoding codec is:"MPEG-4 ASP (lavc)" AND H.264 / AVC / MPEG-4 part 10 / MPEG-4 AVC at Baseline profile and level 1.3 fourcc: AVC1 ffmpeg encoding setting: vcodec=libx264 Avidemux encoding codec is:"MPEG-4 AVC (x264)"
Notes:
FFmpeg itself works well, I found some shell-scripts, presented at the end of this blog. Using ffmpeg has an advantage of direct specification of H264 codec level (-level 13).
Avidemux has no direct settings to choose level or profile.
I recommend to have the x264 library version fresh enough.
avidemux settings
Avidemux used is Debian package version: 2.4.4-0.2 with dependency on libx264-67 (>= 1:0.svn20090327).
screenshot 1 Note: usual stuff
screenshot 2 Note: usual stuff
screenshot 3 Note: CABAC must not be used with Baseline profile.
screenshot 4 Note: No B-frames! Some partitioning can't be used.
screenshot 5 Note: Proper settings for VBV buffer according to H264 level 1.3.
screenshot 6 Note: Default settings.
screenshot 7
Note that newer x264 prints what a profile and level were estimated from Avidemux settings. Earlier versions did not have this estimation feature operating well and Walkman was not able to play resulting video.
ffmpeg settings The most important is to
disable CABAC: -coder 0
set level 1.3: -level 13
set the VBV buffer params: -maxrate 768k -bufsize 2M
Do not use options which enable higher H264 profiles, like B-frames etc. Some macroblocks partitioning can't be used for Baseline profile. # ############################################################ # ############################################################ #!/bin/bash