View Full Version : x264 CLI Settings for Baseline Level 1.3 (iPod compatible)
dballinger
7th March 2006, 18:54
Could anyone please post a fairly complete command-line (for x264 CLI) that will convert an AVS (input.avi thru AviSynth) YV12-output to a *.mp4 that will conforms to a Baseline profile Level 1.3 (320x240 384kbps) and would play in an iPod (like the Handbrake version using x264b13 setting)? Many of the default settings appear to be for greater levels (like 5.1). Most of the time, I end up with a video with "unknown" profile @ 5.1--or something similar. Otherwise, x264 does an amazing job with compression relative to MPEG4 SP or earlier MPEG versions.
Sharktooth
7th March 2006, 18:59
look for MeGUI profiles: http://forum.doom9.org/showthread.php?t=101813
there's a PD-iPod profile for x264.
However iPod is not only limited to level 1.3...
Sirber
7th March 2006, 19:02
RealAnime 4.0.5 can do it too ;)
olaola
8th March 2006, 04:22
look for MeGUI profiles: http://forum.doom9.org/showthread.php?t=101813
there's a PD-iPod profile for x264.
However iPod is not only limited to level 1.3...
really? but the offical specification said it is baseline 1.3
dballinger
12th March 2006, 22:43
It took a little while to extract what settings were obvious from the MeGUI profile (iPod) and, finally, the rest from the source code within x264.c. RealAnime kept failing on a 'merge', so I finally gave up that route for now. What I came up with appears to work perfectly in VLC, QT 7.0, and will also load and play within iTunes. When I try to "Convert to iPod" it tells me it's already compatible. However, I do not yet own an iPod. Until then, if anyone that has a video iPod is willing to try these settings (with their own source) to confirm that the resulting MP4 does play, I would certainly appreciate it. (Obviously, you'll need to create a compatible source AVI to test this out with.)
The source avi was a simple 320x240 AVI using HUFFYUV lossless compression with Windows WAV (PCM) audio. I used AviSynth for the frame-server and to convert the RGB output to the needed YV12 for x264:
AviSource("Release_15fps_5250f_320x240_av021506_01.avi")
ConvertToYV12()
Other than that, the only other utilities I used to create the MP4 were x264.exe, mp4box.exe and faac.exe. Here are the contents of "convert.bat":
@
@rem EXTRACT AUDIO TRACK FROM SOURCE
mp4box -aviraw audio -out work/input_av.pcm "Release_15fps_5250f_320x240_av021506_01.avi"
@
@
@rem CONVERT AUDIO TO AAC-FORMAT
faac -q 50 -b 64 -c 11000 -P -R 44100 -B 16 -C 1 -X --mpeg-vers 4 --obj-type lc work\input_av_audio.pcm
@
@
@rem CONVERT AVI VIDEO TRACK TO H264 STREAM (VIA AVISYNTH & X264)
x264 --progress --bframes 0 --no-b-adapt --no-cabac --bitrate 384 --crf 26 --subme 5 --ref 1 --analyse p8x8,b8x8 --threads 1 --filter 0:0 --keyint 250 --min-keyint 25 --scenecut 40 --qpmin 22 --qpmax 51 --qpstep 4 --direct temporal --me hex --subme 1 --merange 16 --ipratio 1.40 --pbratio 1.30 --level 13 --qcomp 0.60 --output work/output_v.264 work/avi.avs 320x240
@
@
@rem ADD VIDEO AND AUDIO STREAMS TO CREATE ISMA-COMPLIANT MP4
mp4box -isma -lang eng -new -fps 15 -add work/output_v.264 work/av.mp4
mp4box -isma -lang eng -add work/input_av_audio.aac work/av.mp4
@
@
@rem SHOW RESULTS
@mp4box -info work/av.mp4 > av.log
@notepad av.log
@
Sharktooth
12th March 2006, 22:47
why two times subme (first with 5, second with 1), me hex (and not umh) and why all those default and unnecessary options?
Sirber
12th March 2006, 22:50
From my tests Nero has better AAC LC than FAAC at 64kbps
dballinger
12th March 2006, 22:58
Sorry about the two subme parameters, the one I wanted was subme 1. As far as the redundancy, I wasn't sure whether the defaults in x264 were for a higher profile or level than Baseline 1.3, so I added them.
I don't have Nero AAC for encoding, so I used faac. The source audio is just voice--no music--and is why I used 64kbps with a cutoff of 11KHz.
Sirber
12th March 2006, 22:59
You can use higher subme too. It doesn't affect playback comptability, but boost quality (and encode slower :D).
dballinger
12th March 2006, 23:03
Good, I'll change the subme back to 5--thanks. (What is the umh setting?)
dballinger
12th March 2006, 23:08
Found it: - umh: uneven multi-hexagon search
Sharktooth
12th March 2006, 23:27
you can even usd subme 6 for better results.
Sirber
12th March 2006, 23:30
subme 6 work with svn build of x264, with no cabac?
Sharktooth
12th March 2006, 23:33
why shouldnt it?
Sirber
13th March 2006, 00:10
Last time I checked it wasn't avalible.
You are confusing subme 6 with subme 7.
DeathTheSheep
14th March 2006, 23:49
For a while, Sharktooth's patches removed all support for CAVLC rate distortion. Not that I'm complaining; his were the only builds with level 7 partition decision :).
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.