Opened 5 years ago
Last modified 3 years ago
#8454 open enhancement
No PixelFormatTag for P010 (fourcc 0x30313050)
Reported by: | pheedbaq3 | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avdevice |
Version: | git-master | Keywords: | dshow |
Cc: | pheedbaq@outlook.com, Diederick Niehorster | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Usage:
Capturing from AVerMedia HD Capture GC573 in P010 pixel format.
Problem:
The P010 pixel_format that the capture card uses is not recognized ("unknown compression type"). No pixel format tag exists for fourcc code 0x30313050 (010P) in ffmpeg\libavcodec\raw.c.
Command Used:
ffmpeg -f dshow -list_options true -i video="AVerMedia HD Capture GC573 1"
Console Output:
ffmpeg -v 9 -loglevel 99 -f dshow -list_options true -i video="AVerMedia HD Capture GC573 1"
ffmpeg version git-2019-12-29-e20c6d9 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20191125
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 38.100 / 56. 38.100
libavcodec 58. 65.100 / 58. 65.100
libavformat 58. 35.101 / 58. 35.101
libavdevice 58. 9.101 / 58. 9.101
libavfilter 7. 70.100 / 7. 70.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'dshow'.
Reading option '-list_options' ... matched as AVOption 'list_options' with argument 'true'.
Reading option '-i' ... matched as input url with argument 'video=AVerMedia HD Capture GC573 1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url video=AVerMedia HD Capture GC573 1.
Applying option f (force format) with argument dshow.
Successfully parsed a group of options.
Opening an input file: video=AVerMedia HD Capture GC573 1.
[dshow @ 000001c463ac8a40] DirectShow video device options (from video devices)
[dshow @ 000001c463ac8a40] Pin "Capture" (alternative pin name "0")
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=640x480 fps=59.9402 max s=640x480 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=720x480 fps=59.9402 max s=720x480 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=720x576 fps=50 max s=720x576 fps=50
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=800x600 fps=60.0002 max s=800x600 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1024x768 fps=60.0002 max s=1024x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1280x720 fps=50 max s=1280x720 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1280x768 fps=60.0002 max s=1280x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1280x800 fps=60.0002 max s=1280x800 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1280x1024 fps=60.0002 max s=1280x1024 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1360x768 fps=60.0002 max s=1360x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1440x900 fps=60.0002 max s=1440x900 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1680x1050 fps=60.0002 max s=1680x1050 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=2560x1080 fps=60.0002 max s=2560x1080 fps=144.001
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=2560x1440 fps=59.9402 max s=2560x1440 fps=144.001
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=3440x1440 fps=50 max s=3440x1440 fps=100
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=3840x2160 fps=24 max s=3840x2160 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=yuyv422 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=640x480 fps=59.9402 max s=640x480 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=720x480 fps=59.9402 max s=720x480 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=720x576 fps=50 max s=720x576 fps=50
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=800x600 fps=60.0002 max s=800x600 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1024x768 fps=60.0002 max s=1024x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1280x720 fps=50 max s=1280x720 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1280x768 fps=60.0002 max s=1280x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1280x800 fps=60.0002 max s=1280x800 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1280x1024 fps=60.0002 max s=1280x1024 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1360x768 fps=60.0002 max s=1360x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1440x900 fps=60.0002 max s=1440x900 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1680x1050 fps=60.0002 max s=1680x1050 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=2560x1080 fps=60.0002 max s=2560x1080 fps=144.001
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=2560x1440 fps=59.9402 max s=2560x1440 fps=144.001
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=3440x1440 fps=50 max s=3440x1440 fps=100
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=3840x2160 fps=24 max s=3840x2160 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=nv12 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=640x480 fps=59.9402 max s=640x480 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=720x480 fps=59.9402 max s=720x480 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=720x576 fps=50 max s=720x576 fps=50
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=800x600 fps=60.0002 max s=800x600 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1024x768 fps=60.0002 max s=1024x768 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1280x720 fps=50 max s=1280x720 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1280x768 fps=60.0002 max s=1280x768 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1280x800 fps=60.0002 max s=1280x800 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1280x1024 fps=60.0002 max s=1280x1024 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1360x768 fps=60.0002 max s=1360x768 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1440x900 fps=60.0002 max s=1440x900 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1680x1050 fps=60.0002 max s=1680x1050 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=2560x1080 fps=60.0002 max s=2560x1080 fps=144.001
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=2560x1440 fps=59.9402 max s=2560x1440 fps=144.001
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=3440x1440 fps=50 max s=3440x1440 fps=100
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=3840x2160 fps=24 max s=3840x2160 fps=60.0002
[dshow @ 000001c463ac8a40] unknown compression type 0x30313050 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=640x480 fps=59.9402 max s=640x480 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=720x480 fps=59.9402 max s=720x480 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=720x576 fps=50 max s=720x576 fps=50
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=800x600 fps=60.0002 max s=800x600 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1024x768 fps=60.0002 max s=1024x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1280x720 fps=50 max s=1280x720 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1280x768 fps=60.0002 max s=1280x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1280x800 fps=60.0002 max s=1280x800 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1280x1024 fps=60.0002 max s=1280x1024 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1360x768 fps=60.0002 max s=1360x768 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1440x900 fps=60.0002 max s=1440x900 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1680x1050 fps=60.0002 max s=1680x1050 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=2560x1080 fps=60.0002 max s=2560x1080 fps=144.001
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=2560x1440 fps=59.9402 max s=2560x1440 fps=120
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=3440x1440 fps=50 max s=3440x1440 fps=100
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=3840x2160 fps=24 max s=3840x2160 fps=60.0002
[dshow @ 000001c463ac8a40] pixel_format=bgr24 min s=1920x1080 fps=24 max s=1920x1080 fps=240.004
[dshow @ 000001c463ac8a40] Pin "Audio Mixer" (alternative pin name "1")
[dshow @ 000001c463ac8a40] Pin "Audio" (alternative pin name "2")
[dshow @ 000001c463ac8a40] Selecting pin Capture on video
Change History (46)
comment:1 by , 5 years ago
Cc: | added |
---|
comment:2 by , 5 years ago
Summary: | No PixelFormatTag for 010P (0x30313050) → No PixelFormatTag for P010 (fourcc 0x30313050) |
---|
comment:3 by , 5 years ago
Component: | avcodec → avdevice |
---|---|
Keywords: | dshow added |
Priority: | normal → wish |
Type: | defect → enhancement |
Version: | unspecified → git-master |
comment:4 by , 5 years ago
Awesome, thanks for the quick response. I didn't have an env + dependencies set up for this project yet (typically work in .Net), so that took a bit of time. The new executable recognizes p010 from the capture card. I only made the patch to raw.c, left off the patch to dshow.c, as the avpriv_find_pix_fmt func already spins through the list of pixel formats from raw.c looking for a fourcc match, so it wins by default :) Thanks!
For my testing, first captured raw video:
ffmpeg -hide_banner -y -f dshow -video_size 3840x2160 -pix_fmt p010 -r 30 -rtbufsize 2047.48M -i video="AVerMedia HD Capture GC573 1" -c:v copy d:\out.yuv
Then dumped into avi:
ffmpeg -f rawvideo -video_size 3840x2160 -pix_fmt p010 -rtbufsize 2047.48M -i d:\out.yuv -pix_fmt p010 -c:v magicyuv d:\out.avi
follow-ups: 6 8 comment:5 by , 5 years ago
If you did not test my patch please send your patch - made with git format-patch
- to the FFmpeg development mailing list.
follow-up: 7 comment:6 by , 5 years ago
Replying to cehoyos:
If you did not test my patch please send your patch - made with
git format-patch
- to the FFmpeg development mailing list.
He meant he used only
diff --git a/libavcodec/raw.c b/libavcodec/raw.c index b6fb91c1c6..6052f18983 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -72,6 +72,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { { AV_PIX_FMT_GRAY8, MKTAG('G', 'R', 'E', 'Y') }, { AV_PIX_FMT_NV12, MKTAG('N', 'V', '1', '2') }, { AV_PIX_FMT_NV21, MKTAG('N', 'V', '2', '1') }, + { AV_PIX_FMT_P010LE, MKTAG('P', '0', '1', '0') }, /* nut */ { AV_PIX_FMT_RGB555LE, MKTAG('R', 'G', 'B', 15) },
comment:7 by , 5 years ago
Replying to Balling:
He meant he used only
diff --git a/libavcodec/raw.c b/libavcodec/raw.c index b6fb91c1c6..6052f18983 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -72,6 +72,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { { AV_PIX_FMT_GRAY8, MKTAG('G', 'R', 'E', 'Y') }, { AV_PIX_FMT_NV12, MKTAG('N', 'V', '1', '2') }, { AV_PIX_FMT_NV21, MKTAG('N', 'V', '2', '1') }, + { AV_PIX_FMT_P010LE, MKTAG('P', '0', '1', '0') }, /* nut */ { AV_PIX_FMT_RGB555LE, MKTAG('R', 'G', 'B', 15) },
Correct, that's what I meant. Just the one line in raw.c. Still cehoyos code, just the first portion of the patch.
follow-up: 9 comment:8 by , 5 years ago
Hi, I had tested your patch, and things seem to be working. However, I'm unable to submit the patch myself, as my Git for Windows does not have msmtp for git sendmail, and is otherwise not working, not sure what the issue is. Could you go ahead and submit your patch (or just the portion of it that applies to raw.c, see Balling's response)? Thanks.
Replying to cehoyos:
If you did not test my patch please send your patch - made with
git format-patch
- to the FFmpeg development mailing list.
follow-up: 10 comment:9 by , 5 years ago
Replying to pheedbaq3:
I'm unable to submit the patch myself, as my Git for Windows does not have msmtp for git sendmail
As said, use git format-patch
.
follow-up: 11 comment:10 by , 5 years ago
Replying to cehoyos:
Replying to pheedbaq3:
I'm unable to submit the patch myself, as my Git for Windows does not have msmtp for git sendmail
As said, use
git format-patch
.
... git format-patch does not send email, hence my need to use git send-mail, hence the dilemma because Git for Windows 2+ does not include msmtp, required by git send-mail in Windows... as said.
follow-up: 12 comment:11 by , 5 years ago
Replying to pheedbaq3:
Replying to cehoyos:
Replying to pheedbaq3:
I'm unable to submit the patch myself, as my Git for Windows does not have msmtp for git sendmail
As said, use
git format-patch
.
... git format-patch does not send email
No, it creates a file that you can use as attachment in an email sent from your favorite mail client.
follow-ups: 13 14 comment:12 by , 5 years ago
Replying to cehoyos:
Replying to pheedbaq3:
Replying to cehoyos:
Replying to pheedbaq3:
I'm unable to submit the patch myself, as my Git for Windows does not have msmtp for git sendmail
As said, use
git format-patch
.
... git format-patch does not send email
No, it creates a file that you can use as attachment in an email sent from your favorite mail client.
From the developer docs, "Submitting Patches":
"...If you cannot [use git send-mail], then send patches as base64-encoded attachments, so your patch is not trashed during transmission. Also ensure the correct mime type is used (text/x-diff or text/x-patch or at least text/plain)"
Not terribly conducive to "your favorite mail client" scenario since the avg mail client does not provide ways of ensuring those settings.
Just saying, I'm not part of the dev group, don't have the entire build environment, just trying to submit a one-line patch. Fairly innocuous... I thought.
I'll give it a shot with Outlook.
comment:13 by , 5 years ago
Replying to pheedbaq3:
Also ensure the correct mime type is used (text/x-diff or text/x-patch or at least text/plain)
Add .txt
to the name of your patch file to ensure this.
follow-up: 15 comment:14 by , 5 years ago
Replying to pheedbaq3:
Just saying, I'm not part of the dev group, don't have the entire build environment
That's indeed a problem as your change breaks fate and therefore cannot be committed as-is.
follow-up: 16 comment:15 by , 5 years ago
follow-ups: 17 18 comment:16 by , 5 years ago
Replying to pheedbaq3:
Replying to cehoyos:
Replying to pheedbaq3:
Just saying, I'm not part of the dev group, don't have the entire build environment
That's indeed a problem as your change breaks fate and therefore cannot be committed as-is.
Not sure what you mean by "breaks fate"?
FFmpeg's self test is called fate, you run it with make fate
which is sufficient to see the issue (that nut does not define a tag for P010 iiuc).
comment:17 by , 5 years ago
Replying to cehoyos:
Replying to pheedbaq3:
Replying to cehoyos:
Replying to pheedbaq3:
Just saying, I'm not part of the dev group, don't have the entire build environment
That's indeed a problem as your change breaks fate and therefore cannot be committed as-is.
Not sure what you mean by "breaks fate"?
FFmpeg's self test is called fate, you run it with
make fate
which is sufficient to see the issue (that nut does not define a tag for P010 iiuc).
Ah ok, well that at least gives me a next direction to go in. I'll tinker with it a bit more and see if I can't resolve that.
comment:18 by , 5 years ago
Replying to cehoyos:
FFmpeg's self test is called fate, you run it with
make fate
which is sufficient to see the issue (that nut does not define a tag for P010 iiuc).
So I ran the tests. First run, I got the same error that I believe you were referring to. Based on that I added the tag for P010 to nut.c. Second run, that error is now gone, but I get a different, nondescript (to my eyes anyway) error now:
ffmpeg version N-96535-g9793427c9e Copyright (c) 2000-2020 the FFmpeg developers built with Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28314 for x64 configuration: --target-os=win64 --arch=x86_64 --toolchain=msvc libavutil 56. 38.100 / 56. 38.100 libavcodec 58. 67.100 / 58. 67.100 libavformat 58. 36.100 / 58. 36.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 71.100 / 7. 71.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 Input #0, image2, from 'c:/Users/User1/source/repos/ffmpeg/tests/vsynth1/%02d.pgm': Duration: 00:00:02.00, start: 0.000000, bitrate: N/A Stream #0:0: Video: pgmyuv, yuv420p, 352x288, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (pgmyuv (native) -> rawvideo (native)) Output #0, nut, to 'md5:': Stream #0:0: Video: rawvideo (P010 / 0x30313050), p010le, 352x288, q=2-31, 38016 kb/s, 25 fps, 51200 tbn, 25 tbc Metadata: encoder : Lavc rawvideo frame= 5 fps=0.0 q=-0.0 Lsize= 1485kB time=00:00:00.16 bitrate=76042.9kbits/s speed=12.3x video:1485kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.026831%
Not sure exactly what's going on there, but I'll keep at it.
comment:19 by , 4 years ago
Would it be possible to have someone more knowledgeable on the dshow and testing sections of code take a further look at this? I put some effort into trying to resolve the latest issue indicated by the test suite failure, but I haven't the foggiest idea where in the code (or test suite) the real issue. The error I got did not really give me much of a direction to go in :(
comment:21 by , 4 years ago
See the post directly above my last. That is the output of fate at the point of failure.
follow-up: 25 comment:23 by , 4 years ago
Concerning your configure line: --arch=x86_64
has no effect
comment:24 by , 4 years ago
My point exactly. It fails on that particular test and provides no further information.
Replying to cehoyos:
There is no error visible.
comment:25 by , 4 years ago
Not sure what bearing that has on this, the tests run fine until fate gets to the one referenced in my previous post (tests on pgm files).
Replying to cehoyos:
Concerning your configure line:
--arch=x86_64
has no effect
comment:26 by , 4 years ago
Finally got back around to digging into this a bit more. Fate does indicate an error, but the error file itself doesn't seem to indicate anything in particular.
Fate indicating an error has occurred:
Test filter-pixdesc-p010le failed. Look at tests/data/fate/filter-pixdesc-p010le.err for details. make: *** [tests/Makefile:256: fate-filter-pixdesc-p010le] Error 1
filter-pixdesc-p010le.err:
ffmpeg version 4.3.git Copyright (c) 2000-2020 the FFmpeg developers built with gcc 10.1.0 (Rev3, Built by MSYS2 project) configuration: --samples=fate-suite/ libavutil 56. 55.100 / 56. 55.100 libavcodec 58. 93.104 / 58. 93.104 libavformat 58. 47.100 / 58. 47.100 libavdevice 58. 11.101 / 58. 11.101 libavfilter 7. 86.100 / 7. 86.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 Input #0, image2, from 'C:/msys64/home/User1/ffmpeg/tests/vsynth1/%02d.pgm': Duration: 00:00:02.00, start: 0.000000, bitrate: N/A Stream #0:0: Video: pgmyuv, yuv420p, 352x288, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (pgmyuv (native) -> rawvideo (native)) Output #0, nut, to 'md5:': Stream #0:0: Video: rawvideo (P010 / 0x30313050), p010le, 352x288, q=2-31, 38016 kb/s, 25 fps, 51200 tbn, 25 tbc Metadata: encoder : Lavc rawvideo frame= 5 fps=0.0 q=-0.0 Lsize= 1485kB time=00:00:00.16 bitrate=76042.9kbits/s speed=16.2x video:1485kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.026831%
follow-up: 28 comment:27 by , 4 years ago
bump
Any possible way to get someone to look at/test this 2-line patch to add support for P010 on the Live Gamer 4K (GC573)? The code for some reason breaks fate, but no clear error or diagnostic is given that indicates why.
comment:28 by , 4 years ago
Replying to pheedbaq3:
bump
Any possible way to get someone to look at/test this 1-line patch to add support for P010 on the Live Gamer 4K (GC573)? The code for some reason breaks fate, but no clear error or diagnostic is given that indicates why.
What file is broken with FATE?? I found it very strange.
follow-up: 30 comment:29 by , 4 years ago
Based on the error file FATE produced (filter-pixdesc-p010le.err):
Input #0, image2, from 'C:/msys64/home/User1/ffmpeg/tests/vsynth1/%02d.pgm'
Beyond that, I'm at the end of my diagnostic capabilities without further info, given my limited experience with the build environment and not being a member/contributor to the project. This is my very first experience attempting to dig into and modify code in ffmpeg. Just wanted to add support for the HDR format my capture card is capable of using :)
comment:30 by , 4 years ago
Status: | new → open |
---|
Replying to pheedbaq3:
Just wanted to add support for the HDR format my capture card is capable of using :)
Just for your information in many cases when you fix the code, etc, you will have to change FATE hashes. See https://github.com/FFmpeg/FFmpeg/commit/99882d05a6635446d587ed51b095c627abc42587
Now, why do you think it is now HDR? For it to be HDR you will have to tag AVI file as transfer characteristics PQ. P010 in by itself is not signalling HDR, of course.
comment:31 by , 4 years ago
Well, I'm basing that on the fact that my capture card software (AverMedia RECentral 4) has an HDR recording option that is only enabled if P010 format is also selected, so I assume it sets transfer characteristics to PQ with that option. Other formats in the program do not allow recording HDR at all, only P010.
I'm completely unfamiliar with FATE hashes, and how they are created/used. Do you have a concise explanation or perhaps documentation where I can read further on that?
Thanks for responding btw, I realize I'm kind of fumbling in the dark here :\
comment:32 by , 3 years ago
Do we know how dshow signals PQ transfer function or any transfer function for that matter?
comment:33 by , 3 years ago
Cc: | added |
---|
follow-up: 35 comment:34 by , 3 years ago
dshow currently doesn't get extended color information (as MS calls it, range, transfer matrix, etc) from the source device. But it is possible to query if the device exposes that info:
https://docs.microsoft.com/en-us/windows/win32/medfound/extended-color-information
Perhaps querying and using that information should be separate from this patch, which does what its supposed to do?
comment:35 by , 3 years ago
Replying to Diederick Niehorster:
Perhaps querying and using that information should be separate from this patch, which does what its supposed to do?
Of course!!
P.S. At least PQ transfer MUST be signalled like this to say it is HDR. P010 or P016 (P016 is bad in ffmpeg though) do not signal HDR in by itself, they will default to BT.601 matrix (dunno about what transfer and primaries, but I suppose BT.709) in ffmpeg! Unless you will use not total raw, but something like y4m. See https://code.videolan.org/videolan/x264/-/commit/5bc04b8d1ed2f6c1a85e8734219eb38c2dccd2a4 and next commit.
follow-up: 37 comment:36 by , 3 years ago
@Balling, I'm new here. I have half a patch to at least extract the info from a dshow source (half because i am not color space expert, not sure i got mapping correct). I need help completing this. Can i submit WIP/help needed patches to this tracker as well, or is there a better forum for that?
comment:37 by , 3 years ago
Replying to Diederick Niehorster:
@Balling, I'm new here. I have half a patch to at least extract the info from a dshow source (half because i am not color space expert, not sure i got mapping correct). I need help completing this. Can i submit WIP/help needed patches to this tracker as well, or is there a better forum for that?
No, they should be submitted to mailing list. I use this with Gmail: https://github.com/google/gmail-oauth2-tools/tree/master/go/sendgmail
The instruction is outdated though a little (you need to publish an app in google cloud platform). You must first subscribe (no need to listen to all patches, though, oogh). See: https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
not sure i got mapping correct
Paste the git diff here, I will tell you. It is pretty simple.
follow-up: 40 comment:38 by , 3 years ago
Please do not mix the patch to fix this ticket with anything else, especially not with any colourspace signalling!
follow-up: 42 comment:39 by , 3 years ago
You can use git format-patch
to create a patch file that you can attach to an email to the FFmpeg development mailing list, there is no need to use git send-email
unless you want to use it.
comment:40 by , 3 years ago
Replying to Carl Eugen Hoyos:
Please do not mix the patch to fix this ticket with anything else, especially not with any colourspace signalling!
It is needed for HDR. If it is indeed HDR. Sigh.
comment:41 by , 3 years ago
Thanks Balling for advice on how to proceed, and the offer to look at what I've done! To stop further discussion here, i have made a ticket with a start of a patch: https://trac.ffmpeg.org/ticket/9271. This seemed better to me than the mailing list as its super incomplete (see mentioned TODOs). If even such not-meant-to-be-committed patches should go to mailing list, i'll close and go there.
comment:42 by , 3 years ago
Replying to Carl Eugen Hoyos:
You can use
git format-patch
to create a patch file that you can attach to an email to the FFmpeg development mailing list, there is no need to usegit send-email
unless you wantu to use it.
You need to also set UTF-8 and use .txt for the file for it to be recognised as correct mime type. And even then it can fail on patchwork, because patchwork changes the 7-bit encoding of email while it resends stuff internally through your ffbox0-bg, etc, etc to get into gmail account for patchwork! (BTW, WHAT?)
comment:43 by , 3 years ago
Okay, I will send a patch in nut.c and raw.c and we will see how to fix FATE in tests/ref/fate/filter-pixdesc-p010le. I mean it was done before! https://patchwork.ffmpeg.org/project/ffmpeg/patch/20190514055313.22481-1-andreas.rheinhardt@gmail.com/
Wait a second, 0x30313050 is BE (big endian), no?
Please test this patch: