Log in

View Full Version : x264 encoding in 10bit 4:2:2 for Blu-ray


TheDock
21st February 2015, 18:57
Hello everybody,

I am now fighting since weeks to understand if there exist a solution to create a video blu-ray (i.e., playing automatically on every BD-player) containing real 10bit 4:2:2 YUV video (lossy or lossless) at 720x576 25i and 24bit 48kHz audio.

Here is a summary of the capture and encoding process:


Capturing uncompressed video (v210: yuv422p10le pixel format) with embedded uncompressed audio (PCM: 48kHz stereo pcm_s24le) and saving it in a QuickTime *.mov container (can also be *.avi with the BlackMagic Decklink card). This is done with the software provided directly by the capture KONA LHe Plus card manufacturer AJA.
Extracting the audio with ffmpeg and saving it as *.wav in pcm_s24le format.
Extracting and compressing the video with x264 (10bit clear version compiled by Komisar)
Merging the compressed video (*.264) and the uncompressed audio (*.wav) into a Matroska (*.mkv) container with mkvmerge.
Muxing the created Matroska container in step 4 to create a video BD *.iso file with tsMuxeR.
Burning the *.iso file created in step 5 to a BD-RE with Nero2015 and playing it on a Sony BDP-S360 blu-ray player.


I have observed the following:
-The PCM audio is always played fine on the blu-ray player at 24bit 48kHz stereo is fine: no issues observed
-The Matroska container (audio+video) is always fine (I use VLC to play it): no issues observed

Now, coming to the issue with the video:

Encoding with x264-8bit in 4:2:0: fine with crf between 16-18
Encoding with x264-10bit in 4:2:0: fine with crf between 16-18
Encoding with x264-10bit in 4:2:0: localized colorfull artefacts with crf below 7
Encoding with x264-10bit in 4:2:2: absolutely impossible to get a picture (I can just observe very big black and white structures in boxes: same observation when not playing on my BDP-S360 but on my PC by using Cyberlink software player)


I have tested more or less all the setting combinations (vbr / vbv / buffer sizes and rate / cbr) given on the page
http://forum.doom9.org/showthread.php?t=154533 I have no more ideas how to continue.

Now my questions are:

Is it possible to make video blu-ray discs using 4:2:2 encodings (it seems to be accepted in the Profile High422)?
Is it possible to make video blu-ray discs with lossless compression (it seems to be accepted in the Profile High444)?
Which are the settings that could help me to reach this?
Which settings should I use to get the compatibility with all the BD-players but preserving the highest possible source quality (please, do not argue with "it is not needed": this is not the question)?


Finally, here is the command line I use for the video compression:

"..\x264\x264.2525.10bit.x86_64_clear.exe" --demuxer lavf --output-csp i422 --tune film --preset medium --bluray-compat --crf 16 --nal-hrd vbr --vbv-maxrate 30000 --vbv-bufsize 30000 --vbv-init 0.2 --keyint 25 --open-gop --aud --cabac --b-pyramid strict --bframes 3 --ref 6 --slices 4 --weightp 0 --partitions p8x8,b8x8,i8x8,i4x4 --aq-mode 1 --aq-strength 1.0 --deblock -1:2 --b-adapt 2 --videoformat pal --colorprim "bt470bg" --transfer "bt470bg" --colormatrix "bt470bg" --input-res 720x576 --input-depth 10 --sar 12:11 --tff --force-cfr --fps 25/1 --output "..\2_Files_Intermediate\output.264" "..\2_Files_Intermediate\input.avi"

Here is the output log:
###############################
# Processing video [*.264]... #
###############################


