Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Display Modes
Old 10th January 2026, 23:54   #1  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,783
Temporary lossless format for 10-bit video, with good random access?

I'm trying to work with some HDR video files which I only need small snippets from. I've gathered the snippets together with a single .avs file and now I want to encode the output to a file that I can read reasonably quickly.

FFV1 seemed like a good/only choice, as it's a lossless intraframe codec with 10-bit support. So I used ffmpeg to encode an .avi file (I think I tried .mp4 first but some error came up).

I can open this file with ffmpegsource2 or BSSource (I shouldn't need the latter's frame accuracy guarantee, since it's an AVI file with an infraframe codec). It's a little slow - 12fps or so - but the bigger problem is that it's very slow to seek backwards and for random access.

Does anyone know why this might be the case - it's an intra-frame codec so shouldn't reading a random frame be just as fast as reading the next frame? - and what a better option might be?
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 10th January 2026 at 23:59.
wonkey_monkey is offline   Reply With Quote
Old 11th January 2026, 18:04   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,361
There's always the good old HuffYUV which is all intra, supports up to 16bit planar, and should be reasonably fast to seek. That's what I use all the time.

PQ HuffYUV:
Quote:
ffmpeg.exe -hide_banner -i "AVS Script.avs" -vcodec ffvhuff -color_range 1 -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc -c:a pcm_s32le -ar 48000 -y "output.mov"

pause
HLG HuffYUV:
Quote:
ffmpeg.exe -hide_banner -i "AVS Script.avs" -vcodec ffvhuff -color_range 1 -color_primaries bt2020 -color_trc arib-std-b67 -colorspace bt2020nc -c:a pcm_s32le -ar 48000 -y "output.mov"

pause
UTVideo also used to be good and I've used it in the past, although I decided to stick with HuffYUV.

There are other alternatives too, of course, like x264 and x265 using the lossless mode, however I always found them harder / heavier to decode.

Otherwise, if you just want a lossless uncompressed 10bit output there's v210 but keep in mind that a 720x576 25i TFF SD file is like 220 Mbit/s if I remember correctly, so for UHD it would be huge and at that point you're gonna be slowed down by the network (if it's an SMB Share):

PQ v210:
Quote:
ffmpeg.exe -hide_banner -i "AVS Script.avs" -vcodec v210 -color_range 1 -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc -c:a pcm_s32le -ar 48000 -y "output.mov"

pause
HLG v210:

Quote:
ffmpeg.exe -hide_banner -i "AVS Script.avs" -vcodec v210 -color_range 1 -color_primaries bt2020 -color_trc arib-std-b67 -colorspace bt2020nc -c:a pcm_s32le -ar 48000 -y "output.mov"

pause
FranceBB is offline   Reply With Quote
Old 11th January 2026, 18:31   #3  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,389
Out of interest... How well does HEVC lossless perform when set to 10 or even 12-bit mode?

In 10-bit mode you can even play the encodes on a smart TV that supports HEVC...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 11th January 2026, 18:38   #4  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 3,064
Well, you can play with nvenc lossless too if you have a nvidia card.

Pros: it's really fast
Cons: it's not as efficient as other cpu based codecs
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 11th January 2026, 22:04   #5  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,783
Well HuffyUV at least doesn't seem to suffer, at least not as badly, from the same slow random/reverse access as FFV1, though I'm still not sure why FFV1 should do so. Looks like it'll be about twice the size of FFV1 though.

I didn't think UTVideo supported >8 bit.

v210 is slightly slower backwards than forwards. 16Gb for 30 seconds, and I need 5m45s I do have the space, for now.

HuffyUV is giving me 70fps (forwards, anyway) vs 20fps for v210 though. Guess it's a disc bottleneck, even though it's a USB3 SSD. Edit: oops, no, it's the internal SATA III SSD.

Is there a particular reason to favour a .mov container?
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 11th January 2026 at 22:27.
wonkey_monkey is offline   Reply With Quote
Old 11th January 2026, 22:27   #6  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,361
Quote:
Originally Posted by SeeMoreDigital View Post
Out of interest... How well does HEVC lossless perform when set to 10 or even 12-bit mode?
Well, I didn't do UHD progressive stuff with x265 in lossless mode, but I did SD interlaced and it performed pretty poorly, which is not surprising given that nearly no optimization went into it as the use-case was almost non existent. https://forum.doom9.org/showthread.php?t=185461


A snippet from my own post from 2024:

Quote:
Originally Posted by FranceBB View Post
Duration: 2h and 7 minutes
Video Codec: v210 720x576 25i TFF 4:2:2 BT601 10bit planar
Audio Codec: 1 track 4ch PCM 24bit 48000Hz
Container: avi

Lossless Encoding candidates:

- UTVideo 720x576 25i TFF 4:2:2 BT601 10bit planar
- H.264 720x576 25i TFF 4:2:2 BT601 10bit planar
- H.265 720x576 25i TFF 4:2:2 BT601 10bit planar
- FFV1 720x576 25i TFF 4:2:2 BT601 10bit planar
- HuffYUV 720x576 25i TFF 4:2:2 BT601 10bit planar

Output (from bigger to smaller):

0) v210 332 Mbit/s (315 GB)
1) HuffYUV 99 Mbit/s (97 GB)
2) H.265 72 Mbit/s (71 GB)
3) H.264 64 Mbit/s (65 GB)
4) UTVideo 54 Mbit/s (56 GB)
5) FFV1 37 Mbit/s (39 GB)

