View Full Version : Decode x264 Lossless
Ranguvar
16th September 2007, 23:26
I recently made a lot of x264 lossless clips. However, I can now only play them in Media Player Classic. meGUI and XviD4PSP, both which use AviSynth, cannot find a DirectShow filter.
I have ffdshow installed and set to decode AVC.
Is there any way for me to get DirectShowSource working so I can re-encode these, please?
Dark Shikari
16th September 2007, 23:37
What container are these x264 clips stored in? MKV? MP4?
Ranguvar
16th September 2007, 23:52
MP4. But I can remux to MKV.
Dark Shikari
16th September 2007, 23:59
MP4. But I can remux to MKV.If it plays back in Media Player Classic, it should work fine with DirectShowSource, as they use exactly the same interface.
What decoder and splitter are you using?
LoRd_MuldeR
17th September 2007, 00:02
What decoder and splitter are you using?
Maybe he is using MPC's internal MP4 splitter, which would explain why DirectShowSource() cannot open it while MPC can ;)
Ranguvar, please get Haali Media Splitter and try again:
http://haali.cs.msu.ru/mkv/
Guest
17th September 2007, 00:08
I recently made a lot of x264 lossless clips...Is there any way for me to get DirectShowSource working so I can re-encode these, please? Re-encode them from your original source material. You'll lose significant quality otherwise.
Ranguvar
17th September 2007, 00:16
Re-encode them from your original source material. You'll lose significant quality otherwise.
I deleted the original source. I only needed 5 seconds out of giant 6MB/s MPEG-2 videos. But isn't x264 lossless, well, lossless? MediaInfo reports bitrates of around 25MB/s, and I can't tell any difference between the x264 lossless and original MPEG-2.
If it plays back in Media Player Classic, it should work fine with DirectShowSource, as they use exactly the same interface.
What decoder and splitter are you using?ffdshow libavcodec for the decoder (I think). As for splitter, no idea.
@LoRd_MuldeR: Thanks! Trying...
Ranguvar
17th September 2007, 00:21
Sweet! They work perfectly now!
Thanks very much, LoRd_MuldeR ^_^
I think I'll write a guide on how to cap and properly filter, etc. video from Xbox 360 now.
But, can I ask, why did that fix it? Since normal x264 plays fine, what's different in lossless?
Dark Shikari
17th September 2007, 00:26
Re-encode them from your original source material. You'll lose significant quality otherwise.Neuron, did you read his post? The clips are x264 lossless ;)
foxyshadis
17th September 2007, 04:43
But, can I ask, why did that fix it? Since normal x264 plays fine, what's different in lossless?
You were using the splitter built into the players, rather than a system-wide one like haali's. (It's also possible to get a system-wide version of MPC's.)
If you did have a system splitter that was working with other x264 encodes in directshowsource, like nero or mainconcept or something, maybe it just wasn't compatible with lossless. There are differences, but they should all be on the bitstream level, not the container.... who knows.
Generally x264 lossless is a solution looking for a problem, though - common lossless codecs like huffyuv can give you similar compression at much, much higher speeds. (More compression for less speed by using others like lagarith or ffv1.) They also work in avi without any hiccups, which editors like. Alternately, an editing profile for xvid, very low q for x264, or commercial codecs like camtasia save a ton of space while retaining near-lossless editability. (A lot of people use DV for this, but DV is pretty lousy and it only takes a few generations to lose quality. High-bitrate (20+Mbps) MPEG2 is much better if you have nothing else.) Most editors are friendly enough with mpeg2 that it only makes sense to transcode your original source if you happen to be using one that isn't, since lossless will always be larger and usually slower than mpeg.
Dark Shikari
17th September 2007, 04:48
Generally x264 lossless is a solution looking for a problem, thoughActually I find it serves one really important purpose: a lossless format that plays back in real-time for pretty high resolutions while providing similar compression ability to FFV1.
HuffYUV's compression is so weak that it often makes the hard disk the bottleneck, and Lagarith/FFV1 can't play back nearly in real-time for high resolution videos. But H.264 can.
H.264 lossless isn't that slow either once you realize that most of the features that increase quality in a normal encode have very negligable results with lossless :)
akupenguin
17th September 2007, 04:52
They also work in avi without any hiccups, which editors like.
x264 lossless works in avi too. The only part of h264 that's incompatible with avi is B-frames, and B-frames don't help lossless.
foxyshadis
17th September 2007, 05:47
HuffYUV's compression is so weak that it often makes the hard disk the bottleneck, and Lagarith/FFV1 can't play back nearly in real-time for high resolution videos. But H.264 can.
I did test and and it was only at 720p when FFV1 keeled over. Multithreaded lagarith actually decodes (and encodes) faster than lavc/x264 h.264 lossless on my system, unless it's set to cavlc. 'Course coreAVC's still faster, for directshow. Admittedly it's a strong laptop, or at least it was a year ago, and H.264 lossless performed better than the last time I gave it a whirl, so I shouldn't be so hard on it.
aku, qp 0 doesn't actually disable b-frames though, from what I can tell. Is that right? It's entirely compatible without, of course.
akupenguin
17th September 2007, 05:56
x264 only disables options when they're unimplemented, not just because they're not useful.
Guest
17th September 2007, 14:05
Neuron, did you read his post? Apparently not. Sorry.
Sharktooth
17th September 2007, 14:08
is lagarith codec (both encoder and decoder) multithreaded? in case it's not i doubt it will be faster than x264/coreavc on todays hardware...
audyovydeo
17th September 2007, 14:31
x264 only disables options when they're unimplemented, not just because they're not useful.
Does this mean that to get real lossless x264 one's gotta do this :
x264 -qp 0 -A i8x8 i4x4 -8 --m 5 -I 1 -i 1 -t 1
???
audyovydeo
foxyshadis
17th September 2007, 15:30
is lagarith codec (both encoder and decoder) multithreaded? in case it's not i doubt it will be faster than x264/coreavc on todays hardware...
Yes, it is.
akupenguin
17th September 2007, 21:16
Does this mean that to get real lossless x264 one's gotta do this :
... No. Wheretf did that idea come from?
audyovydeo
17th September 2007, 22:08
... No. Wheretf did that idea come from?
Well, intuition (know her ?) told me that "lossless" should have no P frames just as it has no B frames.
So I merged that with the options that I was told in another thread were valid when doing GOP=1 ...
My math's simply not good enough to delve into each parameter's bowels, regretfully. I proceed empirically.
cheers
audyovydeo
Ranguvar
17th September 2007, 22:14
Just to clarify:
I'm using x264 Lossless over FFV1 or HuffYUV because:
I'm recording headshots of mine from Gears of War for Xbox 360. I only need a few 5 second clips from each massive 800MB MPEG-2 of recording.
I do everything (Editing the AviSynth script I made for this purpose, D2V creation, MKV muxing, cutting the AVS) in meGUI, so since I don't want to use VfW, and I don't want to use a totally separate encoder like mencoder for FFV1, x264 Lossless is best.
Since I'm encoding such short clips, speed doesn't really matter.
Once I get enough to make a montage, I'll put them all together and add in music. Then encode to Xvid at a nice quality (1400KB/s+) and host it on Stage6.
Off topic: Can homebrew FLV (VP6/MP3) clips under 100MB and 10min be uploaded to YouTube without YouTube recompressing them? Better quality that way.
akupenguin
17th September 2007, 22:33
@audyovydeo
Anything with -q0 is lossless.
Some options which are useful in normal encodes don't improve compression of lossless, though they don't hurt anything other than speed either. This includes B-frames, multiref, and 8x8dct.
P-frames help lossless because in low motion regions inter prediction is better than intra prediction.
B-frames help lossy but not lossless because:
* They allow nonuniform allocation of quality, but not if all frames have to be lossless.
* They allow nonuniform residual. It costs fewer bits to code a large dct coefficient in a P-frame and a zero in a B-frame, than half the magnitude in 2 P-frames. But prediction is rarely good enough to leave a whole non-quantized block with no residual, so lossless still has to code coefficients in the B-frames.
I'm recording headshots of mine from Gears of War for Xbox 360. I only need a few 5 second clips from each massive 800MB MPEG-2 of recording.
Cut the mpeg2. You don't need to recompress, lossless or otherwise, until you encode the final montage.
Ranguvar
17th September 2007, 22:39
Cut the mpeg2. You don't need to recompress, lossless or otherwise, until you encode the final montage.
Yeah, I was entertaining that idea...
Don't know why I didn't do it now:p
Oh yeah, I remember. Because I wasn't sure how to cut the MPEG Layer-II audio to match that of the video. ?
audyovydeo
17th September 2007, 22:44
...
that's clear enough.
thanks, aku !
audyovydeo
NeonEva
23rd September 2007, 03:49
I recently formatted/re-installed my OS, and re-installed all my codec's, splitters and now all my previous x264 lossless videos (and new ones) I've made cannot be opened in VDub, but can be in MPC, WMP (any media player), same as Ranguvar's Problem.
I'm using Haali Media Splitter: http://haali.cs.msu.ru/mkv/
and FFDShow - Nightly builds by clsid: http://sourceforge.net/project/showfiles.php?group_id=173941&package_id=199416
any suggestions ?
Sharktooth
23rd September 2007, 04:02
enable h.264 decoding in ffdshow's VFW configuration
NeonEva
23rd September 2007, 04:37
I did and its still not working >.>
Screen Shot of it to make sure I got it right
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.