lavf [info]: 720x576p 0:1 @ 25/1 fps (cfr)
resize [warning]: converting from yuv422p10le to yuv422p16le
x264 [info]: using SAR=12/11
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x264 [info]: profile High 4:2:2, level 3.1, 4:2:2 10-bit
x264 [info]: frame I:36 Avg QP:27.24 size: 87812
x264 [info]: frame P:195 Avg QP:30.38 size: 52626
x264 [info]: frame B:525 Avg QP:32.45 size: 27552
x264 [info]: consecutive B-frames: 3.3% 6.1% 18.7% 72.0%
x264 [info]: mb I I16..4: 3.4% 71.6% 25.0%
x264 [info]: mb P I16..4: 3.3% 29.5% 7.1% P16..4: 20.5% 26.7% 12.8% 0.0% 0.0% skip: 0.0%
x264 [info]: mb B I16..4: 0.8% 4.1% 0.6% B16..8: 37.3% 18.3% 4.8% direct:31.7% skip: 2.4% L0:24.8% L1:28.7% BI:46.5%
x264 [info]: field mbs: intra: 56.9% inter:51.1% skip:13.0%
x264 [info]: 8x8 transform intra:73.7% inter:66.8%
x264 [info]: coded y,uvDC,uvAC intra: 89.1% 100.0% 99.2% inter: 64.3% 97.5% 60.6%
x264 [info]: i16 v,h,dc,p: 3% 85% 4% 8%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 29% 18% 4% 6% 5% 10% 5% 14%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 40% 10% 4% 7% 5% 10% 4% 11%
x264 [info]: i8c dc,h,v,p: 41% 39% 7% 14%
x264 [info]: ref P L0: 62.1% 23.6% 7.0% 3.7% 1.4% 1.0% 0.7% 0.4% 0.0% 0.0%
x264 [info]: ref B L0: 79.5% 19.6% 0.5% 0.3%
x264 [info]: ref B L1: 78.1% 20.5% 0.9% 0.5%
x264 [info]: kb/s:7377.82

encoded 756 frames, 39.77 fps, 7377.82 kb/s

Thanks in advance for your suggestions and help.

Best regards

TheDock

nevcairiel
21st February 2015, 18:59
Blu-ray does not support 4:2:2, 4:4:4, Lossless, or 10-bit.
Its limited to 4:2:0 8-bit, Main or High profile.

SeeMoreDigital
21st February 2015, 19:15
Sufficed to say...

No Blu-ray disc player is able to decode 4:2:2, 4:4:4, Lossless or 10-bit AVC encoded video either!

TheDock
21st February 2015, 20:30
Thanks for your answers :)

But now I am completely lost. The *.m2ts file in the STREAM directory of the BDMV has following information:

General
ID : 1 (0x1)
Complete name : I:\BDMV\STREAM\00000.m2ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 31.1 MiB
Duration : 30s 240ms
Overall bit rate mode : Variable
Overall bit rate : 8 620 Kbps
Maximum Overall bit rate : 35.5 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 10@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : 27
Duration : 30s 240ms
Bit rate mode : Variable
Bit rate : 5 966 Kbps
Maximum bit rate : 30.0 Mbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : MBAFF
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.575
Stream size : 21.5 MiB (69%)
Color primaries : BT.601 PAL
Transfer characteristics : BT.470 System B, BT.470 System G
Matrix coefficients : BT.601
Color range : Limited

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : PCM
Format settings, Endianness : Big
Format settings, Sign : Signed
Muxing mode : Blu-ray
Codec ID : 128
Duration : 30s 235ms
Bit rate mode : Constant
Bit rate : 2 304 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.30 MiB (27%)

This blu-ray disk plays perfectly right on two different (older) blu-ray players (e.g., Sony BDP-S360). The video is 4:2:0 on 10bit, not 8bit. So why is it perfectly working if 10bit is not supported?

In the configuration of my BD-player, I can select 8/10/12 bit and 4:2:2 / 4:4:4 for the HDMI output: I understand that this has nothing to do with the input (i.e., the file on the blu-ray disc). Am I correct?

Best regards

The Dock

SeeMoreDigital
21st February 2015, 20:33
Where is that stream from. Given that it's only 31.1MB please upload it somewhere?

TheDock
21st February 2015, 21:06
Hello SeeMoreDigital,

I have uploaded the complete *.iso file containing the blu-ray:
https://dl.dropboxusercontent.com/u/76384861/AJA_06.iso

The *.m2ts file contained in this video blu-ray ISO file was created by myself using the steps described in my first post in this thread. The source material was in this case SVHS material digitized with a BrightEye 75 device from Ensemble Design (used also as TBC). For the compression I have used x264 with the following command:

"..\x264\x264.2525.10bit.x86_64_clear.exe" --demuxer lavf --output-csp i420 --tune film --preset medium --bluray-compat --level 4.1 --crf 16 --nal-hrd vbr --vbv-maxrate 30000 --vbv-bufsize 30000 --vbv-init 0.2 --keyint 25 --open-gop --aud --cabac --b-pyramid strict --bframes 3 --ref 6 --slices 4 --weightp 0 --partitions p8x8,b8x8,i8x8,i4x4 --aq-mode 1 --aq-strength 1.0 --deblock -1:2 --b-adapt 2 --videoformat pal --colorprim "bt470bg" --transfer "bt470bg" --colormatrix "bt470bg" --input-res 720x576 --input-depth 10 --sar 12:11 --tff --force-cfr --fps 25/1 --output "..\2_Files_Intermediate\output.264" "..\2_Files_Intermediate\input.mov"

