H264 experiment

craftech wrote on 5/4/2006, 8:37 PM
I don't know if you recall this thread from a week ago regarding WM9 rendering.
I was experimenting with H264 and wanted to compare equivalent file sizes and the resultant quality for comparison and came up with the following. This is the same clip I used in the other thread. It contains fast motion (dancers).
All files are around 9MB in size. So far I have only seen much larger examples posted here for H264 and I wanted to try something in a reasonable file size that was also challenging for the codec (faster motion). Clip is two minutes 8 seconds.

Windows Media 9

CBR of 2090 kbps. Rendered from the timeline in Vegas for comparative purposes because it is the same file size albeit at a much higher bitrate than the others and it is not H264.

H264 (mov)

Video....528 kbps 15fps ...... AAC audio 22,050 sample rate 48 kbps

H264 (avi).

Same settings as MOV version except 14.985 fps, VSSH video codec, and Mp3 audio codec.

All were 320 x 240.

Original was rendered to DV avi in Vegas first then converted to the above formats. Tried using HuffYuv - made no difference in final quality so I stuck with the DV Avi.
John

If you cannot play the files try VLC media player



Comments

Marco. wrote on 5/5/2006, 12:55 AM
The Quicktime version looks bad in my opinion. WMV version is better. But I can't watch the H.264 AVI version. In neither WindowsMediaPlayer, nor VLC player, nor Vegas 6.

Marco
craftech wrote on 5/5/2006, 3:02 AM
But I can't watch the H.264 AVI version. In neither WindowsMediaPlayer, nor VLC player, nor Vegas 6.
=========
Right click on the link. Save Target As. Download. Open VLC Player. Find it and use Quick Open and it will play.

John
Marco. wrote on 5/5/2006, 3:05 AM
It only plays sound no video. So does Vegas.

Marco
craftech wrote on 5/5/2006, 4:57 AM
It only plays sound no video. So does Vegas.

Marco
============
I have VLC media player 0.8.4a

I think I will re-render the file to try and make it more compatible. I'll post when it is changed.

Thanks,
John

Marco. wrote on 5/5/2006, 5:36 AM
Thanks for the version hint. I actually was a bit behind with version 0.7.2.

I just updated my VLC player and now it plays your .H264 file pretty fine. And what I see is the .H264 file is best of all. It's most crisp and sharp.

Where from is that VSSH video codec? Is it close to the two .H264 codecs we have in Vegas?

Marco
craftech wrote on 5/5/2006, 8:19 AM
I fixed the H264 (avi) video. It now plays in everything.

I used Super from eRightSoft. It is a multiformat converter and is free. It uses the X264 codec. If you use an avi wrapper you are given the choice of using the standard avi wrapper or the VSSH wrapper (which supposedly plays smoother in WMP).

Given the file size issue I wasn't able to achieve what the H264 codec is supposedly capable of because I wanted to leep the file size relatively low.

I re-encoded the same file using the VSSH/H264 avi wrapper using 1056 kbps and 29.87 fps like the native Wmp9 file was done and the image was much much better, but the file size jumped to 17,492 kb as opposed to the 9000 kb or so that the three above are.

If file size is not a big concern H264 seems viable.

The clip was two minutes long. J Lafferty posted a two-pass H264 around a week ago or so that looked pretty nice, but it was only clear when there was practically no motion at all and the file was 45 MB with NO AUDIO!
jlafferty wrote on 5/5/2006, 9:29 AM
I'm not sure if this affects the output, but keep in mind much of what I originally encoded was interlaced. I've shot new stuff now both with the GL1 in "Frame" mode, and got some stuff from a DVX-100a at 24p. To my eye the encodes look superb, but perhaps you and I are looking for different things.

Here are some of them to give you an idea (some are BIG):

http://go-35.com/vids/cowbell.mov

http://go-35.com/vids/bongoband_nosound.mov

http://go-35.com/vids/gypsy.mov

http://go-35.com/vids/cat.mov

- jim
craftech wrote on 5/5/2006, 10:04 AM
I'm not sure if this affects the output, but keep in mind much of what I originally encoded was interlaced
=========
I didn't notice that it affected it very much. Both the H264 with the mov wrapper and the H264 with the avi wrapper above were deinterlaced when they were encoded. They were shot interlaced.
========
Your cowbell clip was only 45 seconds long, yet it was still 11.2 MB. That was at 1141 kbps and 30 fps with little motion in the content. Of course you were also using a larger frame size than I was.

What I am trying to establish is if the H264 codec is viable to compete with WM9 for web video that contains a reasonable amount of motion. Most of these clips are much too large and suffer severely from motion blur. The parts that are relatively motionless are really clear. I would think that 4 - 5 MB per minute is a good goal with little or no motion blur. Maybe we aren't at that stage with the technology yet.

The gypsy clip was only 19 seconds and was 5 MB. Watch her hand when she rotates the handle on the instrument.

John
riredale wrote on 5/5/2006, 10:27 AM
I haven't seen the clips yet, but based on what I've read the 264 codec represents a high-water mark on the quality/filesize scale. It is supposed to be significantly better than WMV9, and perhaps better than mpeg2 by a factor of 3 or so. The downsides are supposedly that it needs more decoding horsepower and is significantly slower to encode.

The other obvious issue for Internet use is that no one is going to have the decoder preinstalled. For this reason, I am in the process of switching all my wmv9 video clips over to Flash8, since nearly all PCs have Flash of some sort or another already installed and updating to version 8 is trivial. Also, Flash video behaves very consistently across platforms. Finally Flash8 is comparable to WMV in quality/filesize.
VOGuy wrote on 5/5/2006, 10:40 AM
Here are some medium length sample tests using the most popular streaming formats:

www.hd-vo.com/stream

-Travis
jlafferty wrote on 5/5/2006, 12:23 PM
John/craftech -- math has never been my strong suit, so perhaps you or someone else can help me with this one: at 4-5mb per minute, what would my target bit rate be, per second? I rendered those files out using 2000kbps, in which case the gypsy file, for instance, there would be some number of that bandwidth preserved for audio.

I see your noted point about her hand, the sort of stuttering cadence it has taken on, by my hunch tells me that's from the GL1 more than the encode. Or were you noting something else?

Thanks for this, BTW -- I love brainstorming and getting hands dirtied with this sort of experimentation.

- jim
craftech wrote on 5/5/2006, 12:55 PM
Here are some medium length sample tests using the most popular streaming formats:

www.hd-vo.com/stream
===========
Yes, I saw these a week or so ago as well. They are around 5-6 MB per minute which isn't bad at all. The MP4 video was done at 1024 kbps and 23.97 fps, is that correct? It ended up 6 MB with a small amount of motion blur. What settings did you use?

The Flash 8 video looks terrible, but then it always does to me. I posted examples in that link to the other thread of what websites do when you give them a video file and they convert it to flash 8 for you.

Even the example you posted that you did yourself suffers from the typical blocky artifacts they all seem to have. Look at the sky in the beginning of both the Ocean flash video and the Wright Brothers flash video and you can plainly see them. That combined with the installation problems many people seem to have with flash and I wouldn't dream of giving a flash video to a client to use on their website.

The WM9 video is probably the best compromise and the smoothest playing of that bunch.


John
craftech wrote on 5/5/2006, 1:00 PM
haven't seen the clips yet, but based on what I've read the 264 codec represents a high-water mark on the quality/filesize scale. It is supposed to be significantly better than WMV9, and perhaps better than mpeg2 by a factor of 3 or so. The downsides are supposedly that it needs more decoding horsepower and is significantly slower to encode.
==============
They aren't comparing the file size to a WM9 file size. They are probably comparing it to an avi file size maybe or something similar. And one of the downsides of the format is "motion artifacts". Same with HD.
==============

Finally Flash8 is comparable to WMV in quality/filesize.

