H.264 problems

Forum covering all aspects of small gauge cinematography! This is the main discussion forum.

Moderator: Andreas Wideroe

wado1942
Posts: 932
Joined: Fri Dec 15, 2006 5:46 am
Location: Idaho, U.S.A.
Contact:

H.264 problems

Post by wado1942 »

I just bought Quicktime so I could start encoding in H.264. I'm a bit dissapointed and am wondering if I'm doing something wrong. For starters, I have to first export from Vegas to a QT file or else the audio will be out of sync. Even though H.264 is in the codec list on Vegas, it doesn't work. That said, if I export as an uncompressed QT file and load it in the QT player to recode at H.264, it works and the audio stays in sync. I noticed right away that the output file is noticably brighter than the input. It's not a gamma thing because the black turns into a murky gray and the highlights also get brighter in addition to midtones. I also don't like that on the AAC audio, I have to pingpong back & forth between different perameters to get the bit rate/sample rate I want because at say 48KHz, there's no bit rate below a certain level, so I have to select the lowest bitrate possible, then go back to sample rate and select something lower, then go back to bit rate, the back to sample rate untill I get what I want. Also, I'm not seeing any real difference in quality between H.264 and WMV which is only a very early generation of MPEG-4 and from what I understand doesn't even support bidirectional frames. Am I missing something? Any help would be appreciated.
I may sound stupid, but I hide it well.
http://www.gcmstudio.com
mattias
Posts: 8356
Joined: Wed May 15, 2002 1:31 pm
Location: Gubbängen, Stockholm, Sweden
Contact:

Post by mattias »

h.264 is very well behaved when it comes to brightness and color shifts. my guess is that the export to uncompressed is where the shift happened. what codec are you using? using "none" is probably a bad idea. i'd use animation or "uncompressed". as for aac, that sounds normal. just change the sample rate first if you need a very low bitrate. there's no point at all going over 32k for web video.

/matt
wado1942
Posts: 932
Joined: Fri Dec 15, 2006 5:46 am
Location: Idaho, U.S.A.
Contact:

Post by wado1942 »

For the AAC part, the lower sample rates don't appear untill I select the lowest possible bit rate.

As for the brightness shift, the uncompressed video looks fine in Quicktime, it's only when I open the H.264 encoded file that things don't look right. And I've seen H.264 video other people encoded and they look fine so it's not on the playback side. I should also note that I'm not using any correction "filters" during the encoding process. Just opening an uncompressed file and exporting it as a compressed file. I'll try animation though, I guess I though that was an 8-bit RLE codec.
I may sound stupid, but I hide it well.
http://www.gcmstudio.com
mattias
Posts: 8356
Joined: Wed May 15, 2002 1:31 pm
Location: Gubbängen, Stockholm, Sweden
Contact:

Post by mattias »

wado1942 wrote:Just opening an uncompressed file
so you're using the "uncompressed" codec? do you have the blackmagic codecs installed? that has screwed things up for me before.

/matt
Daniel
Posts: 391
Joined: Wed Feb 05, 2003 12:17 am
Location: Chile

AVS source coding

Post by Daniel »

Hello,

... a bit non related commentary concerning H.264 and second generation coding :

the chinese digital terrestrial broadcasting standard DMB-T "China DMB-T" used on the "upper-layer" at video (and audio) source coding a comppression scheme nammed as AVS.

