Editing with h.264 lossless? Someone tried it?

Locked
User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Editing with h.264 lossless? Someone tried it?

Post by 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? :|
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

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

Post by 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
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

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

Post by 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?
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
Kionon
I ♥ the 80's
Joined: Fri Mar 02, 2001 10:13 pm
Status: Ayukawa MODoka.
Location: I wonder if you know how they live in Tokyo... DRIFT, DRIFT, DRIFT
Contact:
Org Profile

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

Post by Kionon » Tue Nov 03, 2009 9:39 am

I've done it on mac. I don't notice any difference, so I stick with HUFFYUV.
ImageImage
That YouTube Thing.

User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

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

Post by 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.
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

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

Post by 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
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

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

Post by 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.
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

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

Post by 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

Locked

Return to “Video & Audio Help”