Log in

View Full Version : SLOW playback of H.264 (x264) on Quicktime 7


Randall
31st October 2005, 15:47
I have been having a problem with the media I'm encoding with a fairly recent version of Sharktooth's x264 build (x264-Full_r347.exe). I am using all of the default settings in x264 except turning the quality up to 6 and exaustive search with 2-pass encoding at 839 kb/s. The problem is only in Quicktime 7.0.3 for Windows XP. I have terribly slow playback in Quicktime, where I would get only 4 or 5 frames of picture every minute! (The soundtrack doesn't skip or hang, just the picture is like a clip show.) Interrestingly enough, the same ripped media file plays back beautifully for all of my other H.264 complient software players (mplayer, VLC, and Nero Digital) I have no idea why quicktime is so pokey with the playback, and was wondering if the experts on this forum think that this is just a Quicktime for Windows problem, or if I encoded my media incorrectly. So I will post a step-by-step of what I did to help narrow down the problem and any possible solutions. Here we go...

1) Use DVD Decrypter to rip the vobs to my hard disc.
2) Use DGIndex to save the project file (.d2v) and soundtrack (.ac3)
3) Use BeLight interface to BeSweet to encode the audio to AAC format. I use the Nero Digital Profile with the AAC (HE) preset.
4) Use Gordian Knot for processing of .d2v file with an Avisynth script. I use Lanczos resizing to 512x384, and IVTC Inverse Telecline to de-interlace and get the FPS = 23.976. (I started out with a full NTSC television source FPS = 29.970. It was The Simpsons Season 3 to be more specific).
5) I choose the x264 codec obviously. The settings are standard except I have Quality = 6 and ME method = Exhaustive search using 2-pass with logfile and target bitrate = 839 kbps.
6) I wait for hours for the rip process to complete. (Running a Pentium III 866 MHz machine, it takes a day and a half to rip, processing little more then 1 FPS)
7) FINALLY, I take the H.264 encoded video only file (encoded in the AVI container format) and pull it out of it's container using YAMB and MP4Box)
8) I now have a raw .H264 video file encoded at 23.976 FPS, and an mp4 encapsulated AAC HE audio track encoded with nero digital aac.dll (back from step #3) I Mux the audio and video files together using YAMB, being sure to force set the FPS to 23.976 on both streams so that they sync up nicely.
9) I now have a completed MPEG-4 ISO complient (or so I assume) .mp4 file, complete with Video (H.264) and Audio (AAC HE). As I mentioned earlier, this file plays perfectly in mplayer, VLC, and Nero Digital, but extremely slow FPS in Quicktime for windows.

I have come to the conclusion that either my computer (Pentium III 866 MHz) is just to slow to handle it, or I encoded incorrectly, or Quicktime sux. Your feedback and input on this is more then welcome. This is my second attempt at x264, I am a long time DivX and XviD encoder, but IMHO x264 blows them both away! My first atempt at x264 was successful, but was in .avi container format, and thus not playable in Quicktime. Sorry about that sidetrack. Your help is appreciated.

P.S. Do you think that the reason Quicktime is lagging so badly is that I encoded with QPel x264 instead of the HPel for H.264, which is a Quicktime default?? :confused:

Daodan
31st October 2005, 16:42
Err, I guess you're luckier than me. I just downloaded quicktime 7 just to see how it plays on my computer (dual opteron but no direct 3Dcard), and I must say that it just blocks (mp4 files made pretty much the same way as yours but higher bitrate). You didn't say if it was 2 channels or 5.1. There is a thread somewhere with problems of that kind. Also try encoding with Nero and see if the problem persists. In the meantime i'll try that myself on a small sample.

Daodan
31st October 2005, 16:52
Well, it works on a Nero encode, but I think the problem is your cpu after all. O my computer it also plays very slow-mo but i have a big encode on the background that's eating a lot of power, but that doesn't afect playing the movie with mpc for example. Still, I think your cpu can't take it. Try if you can on some other computer (preferably over 1500 mhz)(I'm actually quite surprized that it plays well with other players with such an old processor, you probably used a low resolution?).

Randall
31st October 2005, 16:54
Oh sorry I didn't mention the AAC audio details. I downmixed to 2 channels. I will try encoding the whole deal with Nero next, although since I was using Gordian Knot as just a front end to the actual x264 encoder, I don't think that is where the problem lies. Also on a sidenote, I couldn't get my mp4 to work with Quicktime at all (it just would freeze with a small, green, maybe 10x10 pixel image in the upper left corner of the screen) until I did some research and somebody suggested that I remove 8x8 Intra search and 8x8 DCT. It worked when I re-ripped with those settings turned off. I'm not sure how or why, or if that really should have any affect at all for Quicktime playback.

Randall
31st October 2005, 16:58
Well, it works on a Nero encode, but I think the problem is your cpu after all. O my computer it also plays very slow-mo but i have a big encode on the background that's eating a lot of power, but that doesn't afect playing the movie with mpc for example. Still, I think your cpu can't take it. Try if you can on some other computer (preferably over 1500 mhz)(I'm actually quite surprized that it plays well with other players with such an old processor, you probably used a low resolution?).
I am actually a little supprized that it plays so nicely in Nero Digital myself. I am using full screen resolution. Is it possible that Nero is utilizing my GPU (Raedon 9600 XT 128 MB) instead of just my old clunky P3 CPU?