Maybe in file size, but not in quality and installation problems seem to abound with a lot of people. Flash quality looks really poor to my eyes. All versions of it.

John
craftech wrote on 5/5/2006, 1:03 PM
John/craftech -- math has never been my strong suit, so perhaps you or someone else can help me with this one: at 4-5mb per minute, what would my target bit rate be, per second?
============
Somewhere around 500 kbps. Frame rate somewhere around 15 fps.
============
I see your noted point about her hand, the sort of stuttering cadence it has taken on, by my hunch tells me that's from the GL1 more than the encode. Or were you noting something else?
==========
I would bet my life on the encode being the problem. Feed the camera tape to a television or a monitor and watch it. I'll guarantee the motion blur isn't there. And also in the silent film you posted of that girl last week I noticed a lot of blurring. When she was standing still she looked the best. Direct Show filters may also be adding to the problem on different people's computers. I tried to avoid them when I encoded the above two clips.
VOGuy wrote on 5/5/2006, 4:41 PM
Hi John/craftech.

>MP4 video was done at 1024 kbps and 23.97 fps, is that correct?<
I believe it was closer to 780 kbps. I could not get acceptible results with the .mp4 codec supplied with Vegas 6d with 1080i source. I rendered an uncompressed .avi and rendered through Quicktime. Did the same (Through Macromedia Flash) with Flash 8.

In these examples, either the picture is too large, or the data rate too slow to provide good video. This was on purpose to demonstrate the different codec delivery results. The "blocky artifacts" are there with all compression systems -- you need to determine how much "blockiness" you can tolerate in your particular situation.

I've found that the different codecs peform differently with playback on different systems. For instance, on my 3mHz single core system, Flash wins. On my notebook, .wmv looks substantially better. On my Mac ibook, Flash and .mp4 seem to be tied , but on my dual-core Mac Mini, Flash is just terrible.

I'm afraid that it's going to take a couple of years before we get some sort of decent standard, like we currently have with .mp3 for audio.

-Travis

craftech wrote on 5/6/2006, 4:12 AM
Travis,
I just tried those settings on my clip (above) bumping up the frame size to a similar one as yours and my two minute clip ended up a whopping 66 MB !!! My clip is twice the length of yours so it should be coming out to under 15 MB.
I still don't understand how you are keeping yours so small. Maybe some other settings we are unaware of? Is part of it because you used an uncompressed avi. I rendered a HuffYuv avi first. Seems unlikely.


John

Here is a really good article on the subject which is geared to the MAC. Contains some striking comparisons.
Ben1000 wrote on 5/7/2006, 3:17 PM
Hmm... This piqued my interest this week, so I decided as an experiment to encode my weekly video podcast, http://www.neo-fight.tv, wiht H.264 as well and the usual wmv, divx, and flash formats that I use.

If you're interested, you can take a look at the podcast, and see the difference between the video qualities. They all started with the same uncompressed file, and have the file sizes posted..

Best,

Benjamin


----------------------------------------------------------
http://www.neo-fight.tv <----- Have you seen it yet?
craftech wrote on 5/7/2006, 4:01 PM
http://www.neo-fight.tv <----- Have you seen it yet?
===================
That looked good. It's the motion blurring that has me concerned with this codec.

Still at slightly over 2 MB per minute it looks nice with a very reasonable file size.

How did you encode it and what were your settings?

John
VOGuy wrote on 5/7/2006, 5:20 PM
Hi Craftech.

>I still don't understand how you are keeping yours so small. Maybe some other settings we are unaware of?<

It's been awhile since I encoded it, but here's what I remember.

First my "uncompressed" file render was 1280x720 24fps. I always use 24 fps rather than 60i/30 for internet "streaming" because the stream rate is lower. I loaded that into Quicktime and in "export", chose keyframe every 120 frames. I experimented (trial and error) with the "data rate" setting to get it to come close to the other flies in size.

That was pretty much it.

Oh... Audio was set for 96kbps.

Good Luck,

-Travis