#143(undetermined:new): YUV video to RGB image export color conversion issue
#143: YUV video to RGB image export color conversion issue ---------------------------+-------------------------- Reporter: peter_b | Type: defect Status: new | Priority: normal Component: undetermined | Version: unspecified Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | ---------------------------+-------------------------- When extracting images from the video (yuv422p), the color values in the interlaced areas of the video are deviate from their original beyond recognition. Image comparisons and the original video can be found at: http://download.das- werkstatt.com/pb/mthk/examples/color_problem/problem.html -- Ticket URL: <http://ffmpeg.org/trac/ffmpeg/ticket/143> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue --------------------------+--------------------------- Reporter: peter_b | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------+--------------------------- Comment (by peter_b): Baptiste Coudurier posted a patch on the ffmpeg-user mailing list. I've applied this patch to git-ff1efc5 and verfified that it fixes this issue. -- Ticket URL: <http://ffmpeg.org/trac/ffmpeg/ticket/143#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue --------------------------+--------------------------- Reporter: peter_b | Owner: Type: defect | Status: closed Priority: normal | Component: undetermined Version: unspecified | Resolution: fixed Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------+--------------------------- Changes (by compn): * status: new => closed * resolution: => fixed -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue --------------------------+--------------------------- Reporter: peter_b | Owner: Type: defect | Status: reopened Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------+--------------------------- Changes (by peter_b): * status: closed => reopened * resolution: fixed => Comment: I'm reopening this issue since the patch is currently not applied to upstream, because as Michael Niedermayer mentions [http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/131437 in a post on the devel-mailinglist]: [quote] the patch causes speed loss. Thats ok for 422 but the code is also used for 420 where there is speedloss but no quality gain iam not sure how to solve this [quote] -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:3> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue --------------------------+--------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------+--------------------------- Changes (by cehoyos): * status: reopened => open Comment: Please post a command line, complete, uncut output (and a sample)? -- Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/143#comment:4> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue --------------------------+--------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------+--------------------------- Comment (by peter_b): It's been a while since I've had this on my table, so I can't post the exact ffmpeg-commandline I've used right now. I'll post them here as soon as I get to it. The video sample I've used to test this, is located at: http://download.das-werkstatt.com/pb/mthk/examples/color_problem /testvideo_color_rectangles-YUV422P.avi (Encoding FFv1 PAL-SD resolution 720x576@25fps) If you try to export the frames of the above video as RGB images (e.g. png, jpg) you will always get the colors interpolated between the fields. Image samples can be found at: http://download.das- werkstatt.com/pb/mthk/examples/color_problem/problem.html -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:5> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue --------------------------+--------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------+--------------------------- Comment (by cehoyos): Please post a command line and complete, uncut output. -- Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/143#comment:6> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue -------------------------------------+------------------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: Version: unspecified | undetermined Keywords: RGB YUV | Resolution: color | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by cehoyos): Is this still reproducible or was this fixed in http://git.videolan.org/?p=ffmpeg.git;a=commit;h=5aa70309ad236cf7e218cdce913... ? -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:7> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue ---------------------------------------+----------------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: unspecified | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Changes (by cehoyos): * component: undetermined => swscale -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:8> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue ---------------------------------------+----------------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: unspecified | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by peter_b): I've checked [http://ffmpeg-users.933282.n4.nabble.com/YUV-video-to-RGB- image-export-color-conversion-issue-td3330185.html the mailing list archives], and the command line used was: {{{ ffmpeg -vframes 4 -i 'testvideo_color_rectangles-YUV422P.avi' -pix_fmt rgb24 -f image2 '%03d.bmp' }}} I've tried right now, and the error still persists: The colors are still wrongly interpolated. == FFmpeg version: == Git [http://git.videolan.org/?p=ffmpeg.git;a=commit;h=2169f971ad9b582cc3f1e6a1430... 2169f971ad9b582cc3f1e6a1430aad44d64495d3] (10 Jan 2012 06:15:18) == Uncut output: == {{{ ffmpeg version N-36659-g2169f97 Copyright (c) 2000-2012 the FFmpeg developers built on Jan 10 2012 14:29:42 with gcc 4.4.5 configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-bzlib --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-zlib --enable-libopenjpeg --enable-decoder=png --enable- encoder=png --enable-libdirac --enable-libschroedinger libavutil 51. 34.100 / 51. 34.100 libavcodec 53. 54.100 / 53. 54.100 libavformat 53. 29.100 / 53. 29.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 58.100 / 2. 58.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 51. 2.100 / 51. 2.100 Input #0, avi, from 'testvideo_color_rectangles-YUV422P.avi': Duration: 00:00:00.40, start: 0.000000, bitrate: 868 kb/s Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 720x576, 10 tbr, 10 tbn, 10 tbc Incompatible pixel format 'rgb24' for codec 'bmp', auto-selecting format 'bgr24' [buffer @ 0xa336f80] w:720 h:576 pixfmt:yuv422p tb:1/1000000 sar:0/1 sws_param: [buffersink @ 0xa3385c0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out' [scale @ 0xa330d80] w:720 h:576 fmt:yuv422p -> w:720 h:576 fmt:bgr24 flags:0x4 [swscaler @ 0xa3311c0] No accelerated colorspace conversion found from yuv422p to bgr24. [swscaler @ 0xa3463e0] No accelerated colorspace conversion found from yuv422p to bgr24. [swscaler @ 0xa34ae60] No accelerated colorspace conversion found from yuv422p to bgr24. Output #0, image2, to '%03d.bmp': Metadata: encoder : Lavf53.29.100 Stream #0:0: Video: bmp, bgr24, 720x576, q=2-31, 200 kb/s, 90k tbn, 10 tbc Stream mapping: Stream #0:0 -> #0:0 (ffv1 -> bmp) Press [q] to stop, [?] for help frame= 4 fps= 0 q=0.0 Lsize= 0kB time=00:00:00.40 bitrate= 0.0kbits/s video:4860kB audio:0kB global headers:0kB muxing overhead -100.000000% }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:9> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue ---------------------------------------+----------------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: unspecified | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by peter_b): Additionally, Baptiste's patch cannot be applied to the current git version anymore, as the code has changed too much since the version the patch was written for (SVN revision 32669). -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:10> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue ---------------------------------------+----------------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Changes (by cehoyos): * version: unspecified => git-master * reproduced: 0 => 1 Comment: {{{ $ ffmpeg -i yuvj422.jpg out.bmp ffmpeg version N-36662-g93d49cb Copyright (c) 2000-2012 the FFmpeg developers built on Jan 10 2012 19:07:13 with gcc 4.5.3 configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32' libavutil 51. 34.100 / 51. 34.100 libavcodec 53. 54.100 / 53. 54.100 libavformat 53. 29.100 / 53. 29.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 58.100 / 2. 58.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 Input #0, image2, from 'yuvj422.jpg': Duration: 00:00:00.04, start: 0.000000, bitrate: N/A Stream #0:0: Video: mjpeg, yuvj422p, 720x576, 25 tbr, 25 tbn, 25 tbc Incompatible pixel format 'yuvj422p' for codec 'bmp', auto-selecting format 'bgr24' [buffer @ 0x8dd8000] w:720 h:576 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param: [buffersink @ 0x8dd8d20] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out' [scale @ 0x8dd9240] w:720 h:576 fmt:yuvj422p -> w:720 h:576 fmt:bgr24 flags:0x4 [swscaler @ 0x8de4280] No accelerated colorspace conversion found from yuv422p to bgr24. [swscaler @ 0x8dee060] No accelerated colorspace conversion found from yuv422p to bgr24. [swscaler @ 0x8df2b00] No accelerated colorspace conversion found from yuv422p to bgr24. Output #0, image2, to 'out.bmp': Metadata: encoder : Lavf53.29.100 Stream #0:0: Video: bmp, bgr24, 720x576, q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (mjpeg -> bmp) Press [q] to stop, [?] for help frame= 1 fps= 0 q=0.0 Lsize= 0kB time=00:00:00.04 bitrate= 0.0kbits/s video:1215kB audio:0kB global headers:0kB muxing overhead -100.000000% }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:11> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue ---------------------------------------+----------------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by peter_b): I'm not sure what you're trying to tell me, but I've reproduced your conversion and attached the resulting RGB as PNG (not BMP, due to filesize issues): [[attachment:yuvj422jpg-N-36728-g794006f.png]] {{{ $ ffmpeg -i yuvj422.jpg out/out.png ffmpeg version N-36728-g794006f Copyright (c) 2000-2012 the FFmpeg developers built on Jan 12 2012 09:16:04 with gcc 4.4.5 configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-bzlib --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-zlib --enable-libopenjpeg --enable-decoder=png --enable- encoder=png --enable-libdirac --enable-libschroedinger libavutil 51. 34.100 / 51. 34.100 libavcodec 53. 55.100 / 53. 55.100 libavformat 53. 29.100 / 53. 29.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 58.100 / 2. 58.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 51. 2.100 / 51. 2.100 Input #0, image2, from 'yuvj422.jpg': Duration: 00:00:00.04, start: 0.000000, bitrate: N/A Stream #0:0: Video: mjpeg, yuvj422p, 720x576, 25 tbr, 25 tbn, 25 tbc Incompatible pixel format 'yuvj422p' for codec 'png', auto-selecting format 'rgb24' [buffer @ 0x9351e20] w:720 h:576 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param: [buffersink @ 0x93487e0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out' [scale @ 0x9348d40] w:720 h:576 fmt:yuvj422p -> w:720 h:576 fmt:rgb24 flags:0x4 [swscaler @ 0x9357b60] No accelerated colorspace conversion found from yuv422p to rgb24. [swscaler @ 0x9367800] No accelerated colorspace conversion found from yuv422p to rgb24. [swscaler @ 0x936d2a0] No accelerated colorspace conversion found from yuv422p to rgb24. Output #0, image2, to 'out/out.png': Metadata: encoder : Lavf53.29.100 Stream #0:0: Video: png, rgb24, 720x576, q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (mjpeg -> png) Press [q] to stop, [?] for help frame= 1 fps= 0 q=0.0 Lsize= 0kB time=00:00:00.04 bitrate= 0.0kbits/s video:5kB audio:0kB global headers:0kB muxing overhead -100.000000% }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:12> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue ---------------------------------------+----------------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by cehoyos): Replying to [comment:12 peter_b]:
I'm not sure what you're trying to tell me... ;)
In August, I asked for a command line (and complete, uncut console output) and a sample. You added a command line (and the console output) two days ago, I was able to reproduce your issue, I set the "Reproduced"-flag and I added a sample. I did not ask for the resulting RGB file because I do not remember an issue where attaching the resulting file made reproducing the issue easier. I hope that clears it up ;-) -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:13> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue ---------------------------------------+----------------------------------- Reporter: peter_b | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by peter_b): Understood. Thanks. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:14> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#143: YUV video to RGB image export color conversion issue ---------------------------------------+----------------------------------- Reporter: peter_b | Owner: Type: defect | Status: closed Priority: normal | Component: swscale Version: git-master | Resolution: fixed Keywords: RGB YUV color | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Changes (by michael): * status: open => closed * resolution: => fixed Comment: It appears this has been fixed by some change since it was reported, i cant reproduce it anymore -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/143#comment:15> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg