Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th November 2005, 11:24   #41  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
check the stats file.
Sharktooth is offline   Reply With Quote
Old 18th November 2005, 14:01   #42  |  Link
cast42
Registered User
 
Join Date: May 2005
Location: Belgium
Posts: 22
x264 video for the Ipod

Hi,
I used this guide with succes to encode for Quicktime 7. Because I'm started from PAL video I used -fps 25 for the MP4box.exe command. The result is looking awesome in the quicktime and mpc players. Thanks for this great guide. However, my 60GB video Ipod is refusing to play it. Videos encoded using Quictime 7 Pro do work fine. Has anybody an idea how to change/adapt this guide for video on the iPod ? On the Apple pages, following information is stated:
H.264 video: up to 768 Kbps, 320 x 240, 30 frames per sec., Baseline Profile up to Level 1.3 with AAC-LC up to 160 Kbps, 48 Khz, stereo audio in .m4v, .mp4 and .mov file formats

The audio I've muxed in was compressed with Nero 7 (not the BeSweet procedure). and is MPEG-4 Main@L2 (AAC LC) at 96Kbps.

This is the info of the x264 generated video using MP4Box 0.4.0:
[prompt$ D:/bin/MP4Box.exe -info video.mp4
* Movie Info *
Timescale 600 - Duration 00:02:44.880
Fragmented File no - 1 track(s)
File Brand avc1 - version 0

File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: No audio capability required (0xff)
No streams included in root OD

Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:02:44.880
Media Info: Language "und" - Type "vide" - Sub Type "avc1" - 4122 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 320 x 240
Self-synchronized

After muxing using:
mp4box.exe -fps 25 -add "video.mp4" -add "audio.mp4" result.mp4
I get:
[prompt]$ D:/bin/MP4Box.exe -info result.mp4
* Movie Info *
Timescale 600 - Duration 00:02:44.895
Fragmented File no - 4 track(s)
File Brand isom - version 1

File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: Advanced Simple Profile @ Level 3 (0xf3)
Audio PL: AAC Profile @ Level 2 (0x29)

Track # 1 Info - TrackID 2 - TimeScale 32000 - Duration 00:02:44.896
Media Info: Language "und" - Type "soun" - Sub Type "mp4a" - 5153 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 32000
Synchronized on stream 4

Track # 2 Info - TrackID 3 - TimeScale 24000 - Duration 00:02:44.880
Media Info: Language "und" - Type "soun" - Sub Type "mp4a" - 6870 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x69
MPEG-2.5 Audio - 2 Channel(s) - SampleRate 0 - Layer 2
Synchronized on stream 4

Track # 3 Info - TrackID 4 - TimeScale 1000 - Duration 00:02:44.895
Track is present in Root OD
Media Info: Language "und" - Type "odsm" - Sub Type "mp4s" - 1 samples
MPEG-4 Config: ObjectDescriptor Stream - ObjectTypeIndication 0x01
Self-synchronized

Track # 4 Info - TrackID 5 - TimeScale 1000 - Duration 00:02:44.895
Track is present in Root OD
Media Info: Language "und" - Type "sdsm" - Sub Type "mp4s" - 1 samples
MPEG-4 Config: SceneDescription Stream - ObjectTypeIndication 0x02
Synchronized on stream 4

Is Advanced Simple Profile @ Level 3 (0xf3) as reported by MP4box covered by the "Baseline Profile up to Level 1.3" spec from Apple ??

A movide generated by Quicktime 7 Pro export to ipod reports this:
[prompt]$ D:/bin/MP4Box.exe -info withQT7ExportToIpod.m4v
* Movie Info *
Timescale 600 - Duration 00:05:02.246
Fragmented File no - 2 track(s)
File Brand M4V - version 1

File has no MPEG4 IOD/OD

Track # 1 Info - TrackID 1 - TimeScale 44100 - Duration 00:05:02.254
Media Info: Language "eng" - Type "soun" - Sub Type "mp4a" - 13017 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 44100
Self-synchronized

Track # 2 Info - TrackID 2 - TimeScale 600 - Duration 00:05:02.246
Media Info: Language "eng" - Type "vide" - Sub Type "avc1" - 7093 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 320 x 200
Synchronized on stream 1


Help me getting video on the Ipod!

Thx
cast42 is offline   Reply With Quote
Old 18th November 2005, 14:08   #43  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
iPod and quicktime are different. donwload x264-psp from x264.nl and follow the instructions.
Sharktooth is offline   Reply With Quote
Old 20th November 2005, 23:51   #44  |  Link
Randall
Registered User
 
Randall's Avatar
 
Join Date: Sep 2005
Location: Norwood, MA
Posts: 175
hi cast42. Definately go with Sharktooth's recomendation, the x264-psp profile is excatly what you need for iPod compatible encoding. This guide was for QT compatibility, and iPod is a little different. For starters, the video size must be no bigger then 320 x 240 30 frames per sec. etc. And I believe that only the baseline profile will work with it. Also, my audio encoding profile won't work on iPod either. You'll need to use AAC LC encoding instead of the AAC HE. Finally, you must keep the bitrate down to 768 Kbps or lower. if you're doing ABR or VBR it's a good idea to keep it around 700 Kbps, because if I understand correctly, for iPod encoding you cannot be above 768 Kbps at any given moment.
Randall is offline   Reply With Quote
Old 21st November 2005, 12:09   #45  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
framerate for ipod must be always 30fps?
smok3 is offline   Reply With Quote
Old 22nd November 2005, 04:29   #46  |  Link
Randall
Registered User
 
Randall's Avatar
 
Join Date: Sep 2005
Location: Norwood, MA
Posts: 175
Quote:
Originally Posted by smok3
framerate for ipod must be always 30fps?
No, that's just the maximum framerate that you can use. Sorry for the confusion.
Randall is offline   Reply With Quote
Old 22nd November 2005, 11:13   #47  |  Link
cast42
Registered User
 
Join Date: May 2005
Location: Belgium
Posts: 22
Movies with 25fps play on iPod

Hi,
Randall is right. 30fps is the maximum. Video generated from 25fps PAL play on Ipod:
Here an example of mp4info dump:
Track Type Info
1 audio MPEG-4 AAC LC, 47.693 secs, 128 kbps, 44100 Hz
2 video H264 Baseline@1.3, 48.360 secs, 579 kbps, 320x240 @ 25.000000 fp
s

To be more precise here an excerpt from an QT Pro generated .m4v with mp4dump:
The majorbrand is M4V
De video is:
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 = 224 (0xe0)
AVCLevelIndication = 13 (0x0d)
reserved = 63 (0x3f) <6 bits>
lengthSizeMinusOne = 3 (0x3) <2 bits>
reserved1 = 7 (0x7) <3 bits>
numOfSequenceParameterSets = 1 (0x01) <5 bits>
<table entries suppressed>
numOfPictureParameterSets = 1 (0x01)
<table entries suppressed>
cast42 is offline   Reply With Quote
Old 23rd November 2005, 09:51   #48  |  Link
leban
Registered User
 
Join Date: Oct 2005
Posts: 4
From YUV to h264 mp4 in QT

No success here. Still the same results, Quicktime plays the file but does not show picture. There is no sound track.

If some one wants to check this out, the stats files, the source and result are here: http://gandalf.lasipalatsi.net/testit/kimmotesti/

the command I am using is:
Code:
x264 --pass 1 --bitrate 839 --bframes 2 --subme 6 --analyse p8x8,b8x8,i4x4,p4x4 --me esa --progress --stats 1711.stats --no-psnr --output test-1711.mp4 klo5-6-f25-Ip.yuv 720x480
And this looks ok:
Code:
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 
mp4 [info]: initial delay 1 (scale 25)
x264 [info]: slice I:86    Avg QP:50.47  size: 12103
x264 [info]: slice P:234   Avg QP:50.74  size:  7480
x264 [info]: mb I  I16..4: 85.8%  0.0% 14.2%
x264 [info]: mb P  I16..4: 78.5%  0.0%  4.4%  P16..4: 15.1%  0.7%  0.2%  0.0%  0.0%    skip: 1.0%
x264 [info]: kb/s:1744.6

encoded 320 frames, 1.06 fps, 1744.97 kb/s
Should I run the .mp4 thru mp4box even though I don't have sound?
leban is offline   Reply With Quote
Old 23rd November 2005, 11:03   #49  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
leban,
1. deleted, nm.
2. yes, you have to remux the file using mp4box.

here is my lil guide if it is of some use:
http://somestuff.org/x264_qt/h264_in_quicktime7.html
(including the very sexy win bat file)

Last edited by smok3; 23rd November 2005 at 19:46.
smok3 is offline   Reply With Quote
Old 23rd November 2005, 17:51   #50  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,392
Quote:
Originally Posted by leban
If some one wants to check this out, the stats files, the source and result are here: http://gandalf.lasipalatsi.net/testit/kimmotesti/
Those results do not look ok. 78% intra in P-frames? QP50 and still twice the requested bitrate?
Cause: your source is 640x480, not 720x480. And it's yuv4mpeg, not raw yuv.
Code:
mencoder -ovc copy -of rawvideo klo5-6-f25-Ip.y4m -o klo5-6-f25-Ip.yuv

Last edited by akupenguin; 23rd November 2005 at 17:55.
akupenguin is offline   Reply With Quote
Old 24th November 2005, 16:12   #51  |  Link
leban
Registered User
 
Join Date: Oct 2005
Posts: 4
Quote:
Originally Posted by akupenguin
Cause: your source is 640x480, not 720x480. And it's yuv4mpeg, not raw yuv.
Code:
mencoder -ovc copy -of rawvideo klo5-6-f25-Ip.y4m -o klo5-6-f25-Ip.yuv
You are rirght about that size. I tried it again with the right size. still nothing. How did you figure out that it is yuv4mpeg?

It is made with: jpeg2yuv -b 0 -f 25 -I p -j webcam_%07d.jpg

But that could be the cause for the persistent problem.
leban is offline   Reply With Quote
Old 29th November 2005, 16:57   #52  |  Link
Randall
Registered User
 
Randall's Avatar
 
Join Date: Sep 2005
Location: Norwood, MA
Posts: 175
Another thing, if you find that when you mux your audio and video with MP4Box QuickTime doesn't display the picture at all (no white box either) then try muxing again. I rarely run into this problem, but when I do, a second attempt at muxing solves it. Appears to be a completely random occurance.
Randall is offline   Reply With Quote
Old 1st December 2005, 09:57   #53  |  Link
GarfBond
Registered User
 
Join Date: Jan 2004
Posts: 11
OK, I'm having some terrible luck with Quicktime and x264 all of a sudden. x264 380, QT7 pro, latest versions of megui and profiles, as well as mp4box.

Here's the log from megui
Code:
Next job job1-1 is a video job. encoder commandline:
"C:\Program Files\x264\x264.exe" --pass 1 --bitrate 1208 --stats "H:\INC0NNS1\boundin.stats" --bframes 2 --subme 1 --b-rdo --analyse none --me dia --progress --no-psnr --output NUL "H:\INC0NNS1\boundin.avs" 
successfully set up video encoder and callbacks for job job1-1
----------------------------------------------------------------------------------------------------------

Log for job job1-1

avis [info]: 704x368 @ 23.98 fps (6764 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 
x264 [info]: slice I:58    Avg QP:20.78  size: 33740
x264 [info]: slice P:3360  Avg QP:22.07  size:  9008
x264 [info]: slice B:3346  Avg QP:24.30  size:  2842
x264 [info]: mb I  I16..4: 37.8%  0.0% 62.2%
x264 [info]: mb P  I16..4: 13.2%  0.0%  0.0%  P16..4: 44.0%  0.0%  0.0%  0.0%  0.0%    skip:42.8%
x264 [info]: mb B  I16..4:  1.5%  0.0%  0.0%  B16..8: 16.9%  0.0%  0.0%  direct:10.1%  skip:71.5%
x264 [info]: final ratefactor: 22.85
x264 [info]: kb/s:1183.4

Actual bitrate after encoding without container overhead: 1183.46

----------------------------------------------------------------------------------------------------------
job job1-1 has been processed. This job is linked to the next job: job1-2
Next job job1-2 is a video job. encoder commandline:
"C:\Program Files\x264\x264.exe" --pass 2 --bitrate 1208 --stats "H:\INC0NNS1\boundin.stats" --bframes 2 --subme 6 --b-rdo --analyse p8x8,b8x8,i4x4,p4x4 --progress --no-psnr --output "H:\INC0NNS1\boundin.264" "H:\INC0NNS1\boundin.avs" 
successfully set up video encoder and callbacks for job job1-2
----------------------------------------------------------------------------------------------------------

Log for job job1-2

avis [info]: 704x368 @ 23.98 fps (6764 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 
x264 [info]: slice I:58    Avg QP:19.81  size: 34766
x264 [info]: slice P:3360  Avg QP:21.12  size:  8968
x264 [info]: slice B:3346  Avg QP:23.11  size:  3099
x264 [info]: mb I  I16..4: 41.4%  0.0% 58.6%
x264 [info]: mb P  I16..4:  6.5%  0.0%  7.9%  P16..4: 23.5%  9.5%  6.4%  1.0%  0.6%    skip:44.6%
x264 [info]: mb B  I16..4:  0.8%  0.0%  1.9%  B16..8: 29.0%  2.4%  4.1%  direct: 1.4%  skip:60.3%
x264 [info]: kb/s:1205.7

Actual bitrate after encoding without container overhead: 1205.79
desired video bitrate of this job: 1208 kbit/s - obtained video bitrate: 1205.79234305855 kbit/s
----------------------------------------------------------------------------------------------------------
I muxed it using the latest version of MP4box and YAMB.

If you want to look at the end result, here it is: http://albert.stealthgenius.com/stuff/boundin.mp4. It'll be up in about 20 minutes after this post.

Any advice would be greatly appreciated.
GarfBond is offline   Reply With Quote
Old 1st December 2005, 15:12   #54  |  Link
Randall
Registered User
 
Randall's Avatar
 
Join Date: Sep 2005
Location: Norwood, MA
Posts: 175
You've been White Screen Of Deathed! WSOD sux0rs. Well, I would try it again without the
Code:
--b-rdo                 RD based mode decision for B-frames
QuickTime gets fussy about B frames. I don't believe you can have any more then 2 B-frames max. (QT Pro's own encoder only supports 1 B frame max, but I know that it's decoder can handle 2. May I suggest
Code:
"x264.exe" --pass 1 --bitrate 1208 --stats "H:\INC0NNS1\boundin.stats" --bframes 2 --subme 1  --analyse none --me esa --progress --no-psnr --output NUL "H:\INC0NNS1\boundin.avs" 

"x264.exe" --pass 2 --bitrate 1208 --stats "H:\INC0NNS1\boundin.stats" --bframes 2 --subme 6 --analyse p8x8,b8x8,i4x4,p4x4 --me esa --progress --no-psnr --output "H:\INC0NNS1\boundin.mp4" "H:\INC0NNS1\boundin.avs"
I know for a fact that QT works without --b-rdo and without --me dia. I'm not sure if either of those 2 settings are causing your WSOD problem, but those 2 settings jump out at me as a possible suspect. Try my command line and see what happens. Also, I have had trouble with the latest version of MP4Box, but it is not a White Screen Of Death problem, so I don't think MP4Box is your problem here, most likely it's your x264 settings. Try encoding to an actual mp4 container rather then a raw file. I have had more success this way.
Randall is offline   Reply With Quote
Old 1st December 2005, 15:43   #55  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
both brdo and diamond search do not influence decoding in any way
Sharktooth is offline   Reply With Quote
Old 1st December 2005, 16:39   #56  |  Link
Randall
Registered User
 
Randall's Avatar
 
Join Date: Sep 2005
Location: Norwood, MA
Posts: 175
Quote:
Originally Posted by Sharktooth
both brdo and diamond search do not influence decoding in any way
Thanks for letting us know. Ok so I'm out of ideas as to why GarfBond's encode failed to render picture in QT then.
@GarfBond: Stick with Sharktooth's CE QuickTime profile and everything should be fine. It's in the sticky threads somewhere, and you need 7-zip to extract it.

Thanks for that profile Sharktooth.
Randall is offline   Reply With Quote
Old 1st December 2005, 20:26   #57  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
maybe it's a matter of bitrate variance?
i really dont know. it works for some users and it doesnt for others...
Sharktooth is offline   Reply With Quote
Old 1st December 2005, 22:34   #58  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,392
Quote:
Originally Posted by Randall
Umm I could be wrong, but if you have it set for main profile then that might be fine, but I assume 'all' to include 8x8 Intra Search (i8x8) and that is bad!! That will kill your QT compatibility in a big way. Somebody could correct me here if I'm wrong, because I am not positive if --analyse all specifies everything like it would imply. I specified exactly the options that we wanted, just to avoid any possibility of that confusion.
--analyse all includes i8x8 if and only if --8x8dct is also specified. (It's not a question of profile; cqm will also set high profile, but won't enable i8x8.)
akupenguin is offline   Reply With Quote
Old 1st December 2005, 23:12   #59  |  Link
Randall
Registered User
 
Randall's Avatar
 
Join Date: Sep 2005
Location: Norwood, MA
Posts: 175
Thanks for the info akupenguin. --analyse all == --analyse p8x8,b8x8,i4x4,p4x4
but typing
Code:
--analyse p8x8,b8x8,i4x4,p4x4
makes me feel good inside. That way I know exactly what the hell it is doing.
Randall is offline   Reply With Quote
Old 2nd December 2005, 06:06   #60  |  Link
GarfBond
Registered User
 
Join Date: Jan 2004
Posts: 11
Part of my problem is that I've been using Sharktooth's CE-Quicktime profile

Today I just tried it outputting to .MP4 instead of a raw AVC file, but that was a no-go. Simply viewing the resulting MP4 file in QT results in no video at all (not even a white box of doom). After muxing it with the AAC file the video still isn't playing and the audio continues to work just fine.

Probably the most frustrating part is that everything plays in MPC just fine and dandy while QT sits there looking dumb. Anyone got any ideas?
GarfBond is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.