Note that if --crf is reduced to for example 7 instead of 16, color artefacts may appear during playback in the BD-player.

Here is the output generated during the x264 encoding:

###############################
# Processing video [*.264]... #
###############################


lavf [info]: 720x576p 0:1 @ 25/1 fps (cfr)
resize [warning]: converting from yuv422p10le to yuv422p16le
resize [warning]: converting from yuv422p16le to yuv420p16le
x264 [info]: using SAR=12/11
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x264 [info]: profile High 10, level 4.1, 4:2:0 10-bit
x264 [info]: frame I:36 Avg QP:26.97 size: 73002
x264 [info]: frame P:195 Avg QP:30.08 size: 43015
x264 [info]: frame B:525 Avg QP:32.12 size: 21012
x264 [info]: consecutive B-frames: 3.3% 6.1% 18.7% 72.0%
x264 [info]: mb I I16..4: 2.8% 72.6% 24.7%
x264 [info]: mb P I16..4: 1.6% 21.9% 5.8% P16..4: 25.3% 30.7% 14.6% 0.0% 0.0% skip: 0.1%
x264 [info]: mb B I16..4: 0.2% 1.8% 0.4% B16..8: 38.6% 20.2% 5.6% direct:27.2% skip: 6.0% L0:28.4% L1:33.9% BI:37.7%
x264 [info]: field mbs: intra: 57.4% inter:52.0% skip:23.7%
x264 [info]: 8x8 transform intra:73.8% inter:64.6%
x264 [info]: coded y,uvDC,uvAC intra: 94.5% 99.5% 93.0% inter: 65.4% 86.6% 27.7%
x264 [info]: i16 v,h,dc,p: 4% 86% 4% 6%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 29% 14% 4% 6% 5% 10% 5% 15%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 38% 9% 4% 7% 5% 10% 5% 11%
x264 [info]: i8c dc,h,v,p: 33% 41% 8% 18%
x264 [info]: ref P L0: 64.4% 21.6% 7.0% 3.6% 1.4% 1.0% 0.7% 0.4% 0.0% 0.0%
x264 [info]: ref B L0: 80.1% 18.9% 0.6% 0.3%
x264 [info]: ref B L1: 78.6% 19.8% 1.0% 0.6%
x264 [info]: kb/s:5832.65

encoded 756 frames, 45.55 fps, 5832.65 kb/s

The Dock

pcordes
22nd February 2015, 00:47
Predictive lossless coding is a separate feature introduced by the same profile (Hi444PP according to wikipedia) as 4:4:4 support, but it's a separate feature. Implementing only some features of a profile is possible, and might have happened for some players.

Just because you find support for one feature of a profile doesn't mean you will find support for all features of a profile, unless the player specifically claims support that profile.

Probably some hardware BD player makers followed the compatibility adage: "be liberal in what you accept, strictly conformant in what you output". So they accept whatever they can, rather than rejecting a 4:2:0 10-bit stream just because the BD spec doesn't require them to accept it.

The max video bitrate (from the table on https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC) is higher for Hi10P Level 4.1 than for High Level 4.1 (by more than a factor of 2). Maybe with crf 7, you're exceeding the decoder's ability to keep up, hence the corrupted output? It probably never claimed to be able to accept Hi10P L4.1 in the first place.

Oh also, the DPB would take more space with higher bit depth, so you might need to reduce your ref count, if you were near the limit for 8-bit h.264 BD streams. (err probably not, forgot you were using SD rez).

Keep in mind that experimenting to find out what works on your specific player isn't going to tell you much about other BD players, unless they use the same hardware decoder chipset. And even then, probably different firmware will make a difference, too.

sneaker_ger
22nd February 2015, 11:02
My guess is the players just send the data through their 8 bit decoders. You can see that in 8 bit software players as well: some scenes look normal on first glance while others show heavy artifacts. Playing with the crf or other settings "randomizes" the symptom.

SeeMoreDigital
22nd February 2015, 11:06
I have uploaded the complete *.iso file containing the blu-ray:
https://dl.dropboxusercontent.com/u/76384861/AJA_06.iso


