[Libav-user] Coversion from YUV to RGB loss of image details

Sampath Subasinghe susiriss at gmail.com
Wed Jun 6 17:57:01 CEST 2012


> $ ffmpeg -i out.ppm -pix_fmt yuv420p -strict experimental out.ljpg
> $ ffmpeg -i out.ljpg ref2.ppm
>> I'm also seeing the black edge with above commands.
>
>> (Except, I had to precede the second command with
>> -pix_fmt yuv420p to avoid seg faulting ffmpeg).
> This sounds like an important issue that I cannot reproduce here,
> please provide more information.
>
> Carl Eugen
>
>
Hi Carl,
     This is the output I get if I issue that second command without 
-pix_fmt yuv420p
$ ffmpeg -i out.ljpg ref2.ppm
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
   built on Apr 27 2012 07:58:14 with gcc 4.4.5
   configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-x11grab --enable-libfaac --enable-libfreetype 
--enable-libmp3lame --enable-libx264 --enable-pic
   WARNING: library configuration mismatch
   avutil      configuration: --enable-gpl --enable-nonfree 
--enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus 
--enable-libfaac --enable-libfreetype --enable-libmp3lame 
--enable-libx264 --enable-pic
   avfilter    configuration: --enable-gpl --enable-nonfree 
--enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus 
--enable-libfaac --enable-libfreetype --enable-libmp3lame 
--enable-libx264 --enable-pic
   swresample  configuration: --enable-gpl --enable-nonfree 
--enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus 
--enable-libfaac --enable-libfreetype --enable-libmp3lame 
--enable-libx264 --enable-pic
   libavutil      51. 35.100 / 51. 47.100
   libavcodec     53. 61.100 / 53. 61.100
   libavformat    53. 32.100 / 53. 32.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 61.100 /  2. 72.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0.  6.100 /  0. 11.100
   libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from 'out.ljpg':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: mjpeg, yuv420p, 45x32, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'yuv420p' for codec 'ppm', auto-selecting 
format 'rgb24'
[buffer @ 0x1160b20] w:45 h:32 pixfmt:yuv420p tb:1/1000000 sar:0/1 
sws_param:
[buffersink @ 0x1154ca0] auto-inserting filter 'auto-inserted scale 0' 
between the filter 'src' and the filter 'out'
[scale @ 0x11555a0] w:45 h:32 fmt:yuv420p sar:0/1 -> w:45 h:32 fmt:rgb24 
sar:0/1 flags:0x4
Output #0, image2, to 'ref2.ppm':
   Metadata:
     encoder         : Lavf53.32.100
     Stream #0:0: Video: ppm, rgb24, 45x32, q=2-31, 200 kb/s, 90k tbn, 
25 tbc
Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg -> ppm)
Press [q] to stop, [?] for help
Segmentation fault
-------------------------------

Note the "Incompatible pixel format....". Please let me know if you want 
any other details.

Also I tried, Alex's two commands, again ffmpeg crashes.
*$ ffmpeg -i ref.ppm  -pix_fmt yuv420p t.yuv*

Truncated output:
ffmpeg -i ref.ppm -pix_fmt yuv420p t.yuv
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
   built on Apr 27 2012 07:58:14 with gcc 4.4.5
   configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-x11grab --enable-libfaac --enable-libfreetype 
--enable-libmp3lame --enable-libx264 --enable-pic
   WARNING: library configuration mismatch
   avutil      configuration: --enable-gpl --enable-nonfree 
--enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus 
--enable-libfaac --enable-libfreetype --enable-libmp3lame 
--enable-libx264 --enable-pic
   avfilter    configuration: --enable-gpl --enable-nonfree 
--enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus 
--enable-libfaac --enable-libfreetype --enable-libmp3lame 
--enable-libx264 --enable-pic
   swresample  configuration: --enable-gpl --enable-nonfree 
--enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus 
--enable-libfaac --enable-libfreetype --enable-libmp3lame 
--enable-libx264 --enable-pic
   libavutil      51. 35.100 / 51. 47.100
   libavcodec     53. 61.100 / 53. 61.100
   libavformat    53. 32.100 / 53. 32.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 61.100 /  2. 72.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0.  6.100 /  0. 11.100
   libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from 'ref.ppm':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: ppm, rgb24, 45x32, 25 tbr, 25 tbn, 25 tbc
[buffer @ 0x253a0a0] w:45 h:32 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x25418a0] auto-inserting filter 'auto-inserted scale 0' 
between the filter 'src' and the filter 'out'
[scale @ 0x25421a0] w:45 h:32 fmt:rgb24 sar:0/1 -> w:45 h:32 fmt:yuv420p 
sar:0/1 flags:0x4
Output #0, rawvideo, to 't.yuv':
   Metadata:
     encoder         : Lavf53.32.100
     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 45x32, 
q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
   Stream #0:0 -> #0:0 (ppm -> rawvideo)
Press [q] to stop, [?] for help
*** glibc detected *** ffmpeg: corrupted double-linked list: 
0x000000000256b760 ***
======= Backtrace: =========

...

thanks
-Sampath

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120606/6e18590d/attachment.html>


More information about the Libav-user mailing list