Log in

View Full Version : Encoding lagarith from the commandline


Foofaraw
29th July 2012, 23:43
Could somebody suggest a 64bit compatible way of encoding a file to lagarith from the command line?

Like ffmpeg would be good, but it doesn't encode, it only decodes.
Preferably an exe/bat file (and not scripts or avisynth)

Atak_Snajpera
30th July 2012, 18:51
why do you need lagarith?
ffv1 offers similar compression efficiency and it is available in ffmpeg

SassBot
30th July 2012, 18:59
Maybe because Lagarith is faster to decode than FFV1?

Foofaraw
30th July 2012, 20:38
why do you need lagarith?
ffv1 offers similar compression efficiency and it is available in ffmpeg


Does it compress as good? I've heard lagarith is a far better.

However I also need something with a directshow codec (that works on 64 bit Windows 7) - lagarith has that, does ffv1?

Foofaraw
30th July 2012, 20:39
Maybe because Lagarith is faster to decode than FFV1?

That too :)

spawnbsd
30th July 2012, 23:31
Does it compress as good? I've heard lagarith is a far better.

No, using FFV1 with arithmetic coding (-coder ac) is much better compression than Lagarith; though as mentioned the decode speed is far worse.

mastrboy
31st July 2012, 00:58
One way i can think of is saving virtual dub processing settings and loading them via the command line for vdub.exe, but can't say for sure this will work with 64bit though... And virtualdub can't save/encode to any other container than avi, so a remux would be needed later if that is not your wanted container.

Foofaraw
31st July 2012, 03:12
No, using FFV1 with arithmetic coding (-coder ac) is much better compression than Lagarith; though as mentioned the decode speed is far worse.

Ok, might try it if there is a directshow interface.

One way i can think of is saving virtual dub processing settings and loading them via the command line for vdub.exe, but can't say for sure this will work with 64bit though... And virtualdub can't save/encode to any other container than avi, so a remux would be needed later if that is not your wanted container.

Yeah, that seems to work. And avi is fine for now :)

Foofaraw
31st July 2012, 03:20
Btw, for those who know: Can FFV1 be destructive depending on arguments, or is it always lossless ?

Atak_Snajpera
31st July 2012, 10:01
ffv1 is lossless obviously. it is also available via ffdshow (encoder and decoder)

Foofaraw
31st July 2012, 17:00
ffv1 is lossless obviously.

Huffy is obviously lossless, but has a setting that can make it lossy. So there is nothing obvious about anything. Especially since there seems to be 50 different settings


it is also available via ffdshow (encoder and decoder)

Indeed, and its output crashes Media Player Classic.
But the files do seem small :)

Atak_Snajpera
31st July 2012, 17:44
So there is nothing obvious about anything. Especially since there seems to be 50 different settings
where do you see those 50 different settings??? Lossless is lossless. Period.
http://i.imgur.com/JRVkN.png

Indeed, and its output crashes Media Player Classic.
it does not crash on my machine. Tested on 1920x1080 24fps source

SassBot
31st July 2012, 17:53
Lossless is lossless. Period.

That's easily falsified. Choose a colorspace that involves color subsampling the input and it's no longer lossless. Either way, his question had to do with if there were settings to make the codec lossy to improve compression. All you had to say was "no".

Atak_Snajpera
31st July 2012, 18:08
That's easily falsified. Choose a colorspace that involves color subsampling the input and it's no longer lossless.
most sources is already 4:2:0 so default colorspace YV12 won't hurt quality. Unless he is pro and he has access to 4:2:2 footage.

Foofaraw
31st July 2012, 18:10
That's easily falsified. Choose a colorspace that involves color subsampling the input and it's no longer lossless. Either way, his question had to do with if there were settings to make the codec lossy to improve compression. All you had to say was "no".

Could you suggest to me what would be a good colorspace to use?

It supports YV12,444P,422P,411P,410P,RGB32, but I take it from your reply that none of those colorspaces use subsampling. What is the difference?

Also, for "Coder Type" spawnbsd suggested AC (VLC seems grainy) ?
"Context Model" small or large?

Also, are there resolution limits?

Atak_Snajpera
31st July 2012, 18:12
Could you suggest to me what would be a good colorspace to use?
the same as source

Also, for "Coder Type" spawnbsd suggested AC (VLC seems grainy) ?
AC offers slightly higher compression but it will be slower obviously