The AVC video stream within the .iso sample you provided is most curious.

LAV Decoder can't play it in hardware, my LG TV's reject it but my Oppo BDP-103 plays it and the colours seen to be okay. As I say, most curious.

TheDock
22nd February 2015, 12:49
Thanks for your answers and comments. Yes, it is interestingly curious :)

So I will then switch to the following configuration:


Video: 4:2:0 8bit (x264)
Audio: 48kHz 24bit Stereo (LPCM)


Which configuration(s) should I use then for encoding the video?

The audio has a bitrate of:
24bit x 48kHz x 2channels = 2.304.000 bit/s

I would like to set the video bitrate as high as possible but being compatible with most of the blu-ray hardware players. Here are the options and values I would use for a 2-pass x264 video encoding based on the recommendations given by shon3i in http://forum.doom9.org/showthread.php?t=154533:

"..\x264\x264.2525.8bit.x86_64_clear.exe" --pass 1 --slow-firstpass --demuxer lavf --output-csp i420 --tune film --preset placebo
--me umh --bluray-compat --level 4.1 --bitrate 30000 --vbv-maxrate 40000 --vbv-bufsize 30000 --vbv-init 0.2 --keyint 25 --open-gop
--aud --cabac --b-pyramid strict --bframes 3 --ref 6 --slices 4 --weightp 0 --partitions p8x8,b8x8,i8x8,i4x4 --aq-mode 1 --aq-strength 1.0 --deblock -1:2 --b-adapt 2
--videoformat pal --colorprim "bt470bg" --transfer "bt470bg" --colormatrix "bt470bg" --input-res 720x576 --input-depth 10 --sar 12:11 --tff --force-cfr --fps 25/1
--output "..\2_Files_Intermediate\output.264" "..\1_Files_Uncompressed\input.mov"

How high can I go with the target video bitrate without troubles? In the example above I use --bitrate 30000, but I could probably go higher, right? :confused:

Thanks

The Dock

foxyshadis
22nd February 2015, 14:37
If you have room, just set bitrate equal to vbv-maxrate for cbr to max out quality.

Technically, the max bitrate is 40mbps, but you could probably use any combination of audio/video up to 54mbps with players from the last few years, and even that limit may be low. Decoding chips are quite powerful these days. It depends on if you want to be strict to the spec or just distribute something to friends. Older first and second generation players had a lot of trouble with anything over 40 mbps, though.

Any 3D player has the capability of decoding two streams at up to 60 mbps, which may or may not apply to a single stream as well. You can always experiment with rates that high.

pcordes
23rd February 2015, 00:09
Is this just an exercise in seeing what's possible? What kind of content gets any kind of visual benefit from 30Mb/s at 720x576i50? (I like the practice of counting fields per second for interlaced content. I think of 50i as similar to 50p with half the vertical resolution. Needing more temporal resolution, but needing to support hardware that doesn't do 50p, is the only excuse left for interlacing, right? CRTs are long gone.)

If you're going to save your 4:2:2 10bit original in a lossless format for archival purposes, then what benefit are you getting from ridiculous bitrates for your lossy encode?

I'm not saying there can't be a benefit, just asking what it is, because I'm surprised. Using WAY more bitrate than needed is just going to make it take longer to burn discs, and make it slow to send over networks or copy to USB drives, or w/e.

Using a bit more bitrate than you think you need makes sense, in case you missed noticing a visual flaw that will bother you later. I know you said this wasn't the kind of answer you're looking for, so I'll leave it at that.


Also, if you want to distribute something that will look good for the most people, you might want to deinterlace and distribute 720x576p50 content (if that's an option for BD?) People that play your video on computers, instead of on TVs with fancy deinterlace hardware, might be using software players with poor or no deinterlacing. (e.g. I'm not sure if VLC can activate GPU-accelerated deinterlacing, and even so there are old computers without hardware video processing. And realtime software deinterlacing doesn't usually look good. Old Intel GPUs (like my g965) don't have video decode hardware, let alone deinterlacing.)

If there's room on the disc, you could include a 4:2:2 10bit version of your video. Maybe as a data file for people to play with computers? This is probably a dumb idea.

hello_hello
23rd February 2015, 06:25
The AVC video stream within the .iso sample you provided is most curious.

LAV Decoder can't play it in hardware, my LG TV's reject it but my Oppo BDP-103 plays it and the colours seen to be okay. As I say, most curious.

