Editing with h.264 lossless? Someone tried it?

This forum is for video and audio help and discussion.

Editing with h.264 lossless? Someone tried it?

Postby Bauzi » Mon Aug 17, 2009 5:06 am

Hey there,

I read the guide about the new version of zarxGUI and it mentions a lossless mode for h.264 which turns it in theory into an editing codec like Lagarith or HuffYUV. Sadly I don't have the time to test this function so I would like to ask you:

Did somebody of you tried it before? What are the (dis)advantages of editing with h.264 lossless? :|
Image
Image
User avatar
Bauzi
 
Joined: 21 May 2004
Location: Austria (uhm the other country without kangaroos^^)
Status: Under High Voltage

Re: Editing with h.264 lossless? Someone tried it?

Postby mirkosp » Mon Aug 17, 2009 6:37 am

Here's the thing: premiere can take mp4 directly, but even if it's with a 1.0 par, it fucks the resolution. So in my experience, you save the lossless x264 and then load it through avisynth. It's still all keyframes so it will be fast (if you have a pc fast enough, otherwise the editing speed compared with huffyuv and lagarith might be noticeable), but you'll have to go through the avisynth step to make sure the AR will be correct. Aside from that, I'd say go for it.

One thing though: lossless x264 is only when the crf (or qp) is set to 0. The option in the zarxgui just makes all frames key-frames, so my suggestion is lowering the constant quality value to 10 or less, to make sure that the quality loss due to the compression won't be there.
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Editing with h.264 lossless? Someone tried it?

Postby Bauzi » Tue Nov 03, 2009 5:31 am

I think I'll try it.

I use this script:
Code: Select all
"C:\Program Files (x86)\Zarx264gui\x264.exe" [b]--crf 0[/b] --ref 12 --mixed-refs --b-adapt 2 --bframes 5 --b-pyramid --weightb --direct auto --subme 9 --trellis 1 --8x8dct --me umh --progress --aq-strength 1 --psy-rd 0:0 --threads auto --fps 25/1 --output "D:\Videos\Anime\Berserk\Berserk #01-temp.264" "D:\Videos\Anime\Berserk\Berserk #01.avs"
"C:\Program Files (x86)\Zarx264gui\MP4Box.exe" -fps 25 -add "D:\Videos\Anime\Berserk\Berserk #01-temp.264" -new "D:\Videos\Anime\Berserk\Berserk #01.mp4"


So this should result in a lossless edit-friendly file?
Image
Image
User avatar
Bauzi
 
Joined: 21 May 2004
Location: Austria (uhm the other country without kangaroos^^)
Status: Under High Voltage

Re: Editing with h.264 lossless? Someone tried it?

Postby Athena » Tue Nov 03, 2009 9:39 am

I've done it on mac. I don't notice any difference, so I stick with HUFFYUV.
Image
User avatar
Athena
I ♥ the 80's
 
Joined: 02 Mar 2001
Location: Japan
Status: Sad Girl on Mac

Re: Editing with h.264 lossless? Someone tried it?

Postby Bauzi » Tue Nov 03, 2009 10:29 am

Kionon wrote:I've done it on mac. I don't notice any difference, so I stick with HUFFYUV.

eh... and why do you exactly stick with HUFFYUV? I mean h.264 has lower filesizes, right? :|
I know that compatibility can be a good reason, though.
Image
Image
User avatar
Bauzi
 
Joined: 21 May 2004
Location: Austria (uhm the other country without kangaroos^^)
Status: Under High Voltage

Re: Editing with h.264 lossless? Someone tried it?

Postby mirkosp » Tue Nov 03, 2009 6:43 pm

I did some more experiments. Crf or qp 0 will results in less than a gigabyte saved compared to the lagarith YV12. HOWEVER! crf 10 with keyint 1 will result in a fifth of the filesize of the YV12 lagarith without any quality loss. I actually didn't check the SSIM of the output but it does look like a perfect copy of the original to me.

So I guess that --crf 10 --keyint 1 is what you need to get an effective gain. However it will *technically* not be lossless anymore, albeit I'd say the difference is really unnoticeable, if existing.
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Editing with h.264 lossless? Someone tried it?

Postby Bauzi » Tue Nov 03, 2009 7:36 pm

So I guess I will stick with 1 or 5 for now.... but I guess I will stay with 1, because there might be a lot of post-processing for my current project.
Image
Image
User avatar
Bauzi
 
Joined: 21 May 2004
Location: Austria (uhm the other country without kangaroos^^)
Status: Under High Voltage

Re: Editing with h.264 lossless? Someone tried it?

Postby Qyot27 » Wed Nov 04, 2009 12:52 am

Bauzi wrote:I think I'll try it.

I use this script:
Code: Select all
"C:\Program Files (x86)\Zarx264gui\x264.exe" [b]--crf 0[/b] --ref 12 --mixed-refs --b-adapt 2 --bframes 5 --b-pyramid --weightb --direct auto --subme 9 --trellis 1 --8x8dct --me umh --progress --aq-strength 1 --psy-rd 0:0 --threads auto --fps 25/1 --output "D:\Videos\Anime\Berserk\Berserk #01-temp.264" "D:\Videos\Anime\Berserk\Berserk #01.avs"
"C:\Program Files (x86)\Zarx264gui\MP4Box.exe" -fps 25 -add "D:\Videos\Anime\Berserk\Berserk #01-temp.264" -new "D:\Videos\Anime\Berserk\Berserk #01.mp4"


So this should result in a lossless edit-friendly file?

No it won't - B-frames (especially B-pyramid), and maybe even reference frames (surely mixed-refs would) will mess with accuracy. And I don't think it matters what container it's in, and whether the container properly handles those features - those options are for distribution, and should remain for distribution copies, even if NLEs have improved support for such streams nowadays.

To me, speed (as in, during editing - not the conversion process) matters over size. And as far as that goes, you'll probably be hard pressed to find something faster than HuffYUV or ffvhuff or Lagarith (it depends on multithreading). Or FFV1, if you prefer to avoid some of Lagarith's rendering problems.


You might want to update x264, though - some of those options are no longer even used.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs


Return to Video & Audio Help

Who is online

Users browsing this forum: No registered users and 1 guest