AVS was created in China ( http://www.avs.org.cn/en/ )

I mention here part of the interesting AVS coding official concept introduction by AVS specialist at the mentionned homepage http://www.avs.org.cn/en/ as of today 24 june 2007.


"Evolves after more than ten years, both video and audio coding technology and industrial application background had changed significantly. At present there are four optional video and audio industry coding standard: MPEG-2, MPEG-4, MPEG-4 AVC (for short AVC, also known as JVT, H.264) and AVS. The first three standards are complete by the MPEG experts group, the fourth is China independent formulation. Divides from the development phase, MPEG-2 is the first generation of information source standard, other three are the second generation of standard. Compares from main technical specification - coding efficiency: MPEG-4 is 1.4 times of MPEG-2, AVS and AVC are similar and more than twice of MPEG-2.

The outmoded technology and extortionate price of MPEG-2 will result in it withdraws from the historical arena. MPEG-4 appears the new patent permitting policy of MPEG-4 appears too harshly which makes it unable to be accepted, thereby besieged by the multitudinous business operators. As a result MPEG-4 falls into a deadlock and future is difficult to predict. AVS is China independent standard which based on homeland innovative technology and partial public technology. AVS coding efficiency is more than 2-3 time of MPEG-2, and similar with AVC. Moreover the AVS technical plan is succinct; chip is less complex. It also achieves the highest level of second generation. Moreover AVS solved the deadlock of AVC patent permission through the succinct one step permission policy. AVS is the opening national and international standard, easy to promote; In addition, AVC is only one video coding standard, but AVS is a set of integrity standard system which contains system, video, audio and media copyright management in the inside standard system also provides the more comprehensive solution for the digital video and audio industry. In summary, AVS may be one of the best choice of the second generation of source standard."






I have not seen a comparison of AVS and H.264 (that is an interesting coding) yet, but this presentation of AVS is interesting and it would great to know if some of us have already test that kind of source coding (as H.264 it is a second generation version)

bye bye and good luck from Santiago,
Daniel
wado1942
Posts: 932
Joined: Fri Dec 15, 2006 5:46 am
Location: Idaho, U.S.A.
Contact:

Post by wado1942 »

I guess I've been using the "none" in the list. I don't know how "animation" or "componant" work as far as compression goes and "uncompressed" isn't in the list. But still, the "none" video plays back perfectly in QT, it's only when it's converted to H.264 that it gets lighter.
I may sound stupid, but I hide it well.
http://www.gcmstudio.com
mattias
Posts: 8356
Joined: Wed May 15, 2002 1:31 pm
Location: Gubbängen, Stockholm, Sweden
Contact:

Post by mattias »

try animation. it's lossless compression, rle as you guessed, and it's well documented for intermediate quicktimes. uncompressed is a codec that comes with fcp and is probably not available on windows.

/matt
wado1942
Posts: 932
Joined: Fri Dec 15, 2006 5:46 am
Location: Idaho, U.S.A.
Contact:

Post by wado1942 »

I'll give it a shot, thanks.
I may sound stupid, but I hide it well.
http://www.gcmstudio.com
wado1942
Posts: 932
Joined: Fri Dec 15, 2006 5:46 am
Location: Idaho, U.S.A.
Contact:

Post by wado1942 »

OK, I tried the Animation codec and the contrast is a lot more consistant, though I find that very strange. Now here's my issue, the quality is significantly lower than the WMV codec. I'm thinking that even on the quality based encoding, it's still constant bit rate. I encoded 1 minute of video to the animation codec and from that encoded to both WMV and H.264. Audio on both was 20kbps mono, video was both 640x480 29.97fps progressive, keyframe every 90 frames. They both were about 600kbps. WMV showed some obvious signs of degradation but was watchable while the H.264 was unwatchable. If it IS constant bitrate even using the "quality" slider, how do I get variable bit rate? I tell you, windows media codec really makes it easier. You just select variable bit-rate and you can pick an average bit rate and are good to go.
I may sound stupid, but I hide it well.
http://www.gcmstudio.com
MoonstruckProductions
Posts: 291
Joined: Fri Feb 09, 2007 12:53 am
Location: Cleveland, OH
Contact:

Post by MoonstruckProductions »

What was the reason you wanted to encode h.264 in the first place? I mean, is there any reason why you can't just stick with WMV?
wado1942
Posts: 932
Joined: Fri Dec 15, 2006 5:46 am
Location: Idaho, U.S.A.
Contact:

Post by wado1942 »

I thought H.264 being a much more sophisticated codec would provide better looking results at low bitrates. As far as I know WMV still doesn't support bidirectional motion estimation and H.264 supporting up to 32 keyframe simultaneously and allowing adaptive macroblocks would in theory look much better.
I may sound stupid, but I hide it well.
http://www.gcmstudio.com
mattias
Posts: 8356
Joined: Wed May 15, 2002 1:31 pm
Location: Gubbängen, Stockholm, Sweden
Contact:

Post by mattias »

wmv and h.264 look almost exactly the same at the same bitrate. as to what went wrong in your case i don't know. what did you "optimize for" and how did you set your bitrate? i never set the quality but rely on the bitrate to figure that out.

/matt
wado1942
Posts: 932
Joined: Fri Dec 15, 2006 5:46 am
Location: Idaho, U.S.A.
Contact:

Post by wado1942 »

For my test, I optimized for download, set the quality to 30% and rendered it. I then set the average bit rate in the WMV version to the same bit rate I calculated from the MOV version. Needless to say, I can't believe MPEG-4 v3 could look better than MPEG-4 v10. I feel like I threw away $30. Quicktime is a waste of money.
I may sound stupid, but I hide it well.
http://www.gcmstudio.com
mattias
Posts: 8356
Joined: Wed May 15, 2002 1:31 pm
Location: Gubbängen, Stockholm, Sweden
Contact:

Post by mattias »

everything is a waste of money if you don't use it properly. :-)

btw quicktime is free, it's only the pro player that costs money, and the non pro version has the export option disabled. you can export using other quicktime exporters like premiere, after effects, avid, vegas (although i hear there are some bugs as you mention) without buying qt pro.

as for your settings, 30% is very low. why you got such a high bitrate at such low quality i don't know. perhaps you had a big audio stream? or you didn't have enough keyframes? if you "optimized for download" you must have set a bitrate, to what? another idea i had was whether the material was interlaced? wmv handles that but i don't think the qt h.264 does, which can really cause blockiness and otherwise lousy compression.

/matt
wado1942
Posts: 932
Joined: Fri Dec 15, 2006 5:46 am
Location: Idaho, U.S.A.
Contact:

Post by wado1942 »

I tried using "auto" for keyframing but the picture was HORRIBLE at the given bitrate so I set it to 3 seconds (90 frames). The source footage was interlaced but I deinterlaced it upon exporting to the animation codec. The audio stream was only 20kbps so that's no the issue.
I may sound stupid, but I hide it well.
http://www.gcmstudio.com
Post Reply