DV Info Net

DV Info Net (https://www.dvinfo.net/forum/)
-   CineForm Software Showcase (https://www.dvinfo.net/forum/cineform-software-showcase/)
-   -   Cineform.mov -> Quicktime Pro -> H.264? (https://www.dvinfo.net/forum/cineform-software-showcase/124430-cineform-mov-quicktime-pro-h-264-a.html)

Steven White June 23rd, 2008 10:40 PM

Cineform.mov -> Quicktime Pro -> H.264?
 
I'm trying to compress some 1080p23.976 Cineform files to H.264. While the results from Premiere Pro CS3 are okay, it's only 1-pass CBR encoding, and I would like to get file sizes lower.

When I input the Cineform file into Quicktime Pro, it plays okay, but when I try to output to an H.264 file, Quicktime generates some sort of really weird magenta-black blown out contour map. It seems to really dislike the Cineform files.

Is there any way to make Cineform.mov files compatible with the Quicktime Pro compressor?

Also, the Cineform file does not appear with the correct 1.33 pixel aspect ratio in the Quicktime Player.

Thanks,
-Steve

David Taylor June 24th, 2008 07:22 AM

We have a new Mac codec build coming. Send me a PM and I can send you a link to the Beta. Let's see if that helps with Compressor.

Steven White June 24th, 2008 11:45 AM

To clarify, I'm running all this on a Core2Duo T7400 laptop with Vista Business 32-bit,
Premiere Pro CS3, AspectHD 5.3.1.169, and Quicktime Pro 7.5(861). David informed me that the Mac codec build won't work for this, so I'll outline the problem further.

I've got a 6-minute Cineform 1080p24 project that I'm targeting for web delivery in HD formats. Basically I'm trying to make an H.264 encoded *.mov file to distribute via online downloading, with a data-rate and quality comparable to or better than the Apple Movie Trailers.

I figure in order to do this, I need at least a VBR 2-pass encoder. The Adobe Media Encoder (AME) in CS3 can do H.264 into Quicktime, but only as a CBR encode. The results are okay, but not stellar. If I use the H.264 encoder above the Blu-Ray options in AME, the resulting file is lower in quality for the bitrate, and I have trouble with playback.

Quicktime Player Pro (the Pro version of the Quicktime Player) can do 2-pass VBR H.264 encodes, which have the advantage of being compatible with Quicktime. When I bring Cineform files into the Quicktime player, they play fine. However, when I try to export the files using the Export options in Quicktime Player Pro the resulting file is enormous, and the video looks like weird white-magenta-black-noisy contour map.

One solution is to render the Cineform file to a lossless codec like PNG or "None" in the *.mov container. However, when I try to compress these with Quicktime, I get what look like deinterlacing artefacts (jaggies), that make no sense from the progressive material, and which aren't produced with the AME CBR H.264 *.mov output.

I'm now starting to look at the x264 encoding package with MediaCoder (http://www.mediacoderhq.com/index.htm) as an option, with the hopes that I can match a 3-pass encode to the Apple H.264 implementation.

Perhaps my expectations are unrealistic. I'm comparing 7-10 Mbps CBR H.264 Quicktimes with a Cineform 1080p file, and trying to get as little loss and macroblocking as possible. Still, I'm frustrated because the source material was only 25 Mbps long-GOP MPEG-2.

Any suggestions/tried and true workflows?

-Steve

Richard Leadbetter June 24th, 2008 12:05 PM

There is a tried and tested solution, but it is not for novices.

Get hold of the MeGUI package and use x264 with its Quicktime-compatible profile.

Advantages:

1. You'll be using one of the best h.264 encoders around right now
2. The encoding is far superior than Quicktime Pro
3. It's free

Disadvantages:

1. You'll need some knowledge of the AviSynth scripting language (so make sure you have AviSynth 2.5.7 installed, again open source).

But the disadvantage isn't that difficult to overcome. Assuming you have a CineForm AVI, just make this script in notepad:

AVISource("c:\your-avi-here.avi")
ConvertToYV12()

Save as script.avs (don't save as a text file) and then input that into MeGUI for the video and audio.

It'll take a bit of getting used to, but believe me, the results are worth it. More than that, if you are using streaming video via Flash, you can forego the limited Quicktime version of h.264 and use the higher profiles. It's a shame that Quicktime is the de facto standard for web h.264 as it's actually a hobbled implementation. At least the Flash decoder is standards-compliant.

Steven White June 24th, 2008 01:03 PM

Thanks Richard.

I've been looking into x264, but have been having trouble finding comprehensive installation instructions and documentation. Slowly stuff is coming together.

I think I'll try both the Quicktime profiles and the higher quality ones just to see how far I can go.

-Steve

Simon Zimmer July 18th, 2008 08:34 AM

Hi Steven,

Did you ever get the Quicktime solution to work with MeGUI and quicktime profiles?

I would like to do something similar but I am new to avisynth and MeGUI.

I did get everything setup and was thinking of just using Debug frameserver from PPSC3 to MeGUI.

I am just not sure which profile to use, there are so many. And there are so many settings so I am not quite sure yet what to change or if I need to change anything once the profile is chosen.

Any help would be appreciated.

Thanks,

Simon
p.s.
If you know of a good tutorial that would be great.

Steven White July 18th, 2008 11:01 AM

Hi Simon,

Ultimately I gave up on Quicktime. Apple's implementation of H.264 was far to buggy to get a high quality encode that played back well. When I did get encodes that could playback, they were plagued by infamous Quicktime gamma issues, which could be fixed by disabling hardware acceleration, but also slowed playback. I also had trouble getting Quicktime encodes that didn't show macroblocking.

Instead, I had tremendous success with Richard's script in avi-synth as well as MeGUI for creating high quality mp4 files. I used the "HQ-Slowest" or "HQ-Insane" options just to get the most for my bitrate. The *.mp4 files play well in VLC, and brilliantly in open-source flash players for streaming. Since the flash players don't require much of an install, and the user base is far larger than Quicktime or Windows Media Player, I was pretty happy with the distribution option.

I never found a good tutorial, and had to piece it all together painfully. I lost some sleep, but was happy with the results. You can see the files here if you're curious what kind of quality I got out of it.

Bandwidth isn't a problem for me since the movie is only 6 minutes. Eventually I'll probably upload a Blu-Ray and a DVD iso too.

-Steve

Simon Zimmer July 18th, 2008 03:20 PM

Interesting.

Thanks for the response.

I found a good tutorial at:

http://www.dvxuser.com/V6/showthread.php?t=90118


I will try it out now and see what results I get. I will also try the profiles you mentioned.

Thanks again and have a good weekend.

Simon

Richard Leadbetter July 18th, 2008 06:10 PM

Good to see that the word is spreading about x264. here's an example of one of my encodes, made with the HQ-Insane profile.

Video game footage with its aliased edges is far harder to compress than 'real life' camera stuff. The vid above uses bandwidth of just 1.1mbps and runs at 728x544 - basically DVD resolution.

With Flash you can also specify the output dimensions of the video, so no problem with anamorphic pixels for more bandwidth-saving.

The only problem with going for the advanced option like this is that while you get superb quality, it's not compatible with Quicktime's very limited interpretation of h.264.

Simon Zimmer July 19th, 2008 07:28 AM

"it's not compatible with Quicktime's very limited interpretation of h.264. "

Does that mean if someone downloaded the H.264 file and used the latest Quicktime to watch the H.264 movie, the quality would not be as super as if they watched it through JW Player (flash video player)? Or does that mean it would not run? Please explain so I can understand this better.

Thanks for helping out a newbie.

Simon

Richard Leadbetter July 19th, 2008 07:36 AM

It wouldn't open at all. There's a lot of conjecture about the whys and wherefores, but basically Quicktime is not a fully compliant h.264 decoder. It's missing many of the compression technologies that make it such a fantastic codec. By extension then, the encoder is basically pretty poor too.

It's a good thing that Flash has a fully featured decoder, but it's based off code by Mainconcept so is hardly optimal compared to CoreAVC, but it seems to playback my stuff with little issue.

Simon Zimmer July 19th, 2008 09:52 AM

Hi Richard,

My first test was good. I used the x264:CE-QuickTime profile. Great quality but I forgot to use square pixels. The input file was 1440x1080 (1.33). The output is for 640x480.

Where can I add square pixels in MeGUI?

Thanks,

Simon

Richard Leadbetter July 20th, 2008 12:51 AM

Quote:

Originally Posted by Simon Zimmer (Post 909512)
Hi Richard,

My first test was good. I used the x264:CE-QuickTime profile. Great quality but I forgot to use square pixels. The input file was 1440x1080 (1.33). The output is for 640x480.

Where can I add square pixels in MeGUI?

Thanks,

Simon

You specify aspect ratio on the pop-up window when you first import your Avisynth script. 640x480 will be 4:3.

Simon Zimmer July 20th, 2008 07:25 PM

hmmm!

I did not see that pop up window. :(

Another forum told me to use crop or letterbox but I have not gotten that to work yet either.

Here is my avisynth code if that helps:

AVISource("J:\Aguayuda.avi", audio=false)
edeintted = last.AssumeTFF().SeparateFields().SelectEven().EED I2(field=-1)
TDeint(order=1,full=false,edeint=edeintted)
LanczosResize(640,480) # Lanczos (Sharp)
#denoise

ConvertToYV12()

I am sure the solution is simple, I just can't figure it out.

Simon

Rob Johnson March 8th, 2009 04:06 PM

Quote:

Originally Posted by Richard Leadbetter (Post 897875)
There is a tried and tested solution, but it is not for novices.

Get hold of the MeGUI package and use x264 with its Quicktime-compatible profile.

Advantages:

1. You'll be using one of the best h.264 encoders around right now
2. The encoding is far superior than Quicktime Pro
3. It's free

Disadvantages:

1. You'll need some knowledge of the AviSynth scripting language (so make sure you have AviSynth 2.5.7 installed, again open source).

But the disadvantage isn't that difficult to overcome. Assuming you have a CineForm AVI, just make this script in notepad:

AVISource("c:\your-avi-here.avi")
ConvertToYV12()

Save as script.avs (don't save as a text file) and then input that into MeGUI for the video and audio.

It'll take a bit of getting used to, but believe me, the results are worth it. More than that, if you are using streaming video via Flash, you can forego the limited Quicktime version of h.264 and use the higher profiles. It's a shame that Quicktime is the de facto standard for web h.264 as it's actually a hobbled implementation. At least the Flash decoder is standards-compliant.


Wow! I never knew how substandard Quicktime was compared to AVISynth. I just discovered this thread (and AVISynth).

I tried your suggestion Richard. I downloaded it and MeGUI and gave it a whirl. No comparison! It beats Quicktime hands down. And no more of that dreaded gamma boost either which washes everything out. Much better quality for the same bitrate. - And WHY is this nice little program not THE standard for H.264 compression?? - I also downloaded RipBot264 which seems to suit my tastes a little better as a GUI for AVISynth (I know nothing about AVISynth scripting as I've just discovered it, or I should say, actually tried it out since I heard of the program a few years ago).

Just one question. What type of AVI file formats does AVISynth understand? Some seem to encode nicely where others (via RipBot264) will give me an error. Something like, "can not understand 'audio' in Line 1.... yada yada." What is the best thing to feed it? I'm exporting out of PPro so I'm somewhat limited in choice of AVI formats.

Richard Leadbetter March 9th, 2009 10:18 AM

AviSynth should be able to work with any AVI codec installed on your machine. I've used it with CineForm, Huffyuv, AMV codec and UT Codec Pack for HD work. AMV and UT Codec Pack are essentially next generation Huffyuv counterparts coded by competing Japanese coders and are lovely.

Glad you're another x264 convert! Apparently the new Mainconcept h264 SDK is very good, but x264 is free and it's frankly astonishing. What's more it just gets better and better. A lot of people do use it. For example, YouTube uses it for its HD encoding.

Rob Johnson March 14th, 2009 09:26 PM

Hey Richard, I am frankly shocked at how much better AVISynth is than Quicktime. And to think I stumbled upon this thread purely by accident. Good things happen!

I found that by exporting out of PPro to a YV12 format via ffdshow, I get excellent results (the AVISynth website seems to talk a lot about YV12) when encoding with AVISynth. The results are this. The test is an 11 minute home video shot by an "amature" in HD AVCHD format (Sony Camcorder). It has a TON of movement and shakiness in it, hence the relatively large file sizes. I first exported out of PPro to YV12. Using Quicktime I encoded an 11 minute h264 file (640x360) that required 180 MBs of size to be visually indistinguishable from the original. It did have the expected gamma boost or "white wash" effect. - Using AVISynth, at half the bitrate, I was able to encode the same video to an x264 file size (640x360) of only 89 MBs, no white wash, and it is visually as good as if not BETTER than the Quicktime encoded video. Half the file size, half the bitrate... that is impressive!

I don't know if this is a fringe benefit but the video will play in Quicktime player as well, so as to be more compatible with mostly Quicktime enabled web browsers. I'm impressed, I'm SOLD!


All times are GMT -6. The time now is 12:39 PM.

DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network