View Full Version : Atomchanger ini file for x264 avc ipod video movies
cast42
2nd December 2005, 16:43
i tried to fix .mp4 after muxing with MP4Box.exe... Therefore I adapt the AtomAVC.ini file of this QT guide. This is my current .ini file (without succes so far) I'm trying:
[Config]
Title=Ipod MPEG-4 AVC
MQV=2
CODEC=2
[DeleteAtom]
Item0=ftyp
Item1=iods
[InsertAtom]
Item0=ftypM4V%20%00%00%00%01M4V%20M4A%20mp42isom
Item1=/moov/trak/edts%00%00%00%1celst%00%00%00%00%00%00%00%01%00%00%6F%c8%00%00%00%00%00%01%00%00
Atomchanger.exe refuses to execute the .ini file (no errors reported!) and hence my ipod video is not playing the video. Does somebody now what is the exact syntax and semantics of the atomchanger ini file ? (I do not read japonese...)
bond
2nd December 2005, 17:17
i tried to fix .mp4 after muxing with MP4Box.exethere is no need to "fix" the mp4 files created by mp4box, as they are not borken
does the ipod have problems with mp4 files other than those related to codec settings?
split from the qt thread, as this has nothing to do with qt
Sharktooth
2nd December 2005, 17:30
ehhr.... atom changer is needed for PSP only.
cast42
2nd December 2005, 21:18
AVC video of 320x240 pixels, encoded with x264, muxed together with AAC audio using MP4Box.exe (as in Randall's guide) play succesfully with Quicktime player, Itunes, VLC or MPC. But they do not play on Ipod Video. (Itunes refuses to sync them on the Ipod video) The only way I got video on the Ipod was by exporting from Quicktime 7 Pro using "Ipod Video" setting. Therefore I was trying to adapt .mp4 files with Atomchanger so that they look similar as those produced by Quicktime's "export to Ipod". All help from the community is appreciated. Could somebody explain why the "iods" and "uuid" atoms are not removed by:
[DeleteAtom]
Item0=ftyp
Item1=iods
Item2=uuid
The script:
start /belownormal /b /w x264.exe --progress --bitrate 650 --analyse p8x8,b8x8,i4x4 --output video.264 video.avs
start /belownormal /b /w MP4Box.exe -add video.264 output.mp4
start /belownormal /b /w MP4Box.exe -add audio.mp4 output.mp4
start /belownormal /b /w ATOMChanger.exe output.mp4 output_for_ipod.m4v AtomAVCIpod.ini
The AtomAVCIpod.ini file:
[Config]
Title=Ipod MPEG-4 AVC
MQV=2
CODEC=2
[DeleteAtom]
Item0=ftyp
Item1=iods
Item2=uuid
[InsertAtom]
Item0=ftypM4V%20%00%00%00%01M4V%20M4A%20mp42isom
Item1=/moov/trak/edts%00%00%00%1celst%00%00%00%00%00%00%00%01%00%00%6F%c8%00%00%00%00%00%01%00%00
Thx
bond
3rd December 2005, 02:46
cast42, search for sharktooths ipod x264 profile for megui before f*ing up the mp4 files...
cast42
4th December 2005, 12:21
Bond, thx for the advice!
I tried :
./x264 --bitrate 650 --no-cabac --analyse p8x8,b8x8 --qpmin 22 --me umh --progress --no-psnr --output video_ipod.mp4 video_ipod.avs
Encode starts from 25fps anamorphic 16:9 PAL with video_ipod.avs:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
MPEG2Source("pal_video_720x576.d2v")
LanczosResize(320,180)
AddBorders(0,30,0,30)
The file video_ipod.mp4 does not appear on the Ipod video and does not play with Itunes or Quicktime 7. VLC and MPC do play the video without problems.
As far as I can see, the .mp4 files produced by x264 or MP4box comply to ISO/IEC 14496 - Part 12: ISO base media file format http://standards.iso.org/ittf/PubliclyAvailableStandards/c041828_ISO_IEC_14496-12_2005(E).zip . All atoms are registered by http://www.mp4ra.org/ (http://) (that is operated by Apple ;) )
I see that the level of QT export to ipod generated .mp4 is lower then default level by x264. I 'll experiment with --level parameter (but do not find Annex A for the moment)
bond
4th December 2005, 12:31
I see that the level of QT export to ipod generated .mp4 is lower then default level by x264. I 'll experiment with --level parameter (but do not find Annex A for the moment)interesting point!
you can find info about the levels here (http://forum.doom9.org/showthread.php?p=678891#post678891)
edit: your height is not mod16...
cast42
4th December 2005, 14:22
I added --level 1.3:
./x264 --level 1.3 --bitrate 650 --no-cabac --analyse p8x8,b8x8 --qpmin 22 --me umh --progress --no-psnr --output video_ipod.mp4 video_ipod.avs
Size is QVGA 320x240, width 320 (0x0140)) is 20x16, height 240 (0x00f0) is 15x16.
In the resulting x264 video_ipod.mp4 file:
type avc1
reserved1 = <6 bytes> 00 00 00 00 00 00
dataReferenceIndex = 1 (0x0001)
reserved2 = <16 bytes> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
width = 320 (0x0140)
height = 240 (0x00f0)
reserved3 = <14 bytes> 00 48 00 00 00 48 00 00 00 00 00 00 00 01
compressorName =
reserved4 = <4 bytes> 00 18 ff ff
type avcC
configurationVersion = 1 (0x01)
AVCProfileIndication = 66 (0x42)
profile_compatibility = 0 (0x00)
AVCLevelIndication = 13 (0x0d)
which is now equal to the avc settings in QT Pro exported Ipod file.
Default x264 level is 40 (0x28). Hence --level 1.3 can be usefull.
But even with --level 1.3 QT plays no video, Itunes does not play nor sync to the video Ipod (5G). I fear will have to ressort to AtomChanger. :(
bond
4th December 2005, 14:43
also try --nf and --analyse none
cast42
4th December 2005, 18:21
As suggested by bond, a video encoded with:
x264.exe --level 1.3 --bitrate 650 --no-cabac --analyse p8x8,b8x8 --qpmin 22 --me umh --progress --no-psnr --output "video.264" "video_ipod.avs"
MP4Box.exe -add video.264 video_ipod.mp4
got synced to the ipod video 5G. Altough the video plays with QT, the ipod video screen stays black during play on the ipod.
I start playing with the option mentioned by bond
bond
4th December 2005, 18:26
also try --nf and --analyse noneyou didnt use these options in your cmdl
cast42
4th December 2005, 18:26
nope, with "--nf" and "--analyse none" added to the x264 encoding options, the video got tranfered to the ipod 5g but the screen stays black during playing
GregerG
15th December 2005, 17:06
Hi!
I have be following this thread as i wanted to encode my own videos for my Ipod. It took a while before a got a working commandline when using x264.
My first tests where done with the MeGUI, but I realized that MeGUI is not supporting some of the needed switches in x264 like, --level
Im using the lastest version of x264 build 385 which has support for AviSynth. I let the aviSynth script do the re-scaling down to 320x240
This is the line i used to encode:
x264.exe --bitrate 600 --no-cabac --analyse p8x8,b8x8 --qpmin 22 --vbv-bufsize 2000 --vbv-maxrate 768 --me umh --progress --no-psnr --level 1.3 --output temp_video.mp4 temp_avs.avs 320x240
Audio was encoded with BeSweet from the AVI to AAC like this:
BeSweet.exe -core( -input test.avi -output "temp_audio.mp4" -logfile "temp_audio.log" ) -bsn( -2ch -cbr 128 -codecquality_fast -aacprofile_lc ) -ota( -d 0 -g max )
Then everything was muxed togheter with MP4Box, adding the language (dont know if its needed).
MP4Box.exe -keepsys -add "temp_video.mp4:lang=eng" -add "temp_audio.mp4:lang=eng" temp_muxed.mp4
This worked fine and could be imported into iTunes and then transfered to my Ipod.
Good luck!
/G
cast42
15th December 2005, 21:34
Waw, thanks for sharing this. Last profile of MeGUI do include level 1.3. I tried your settings, but I had less success. I tried:
x264.exe --bitrate 600 --no-cabac --analyse p8x8,b8x8 --qpmin 22 --vbv-bufsize 2000 --vbv-maxrate 768 --me umh
--progress --no-psnr --level 1.3 --output temp_video.mp4 source_320x240.avs 320x240
MP4Box.exe -keepsys -add "temp_video.mp4:lang=eng" -add "audio48.mp4:lang:eng" "movie.mp4"
IsoMedia import - track ID 1 - Video (size 320 x 240)
IsoMedia import - track ID 1 - Audio (SR 48000 - 2 channels)
Saving to movie.mp4: 0.500 secs Interleaving
x264 : x264 core:42 svn-387
MP4box: MP4Box - GPAC version 0.4.1-DEV
Audio: exported from audio.wav with QT Pro 7 to MPEG-4 Audio ACC-LC 48Khz 128 Kbps
The file plays with Quictime 7, MPC and iTunes, syncs to the Ipod but only audio is heard, no video is played.
What version of MP4Box do you recommend ? Or is the mp4 file from besweet essential for a good final result?
cast42
15th December 2005, 22:33
The following bat file:
start /belownormal /b /w x264.exe --bitrate 600 --no-cabac --analyse p8x8,b8x8 --qpmin 22 --vbv-bufsize 2000 --vbv-maxrate 768 --me umh --progress --no-psnr --level 1.3 --output temp_video.mp4 source_320x240.avs 320x240
start /belownormal /b /w "C:/Program Files/BeSweet/BeSweet.exe" -core( -input audio48.wav -output "C:\videos\audio.mp4" -logfile "temp_audio.log" ) -bsn( -2ch -cbr 128 -codecquality_fast -aacprofile_lc ) -ota( -d 0 -g max )
start /belownormal /b /w MP4Box.exe -keepsys -add "temp_video.mp4:lang=eng" -add "audio.mp4:lang:eng" "result.mp4"
This is the screen output:
c:\videos\de_rpde_loper>REM start /belownormal /b /w x264.exe --bitrate 600 --no-cabac --analyse p8x8,b8x8 --qpmin 22 --vbv-bufsize 2000 --vbv-maxrate 768 --me umh --progress --no-psnr --level 1.3 --output temp_video.mp4 DRL_02-12_320x240.avs 320x240
c:\videos>"C:/Program Files/BeSweet/BeSweet.exe" -core( -input aud
io48.wav -output "C:\videos\audio.mp4" -logfile "temp_audio.log" )
-bsn( -2ch -cbr 128 -codecquality_fast -aacprofile_lc ) -ota( -d 0 -g max )
BeSweet v1.5b31 by DSPguru.
--------------------------
[00:18:54:229] Conversion Completed !
Visit DSPguru's Homepage at :
http://DSPguru.doom9.net/
c:\videos>start /belownormal /b /w MP4Box.exe -keepsys -add "temp_
video.mp4:lang=eng" -add "audio.mp4:lang:eng" "result.mp4"
IsoMedia import - track ID 1 - Video (size 320 x 240)
IsoMedia import - track ID 1 - Audio (SR 44100 - 2 channels)
IsoMedia import - track ID 2 - media type "odsm:mp4s"
IsoMedia import - track ID 3 - media type "sdsm:mp4s"
Saving to result.mp4: 0.500 secs Interleaving
It is strange that the audio in result is 44Khz (source is 48KHz). And two track Id's (audio and video) have ID 1???
The result plays with QT7, Itunes and syncs to Ipod G5 but still plays like an audio file (no video shown)
bond
16th December 2005, 00:53
It is strange that the audio in result is 44Khz (source is 48KHz).probably besweet does the downscaling to 44
And two track Id's (audio and video) have ID 1???both input video and audio .mp4 files have the streams with id 1
the output doesnt
GregerG
16th December 2005, 17:17
Im using the following versions of the essential tools:
X264: x264 core:40 svn-375M (built by Sharktooth)
BeSweet: BeSweet v1.5b31 by DSPguru.
Mp4Box: MP4Box - GPAC version 0.4.1-DEV
and AviSynth 2.5.6
And that is working fine. If someone want my whole batfile I can post it here. I have for for AVIs (1 and 2pass) and one for MPEG using DGIndex.
cast42
17th December 2005, 16:24
I tried with Sharktooth's build but no luck:
X264: x264 core:42 svn-387 (build by Sharktooth) (x264-Full_r387C)
BeSweet: BeSweet v1.5b31 by DSPguru.
Mp4Box: MP4Box - GPAC version 0.4.1-DEV
and AviSynth 2.5.6
x264.exe --bitrate 600 --no-cabac --analyse p8x8,b8x8 --qpmin 22 --vbv-bufsize 2000 --vbv-maxrate 768 --me umh --progress --no-psnr --level 1.3 -o "temp_video.mp4" "source_320x240.avs" 320x240
"C:/Program Files/BeSweet/BeSweet.exe" -core( -input audio48.wav -output "audio.mp4" -logfile "temp_audio.log" ) -bsn( -2ch -cbr 128 -codecquality_fast -aacprofile_lc ) -ota( -d 0 -g max )
MP4Box.exe -keepsys -add "temp_video.mp4:lang=eng" -add "audio.mp4:lang=eng" "result.mp4"
Results plays with QT7, MPC and Itunes 6.1, syncs on ipod G5 but no video yet (only audio)
Is Sharktooths build "core:40 svn-375M" that GregerG is using still available somewhere ? Is it crucial ?
This is data in the mdat atom:
x264 - core 42 svn-387 - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x110 me=umh subme=5 brdo=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 chroma_qp_offset=0 slices=1 bframes=0 keyint=250 keyint_min=25 scenecut=40 pass=1 bitrate=600 ratetol=1.0 rceq='blurCplx^(1-qComp)' qcomp=0.60 qpmin=22 qpmax=51 qpstep=4 vbv_maxrate=768 vbv_bufsize=2000 ip_ratio=1.40<bh:00>
This is the data in the free atom at the end of the file:
freeIsoMedia File Produced with GPAC 0.4.1-DEV
cast42
18th December 2005, 20:58
I finally figured out why I got no video on the Ipod G5 with GregerG's approach. I had the TV-out switched on :stupid: Sorry for the misinformation.
So now we are sure, AtomChanger is not needed at all. A standard ISO/IEC MPEG-4 file encoded with x264 following GregerG's approach (and probably others) can be decoded by the video Ipod! Thanks to everybody who contributed to this result. No reason to use Quicktime Pro's encoder anymore except for convience.
Sharktooth
19th December 2005, 16:01
... Omg ...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.