What's the trick to extracting it? I thought I'd give it a test but I couldn't find a program that'd play with the ISO sample. TSMuxer wouldn't open it. It's not an XP problem is it?

poisondeathray
23rd February 2015, 07:01
What's the trick to extracting it? I thought I'd give it a test but I couldn't find a program that'd play with the ISO sample. TSMuxer wouldn't open it. It's not an XP problem is it?

winrar can extract it , or mount it with some iso software like virtual clonedrive (free)

filler56789
23rd February 2015, 07:42
The file "AJA_06.iso" cannot be opened by 7-Zip, but can be opened by WinRAR 4.11 and IsoBuster 2.4. According to this latter, it was created by TSMuxer —

— how ironic :p :D

ndjamena
23rd February 2015, 08:54
Also, if you want to distribute something that will look good for the most people, you might want to deinterlace and distribute 720x576p50 content (if that's an option for BD?) ...


You'd have to upscale it to 1280x720 to get a BD complaint video at 50p.

-edit- oops, all these numbers look the same.

sneaker_ger
23rd February 2015, 10:13
*1280x720

Ghitulescu
23rd February 2015, 10:56
As said before several times, 4:2:2 is not BD compatible, not even AVCHD (or its last version, 2.0).
My only explanation is that the streams may be played on certain devices, as fake BDs/AVCHDs, is due to the universality of their decoders. Most decoding chips, like Sigma Designs or MediaTek, support 10b or more, for their chips are also used in pro gear. It may that the player interpreted the BD structure as a folder structure and played the M2TS files as a file, not as part of the BD/AVCHD structure. Like playing MP3 off a CDR.

I remember an old trick (I also had to use) concerning the playback of SVCDs on certain players. It required that the MPEG-2 stream (SVCD) should have been packed as MPEG-1 (VCD), and bingo the DVD player was able to play them, because the decoder knew how to process the samples, although the system refused the format. But those CDRs were only good for those players (and computers).

Therefore, if you want compatibility you should use 4:2:0. Or wait until the new HD format may come.

TheDock
23rd February 2015, 12:15
Thanks for all your answers.

I totally agree that the bitrate it is not "needed" in this special sample, but as I said, this was not my question.

Thanks to all of you, I am now several steps further. Yesterday I was able to resolve the interlacing issue. I would like to present it here briefly.

The source was recorded as stated in my first post in this thread: 720x576:25i. With SVHS/VHS sources, I like to crop some parts from the top, bottom, left and right to get a more stable image. Then, to get again the compatibility with the most widespread standards, I use padding to have a 720x576 video again. All this should remind 25i (interlaced) output video.

By using the following command, I got troubles:
"..\ffmpeg\ffmpeg-20150206-git-9dc45d1-win64-static\bin\ffmpeg.exe" -y -analyzeduration 100M -probesize 100M -ac 2 -channel_layout stereo -i input.mov
-vf crop=w=700:h=562:x=20:y=2,pad=width=720:height=576:x=10:y=7:color=black,fieldorder=tff
-vcodec v210 -acodec copy output.mov

The result was a very jerky playback on the hardware blu-ray player. I have identified mainly one reason for this, that is unfortunately not put out as a warning during x264 encoding: it is the fact that during the padding, y is set to be an odd number: it must be an even number so that the interlaced frames are still correctly displayed. Much better it the following command (all numbers are multiple of 4):

"..\ffmpeg\ffmpeg-20150206-git-9dc45d1-win64-static\bin\ffmpeg.exe" -y -analyzeduration 100M -probesize 100M -ac 2 -channel_layout stereo -i input.mov
-vf crop=w=700:h=560:x=20:y=4,pad=width=720:height=576:x=12:y=8:color=black,fieldorder=tff
-vcodec v210 -acodec copy output.mov

Concerning the conversion to 50p, I am working on it :)

Ghitulescu
23rd February 2015, 12:34
I noticed we were discussing SD, not HD, but with VHS or S-VHS even 8b is too much. Capturing them in 10b or more is a waste of resources.

TheDock
23rd February 2015, 22:49
I noticed we were discussing SD, not HD, but with VHS or S-VHS even 8b is too much. Capturing them in 10b or more is a waste of resources.
:helpful:
Thanks for your comment, but I was not asking for this kind of "help": if you read my question, it is not mentioned that my workflow is for VHS only. And actually: even capturing video with 1bit is a waste of resources for a blind man that does not require post processing. Further, you should have a look at the recommended archiving methods of analog supports. Please, also think about the fact that the required "resources" today (in this precise case storage space) will seem low in 20 years (and I have no problem with storage space currently, but thanks for taking care about it for me).