Yes, you read that right, H.265 performs worse than H.264 in lossless mode with interlaced contents, but both were better than HuffYUV.

Quote:
Originally Posted by wonkey_monkey View Post
I didn't think UTVideo supported >8 bit.
Oh, it definitely does as long as it's YUV 4:2:2, not sure about other sampling, though.

Quote:
Originally Posted by wonkey_monkey View Post
HuffyUV is giving me 70fps (forwards, anyway) vs 20fps for v210 though. Guess it's a disc bottleneck, even though it's a USB3 SSD.
You're lucky it's a locally attached SSD, imagine doing it via an SMB Share xD

Anyway, I don't really use v210 for anything other than SD.

Quote:
Originally Posted by wonkey_monkey View Post
Is there a particular reason to favour a .mov container?
Nah, you can use anything you want. Even .mkv would work fine when it's a matter of opening it with other open source stuff, but if you have to send it somewhere ideally .mov is probably the least painful option that still allows people to decode it. You could very well create an .avi, but the problem with an .avi container is that it won't preserve metadata, I'm not talking about MaxCLL/MaxFALL, I'm talking about even basic stuff like colormatrix, transfer, primaries and range which is a bit of a problem with HDR.
FranceBB is offline   Reply With Quote
Old 11th January 2026, 23:35   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,385
There is also MagicYUV [MagicYUV_v1.2_win-rev2.exe free, later paid {Trialware $10}],
https://www.videohelp.com/software/M...n=Lf32QdtLXHSD
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; Yesterday at 02:44.
StainlessS is offline   Reply With Quote
Old Yesterday, 06:15   #8  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 2,029
For mezzanines I am daily throwing around 4k50/59.94p apch .mov encoded by FFMPEG (10bit 422HQ)
Can be handled quite universely, MPC-BE, MPC-HC, Subtitle Edit, VD, VD2, Topaz, Vegas Pro 13/14/15/16.
I used to use MagicYUV Ultimate often as well, but apch .mov was more widely accepted.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; Yesterday at 07:23.
Emulgator is offline   Reply With Quote
Old Yesterday, 07:57   #9  |  Link
pbristow
Registered User
 
pbristow's Avatar
 
Join Date: Jun 2009
Location: UK
Posts: 269
I just had to to look up what apch meant... Apparently it's "Adobe Prores (something something)", and the first half-dozen search hits are all from people having difficulties with playing it. This link, though, gives a hint as to why that might be:
https://discussions.apple.com/thread...69?sortBy=rank

So... It's basically Adobe's custom variation of an otherwise standard container format (.mov), which could contain absolutely anything... But as long as whatever data stream you stuff into it is universally readable, it shouldn't cause problems... Except that someone at Microsoft seems not to have got that message, and is making their software spit out "apch format not supported" messages, when the problem is more likely to be whatever codec was used for the stream inside. =:o\

Thanks for the educational diversion! =:o}
pbristow is offline   Reply With Quote
Old Yesterday, 09:01   #10  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,389
Quote:
Originally Posted by FranceBB View Post
Yes, you read that right, H.265 performs worse than H.264 in lossless mode with interlaced contents, but both were better than HuffYUV.
.
I see... But you only tested interlaced SD content
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old Yesterday, 09:05   #11  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 859
FFV1 is an inter-frame codec/encoder

Note: I'm just assuming from the fact that it has keyframe and non-key-frame... and no frame level multithread.
FFmpeg does claim it to be an intra-frame codec.
https://github.com/FFmpeg/FFV1?tab=r...e#introduction

Last edited by Z2697; Yesterday at 09:25.
Z2697 is offline   Reply With Quote
Old Yesterday, 09:09   #12  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 859
Quote:
Originally Posted by FranceBB View Post
There are other alternatives too, of course, like x264 and x265 using the lossless mode, however I always found them harder / heavier to decode.
CABAC can be hard on computation when there's a lot of data going through it.
With HEVC you don't have a choice, but using CAVLC with AVC makes it way faster, not without the decreased compression ratio of course.

(With lower bitrates the cost of CABAC is usually small enough and masked by costs of other components)

And what's the setting of that size comparison? You might given FFV1 unfair favor if you compare it with intra-only AVC.

Last edited by Z2697; Yesterday at 09:16.
Z2697 is offline   Reply With Quote
Old Yesterday, 17:13   #13  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,783
You might want to consider "visually lossless" codecs. They eliminate the performance (and also size) problems. Way back when, Cineform was the codec most people used. I have gotten a little out of date, but Cineform still works for my uses and I think you may be able to still download it for free from the GoPro site (it used to cost close to $1,000). A quick search suggests that people now often use ProRes with one of its high profile settings.

I seldom use a truly lossless codec because I don't see any advantages over a visually lossless codec. I say that having spent hours doing A/B tests between the original and the lossy compressed versions, using the high quality settings. I could never detect any differences.
johnmeyer is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.