Vship icon indicating copy to clipboard operation
Vship copied to clipboard

[Feature request] yuv420p10le pixel format

Open admirrondo opened this issue 1 year ago • 41 comments

Are there any plans on implementing encoded yuv420p10le 10-bit pixel format with source yuv420p 8-bit pixel format comparison support?

admirrondo avatar Nov 19 '25 13:11 admirrondo

Does it not work already?

Line-fr avatar Nov 19 '25 13:11 Line-fr

The source and encoded file should be converted to the right format inside Vship directly completely independently

you could very well input an sRGB float source and 12bits PQ encoded with BT2020 primaries

They both will converted internally to the right format for the metric to use

Line-fr avatar Nov 19 '25 13:11 Line-fr

I have tried multiple 10bit files and none seem to work. 8bit yuv420p files work without issues. I am currently running FFVship on Google Colab and only output, that would suggest some kind of an issue with 10bit video is:

Indexing Progress (MB) source.mkv [] 3473/3473 IPS: 2174.7 Indexing Progress (MB) output.mp4 [] 1224/1224 IPS: 1746.08 Metric Processing Progress (Frames) [] 0/72782 Avg : -nan IPS: -nan

admirrondo avatar Nov 19 '25 13:11 admirrondo

Let me try, there might be a bug I didnt see when converting 10 bits input

Line-fr avatar Nov 19 '25 13:11 Line-fr

I tried on a freshly encoded yuv420p10le bits encoded versus an8 bits source (yuv420p) and I did not have any issue. There might be something else with the relationship between vship and your 10 bits file

May I ask for its mediainfo or maybe ffprobe?

Line-fr avatar Nov 19 '25 13:11 Line-fr

Here is ffprobe. I can provide mediainfo as well, if needed

Source file: ffprobe version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2007-2021 the FFmpeg developers built with gcc 11 (Ubuntu 11.2.0-19ubuntu1) configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, matroska,webm, from 'House.of.David.S02E01.1080p.WEBRip.x265-KONTRAST.mkv': Metadata: encoder : libebml v1.4.4 + libmatroska v1.7.1 Duration: 00:50:35.65, start: 0.000000, bitrate: 9153 kb/s Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x960 [SAR 1:1 DAR 2:1], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: BPS : 8511308 DURATION : 00:50:35.616000000 NUMBER_OF_FRAMES: 72782 NUMBER_OF_BYTES : 3229632998 _STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default) Metadata: BPS : 640000 DURATION : 00:50:35.648000000 NUMBER_OF_FRAMES: 94864 NUMBER_OF_BYTES : 242851840 _STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(eng): Subtitle: subrip (original) Metadata: BPS : 35 DURATION : 00:48:02.174000000 NUMBER_OF_FRAMES: 465 NUMBER_OF_BYTES : 12746 _STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:3(eng): Subtitle: subrip (original) (hearing impaired) Metadata: title : SDH BPS : 42 DURATION : 00:48:02.174000000 NUMBER_OF_FRAMES: 572 NUMBER_OF_BYTES : 15245 _STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:4(spa): Subtitle: subrip (dub) (hearing impaired) Metadata: title : SDH BPS : 38 DURATION : 00:49:07.445000000 NUMBER_OF_FRAMES: 486 NUMBER_OF_BYTES : 14011 _STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Encoded file: ffprobe version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2007-2021 the FFmpeg developers built with gcc 11 (Ubuntu 11.2.0-19ubuntu1) configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'House.of.David.S02E01.1080p.WEBRip.x265-KONTRAST.mp4': Metadata: major_brand : iso4 minor_version : 1 compatible_brands: iso4hvc1 creation_time : 2025-11-17T15:31:53.000000Z encoder : GPAC-2.4-revrelease Duration: 00:50:35.66, start: 0.000000, bitrate: 3226 kb/s Stream #0:0(und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709), 1920x960 [SAR 1:1 DAR 2:1], 3000 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 23.98 tbc (default) Metadata: creation_time : 2025-11-17T15:31:53.000000Z vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 221 kb/s (default) Metadata: creation_time : 2025-11-17T13:19:35.000000Z vendor_id : [0][0][0][0]

admirrondo avatar Nov 19 '25 14:11 admirrondo

https://pastebin.com/82pg2BjG https://pastebin.com/47v9itT6

this has better formatting

admirrondo avatar Nov 19 '25 14:11 admirrondo

I don't see anything wrong with their metadata. It should all work... would it be possible for you to create a small clip and see if it still doesnt work and send it to me so that I can try to see if it does that on my end too?

Line-fr avatar Nov 19 '25 14:11 Line-fr

Image Image

This is the files I tested

Line-fr avatar Nov 19 '25 14:11 Line-fr

I create a 2 minute clip and it still doesn't work Maybe the issue is with HEVC.

https://s3.tebi.io/kntbucket1/ul/source_clip.mkv https://s3.tebi.io/kntbucket1/ul/output_clip.mp4

admirrondo avatar Nov 19 '25 14:11 admirrondo

Image

here is what I got for your 2 files. It is weird that it doesnt work on your end without erroring out

Line-fr avatar Nov 19 '25 14:11 Line-fr

what happens if you compare the 10 bits file to itself?

Line-fr avatar Nov 19 '25 14:11 Line-fr

I still just get this output

Indexing Progress (MB) output_clip.mp4 [] 48/48 IPS: 1846.15 Indexing Progress (MB) output_clip.mp4 [] 48/48 IPS: 2086.96 Metric Processing Progress (Frames) [] 0/2880 Avg : -nan IPS: -nan

admirrondo avatar Nov 19 '25 14:11 admirrondo

My guess is that something causes the decoding process to be wrong but I don't see why it would be different for us, are you using windows precompiled libraries?

Line-fr avatar Nov 19 '25 14:11 Line-fr

No, I compiled linux binary and I am running it inside Google Colab notebook. It works with h264 8-bit encoded files. I'll test now with windows precompiled library on AMD GPU.

admirrondo avatar Nov 19 '25 14:11 admirrondo

I did my test with my own compiled linux libraries as well, I will try with AMD, I only tried NVIDIA there.

Line-fr avatar Nov 19 '25 14:11 Line-fr

Well, Google Colab has T4 Nvidia GPUs so it should technically work, I just don't know why it doesn't

admirrondo avatar Nov 19 '25 14:11 admirrondo

do you have "compute-sanitizer" on your google colab?

Line-fr avatar Nov 19 '25 14:11 Line-fr

you could do compute-sanitizer "FFVshipCommand" It is sort of valgrind but for GPU This one would also be useful compute-sanitizer --tool initcheck "FFVshipCommand"

Line-fr avatar Nov 19 '25 14:11 Line-fr

========= COMPUTE-SANITIZER Usage : /content/FFVship [Positional 0 (Refering to --source)] [Positional 1 (Refering to --encoded)] [Options]

Available options: -h, --help Display this help message --config-file Allows to input CLI Arguments specifying additional options (parsed after CLI) --source, -s Reference video to compare to --encoded, -e Distorted encode of the source --metric, -m Which metric to use [SSIMULACRA2, Butteraugli, CVVDP] --json Outputs metric results to a json file --live-score-output replace stdout output with index-score lines --source-index FFMS2 index file for source video --encoded-index FFMS2 index file for encoded video --cache-index Write index files to disk and reuse if available --start Starting frame of source --end Ending frame of source --encoded-offset Frame offset of encoded video to source --every Frame sampling rate --source-indices List of source indices subjective to --start, --end, --every and --encoded-offset. If --encoded-indices isnt specified, this will be applied to encoded-indices too. Format is integers separated by comma --encoded-indices List of encoded indices subjective to --start, --end, --every and --encoded-offset. Format is integers separated by comma --cropTopSource Allows to crop source --cropBottomSource Allows to crop source --cropLeftSource Allows to crop source --cropRightSource Allows to crop source --cropTopEncoded Allows to crop Encoded --cropBottomEncoded Allows to crop Encoded --cropLeftEncoded Allows to crop Encoded --cropRightEncoded Allows to crop Encoded --resizeToDisplay Allow to resize to the screen resolution specified in the model (default off) --displayModel Allow specifying screen disposition to CVVDP (default standard_fhd) --intensity-target Target nits for Butteraugli --qnorm Optional Norm to compute (default to 2) --threads, -t Number of Decoder process, recommended is 2 --gpu-threads, -g GPU thread count, recommended is 3 --gpu-id GPU index --list-gpu List available GPUs --version Print FFVship version ========= Error: Target application terminated before first instrumented API call

admirrondo avatar Nov 19 '25 14:11 admirrondo