One last detail: I am working at Fraunhofer...

pcordes
24th February 2015, 00:12
I totally agree that the bitrate it is not "needed" in this special sample, but as I said, this was not my question.


I was just curious what got you interested in playing around with super-high bitrates for SD.


"..\ffmpeg\ffmpeg-20150206-git-9dc45d1-win64-static\bin\ffmpeg.exe" -y -analyzeduration 100M -probesize 100M -ac 2 -channel_layout stereo -i input.mov
-vf crop=w=700:h=560:x=20:y=4,pad=width=720:height=576:x=12:y=8:color=black,fieldorder=tff
-vcodec v210 -acodec copy output.mov



lossless libx264 (-preset ultrafast -qp 0) will use a lot less disk space, and is quite fast to encode and decode, thanks to ASM-optimized decoders. I'd recommend using it over ffvhuff or utvideo for lossless scratch files, if you want to compress your output.


Concerning the conversion to 50p, I am working on it :)
[/quote]

I recently deinterlaced a DV source (which I only had a DVD copy of :/). I got quite good results with -vf yadif=3:1,mcdeint=3:1:4. It ran all night on my sandybridge (on 720x480. single threaded...), but the output looked good. Dunno how much better it was than I would have got with mcdeint=2. (The last parameter is not a higher-is-better, though. Read the docs to see what it does.) The 2nd parameter (to yadif and mcdeint) is 1 for BFF, 0 for TFF.


Since you're on Windows, you probably already have AviSynth set up. (I tried on my windows machine, but I grabbed 64bit avisynth+ so I could use the 64bit x264.exe I'd already cross-compiled, and then found out that some avisynth plugins are only available as 32bit code.)

Anyway, apparently QTGMC (http://avisynth.nl/index.php/QTGMC) is the best available free (but not open-source?) deinterlacer. And it's still stuck on 32bit only. Next time I have to deinterlace something, maybe I'll find a way to pipe data through it while still running 64bit encoders.

ndjamena
24th February 2015, 03:40
You mean something like this?

avs2pipemod -y4mp %AVSFILE% | "X264.64.exe" %command% --output %VideoFile% --stdin y4m -

foxyshadis
24th February 2015, 03:57
Heh, I didn't even realize this was about SD.

Anyway, apparently QTGMC (http://avisynth.nl/index.php/QTGMC) is the best available free (but not open-source?) deinterlacer. And it's still stuck on 32bit only. Next time I have to deinterlace something, maybe I'll find a way to pipe data through it while still running 64bit encoders.

QTGMC and the plugins it uses are all open-source, although there is a closed-source version of mvtools you can substitute in.

For 64-bit, it's also been ported to VapourSynth, a Python-based remake of AviSynth where everything is natively both 32- and 64-bit. Documentation on it hasn't really made it to the avisynth.nl yet.

ChiDragon
28th February 2015, 03:15
lossless libx264 (-preset ultrafast -qp 0) will use a lot less disk space, and is quite fast to encode and decode, thanks to ASM-optimized decoders. I'd recommend using it over ffvhuff or utvideo for lossless scratch files
I haven't found this to be the case with YUY2 VHS captures, even with slow encode settings (but I always use --tune fastdecode). Have you seen significant space savings with noisy sources?

jmac698
1st March 2015, 11:07
Originally Posted by Ghitulescu
I noticed we were discussing SD, not HD, but with VHS or S-VHS even 8b is too much. Capturing them in 10b or more is a waste of resources.

I just want to dispel this myth. I've personally measured various capture cards and found a bowed curve in the levels which is a typical artefact of a video amplifier. What this means is that a video level of 128 actually read as 131, for example. So you've lost about 1.5 bits around the middle of the luminence scale.

What 10bits is far is basically a more accurate 8 bits, since old 8bits adc's were never actually accurate to 8 bits (called integral non-linearity, you can look up this number on data sheets).

In fact there's fully analog VHS tapes, and if you wanted to record a still frame for several frames you can extract more than 8 bits from it, by simple averaging. The same concept is used in astrophotography and is called stacking. This could be of use to bringing out hidden details in dark recordings for example.

Not going to start an argument here, just some things to think about.