"Context Model" small or large?
small is faster but large may offer higher compression. Your choice.

Taurus
31st July 2012, 18:17
Indeed, and its output crashes Media Player Classic.

Just tested: ffdshow ffvh and ffv1 are working stable.
And no crashes in MPC HC.
Somethings burked on your side.

SassBot
31st July 2012, 20:01
most sources is already 4:2:0 so default colorspace YV12 won't hurt quality. Unless he is pro and he has access to 4:2:2 footage.

Not if he's using this for lossless of encoding screen capture footage or the output of a capture card that can be in YUY2. You presume his source is YV12 to begin with but that may not be the case.

Could you suggest to me what would be a good colorspace to use?

It supports YV12,444P,422P,411P,410P,RGB32, but I take it from your reply that none of those colorspaces use subsampling. What is the difference?

What is the source of your input file?

Foofaraw
31st July 2012, 22:09
Just tested: ffdshow ffvh and ffv1 are working stable.
And no crashes in MPC HC.
Somethings burked on your side.

Plays fine in Windows Media Player, VLC, VirtualDub




What is the source of your input file?

It varies. It can be 3d rendered (no settings for color space), it can be camcorder, and sometimes external sources (don't know what space they might be in)

I might add that ultra high commercial quality is not required - as long as it looks sensible on a TV via HDMI its probably fine :)

I tried running something through vdub and it says input was YUV420 and output became RGB888 - i couldn't really tell the difference.

Bloax
1st August 2012, 09:09
I tried running something through vdub and it says input was YUV420 and output became RGB888 - i couldn't really tell the difference.
That's because RGB24 is a fully precise colorspace (if we're talking 8-bit anyways).

The input format (YUV420/YV12) has a halved color resolution, for example. You won't see a difference going from YV12->RGB24, but you might be able to spot the difference in RGB24->YV12.

Atak_Snajpera
1st August 2012, 10:41
Boy, you seriously need some attitude adjustment. You sound like an angry teen who just hit puberty.
Get used to it. Period ;)

Foofaraw
1st August 2012, 15:09
That's because RGB24 is a fully precise colorspace (if we're talking 8-bit anyways).

The input format (YUV420/YV12) has a halved color resolution, for example. You won't see a difference going from YV12->RGB24, but you might be able to spot the difference in RGB24->YV12.

Ah, that makes sense. Thanks :)

Foofaraw
2nd August 2012, 23:34
Though it does sound to me like YUV420/YV12 is a lossy colorspace.

Bloax
3rd August 2012, 01:16
"Has a halved color resolution".

Halved means half the information is lost, uh huh?

YUY2 (YV422?) Only has a halved horizontally color resolution, but I can't really recall.

vivan
3rd August 2012, 08:14
Colorspace can't be "lossy". Conversion is.

Halved means half the information is lost, uh huh?If it was there in the first place.
It's like saying that 720p is "lossy resolution", because it's smaller than 1080p.

Foofaraw
9th August 2012, 01:40
Colorspace can't be "lossy". Conversion is.

If it was there in the first place.
It's like saying that 720p is "lossy resolution", because it's smaller than 1080p.

Not quite.

Bloax
9th August 2012, 03:00
That all depends on whether or not the program is smart enough to not do a YV12->RGB->YV12 conversion.
And even then, yes - the conversion is lossy. But have you seen a >YV12< video without a halved chroma resolution?

Asmodian
9th August 2012, 22:40
Not quite.

Huh? Yes it is. If your source is YV12 using YV12 as the color space isn't any more lossy than using 720p is for a 720p source.

Foofaraw
9th August 2012, 22:49
Huh? Yes it is.

Already told you I don't see it. You repeating your position is not going to change anything. Sounds like you are saying anything is lossy compared to the real world with the 720/1080 comment.


If your source is YV12 using YV12 as the color space isn't any more lossy than using 720p is for a 720p source.

People tell me YV12 is not a full colorspace, so that sounds like information is lost.

mariush
10th August 2012, 02:06
Information can only be lost if there was more information there in the first place.

DVD is already YV12, on the disc, just compressed in MPEG 2... you only lose some color information if you - for example - do some screen capture or record a game in RGB mode, then convert to YV12 color space.

Broadcasts are also YV12...