Hmm I was afraid that my CPU was in fact the culprate. It looks like it is encoded properly, just playing VERY slowly. I will try to find a faster, newer CPU to test my encode on, and I will post back the results. It looks like it might be time for an upgrade. Thanks for the advice Daodan, I really appreciate it :thanks:

bond
31st October 2005, 17:06
if nero and libavcodec (mplayer, vlc, ffdshow) decode it with normal speed the problem seems to be quicktime (i already heard reports that apples decoder is pretty slow)

btw with megui you can encode directly to .mp4 with x264 and nero aac (no need to go via .avi in gknot)

Daodan
31st October 2005, 17:07
Well, you just answered my first problem than. The file encoded that hangs on my computer was encoded using 8x8 Intra search, so that's the problem. Still, I tried the other movie on a free computer and is OK so the cpu is your problem. It behaves a bit strange though, every time I seek, for a few secons it plays jerky like you said, but that's about it. Probably the decoder in quicktime isn't really optimized for slower cpus.

Randall
31st October 2005, 17:10
Hey bond thanks for the info! I was hoping if someone could confirm or deny that quicktime was the issue after all. I wonder if the slow decoding is just in the Windows version of quicktime. I know a friend with a new powerbook and I will ask him to test my encode tonight.

My next encode will be using megui if it means i can skip an unnecessary step! thank you for the advice bond.

Randall
31st October 2005, 17:15
Yeah Daodan, It's looking like the decoder for quicktime is not very optimized, at least not for slower CPUs like mine. I'm still not sure why 8x8 Intra search would have an adverse affect on quicktime playback, but it definately did for me. On the plus side, my encode without the 8x8 Intra search encoded faster, without any kind of noticable loss of quality whatsoever (at least in my eyes), and the final encode was only 0.2 megs larger! A small price to pay for quicktime compatibility IMO.

Manao
31st October 2005, 19:04
I never heard apple supporting h264 high profile, and I 8x8 is part of high profile. Wouldn't it be the issue ?

Randall : I 8x8 improves mainly intra frames ( 1 / 250th of the frames ). But 8x8 dct ( which you can activate too, and which is also incompatible with QT ) improves things a lot, and is too big a price for QT compatibility IMO. Anyway, QT on windows is the slowest decoder available, and the one that support the less feature of the standard, so I don't see the point on using it.

Randall
31st October 2005, 19:30
I never heard apple supporting h264 high profile, and I 8x8 is part of high profile. Wouldn't it be the issue ?

Randall : I 8x8 improves mainly intra frames ( 1 / 250th of the frames ). But 8x8 dct ( which you can activate too, and which is also incompatible with QT ) improves things a lot, and is too big a price for QT compatibility IMO. Anyway, QT on windows is the slowest decoder available, and the one that support the less feature of the standard, so I don't see the point on using it.
Hi Manao, thanks for clearing some things up for me. I can see your arguement against supporting Quicktime all together with your encodes, but while you're on the cutting edge of features (high profile 8x8 intra search and dct) that aren't supported by devices that claim to be "100% H.264 compatable" then you've taken away from a possible audience that can only use, or only know how to use, said device for their playback. I know we as encoders should not have to pay the price for this, but at the same time I also don't want to limit the number of output devices I can get working.

Quicktime's decoder clearly needs some work, as the open standards (libavcodec) based players are superior for decoding at this point in time. For the stuff I was encoding, I didn't notice any kind of loss in visual quality when taking away the high profile settings, but my eyes are not as well trained as some of the videophiles out there.

Sharktooth
31st October 2005, 20:50
I wonder why ppl still uses QT on windows... it's the buggiest and the most standard incompatible POS on the earth.

Randall
31st October 2005, 21:04
I wonder why ppl still uses QT on windows... it's the buggiest and the most standard incompatible POS on the earth.
It comes free with iTunes :D (manditory)
I hate it too, but I want people using Macs to be able to view my movies in their native software.

Sharktooth
31st October 2005, 21:48
No, the QT standalone package can be downloaded as well.
Mac ppl can still download VLC to watch your "not made with $h!ttime" movies and be more happier than with QT...

Randall
31st October 2005, 22:20
To clarify, I ment that you can't get iTunes withough Quicktime, or $h!ttime as you more accurately put it. Only videophiles like us know anything about VLC or any open source players (which are lightyears ahead of WMP and Quicktime), so that solution isn't really acceptable to me. I'll just have to sacrifice high profile H.264 settings for the time being. I'm sure eventually the rest of theplayers will catch up, and fully support high profile.

Randall
1st November 2005, 04:27
OK, just to wrap things up, I tried playing my x264 encoded video with Quicktime on a faster machine (Pentium 4 2.4 GHz) and it worked quite nicely, but with like 75-85% CPU usage. So everyones original assumption was correct, Quicktime for Windows sux the big one. I also tested my encode with Quicktime on Mac OS X using a G4 1.25 GHz iBook, which also worked flawlessly. My Pentium III 866 MHz just doesn't cut it for Quicktime. But I am in good company, because I read on this forum somewhere that Sharktooth also has a Pentium III 866 MHz PC. Go Coppermine!!