<div dir="ltr"><div class="gmail_quote">On Wed, Jun 6, 2012 at 5:22 AM, Sampath Subasinghe <span dir="ltr"><<a href="mailto:susiriss@gmail.com" target="_blank">susiriss@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 06/05/2012 12:28 PM, Carl Eugen Hoyos wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sampath Subasinghe <susiriss@...> writes:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1. RGB - YUV conversion<br>
2. YUV - RGB conversion<br>
<br>
Issue is that in the image output from step 2, the right<br>
edge of the image is missing, means the pixels are black.<br>
</blockquote>
Is this also reproducible if you use ffmpeg (the application)?<br>
If yes, please provide a command line and complete, uncut<br>
console output.<br>
</blockquote>
Hi Carl,<br>
I was wondering whether this is what you meant. I have the original image as a ppm image.<br>
then I do,<br>
ffmpeg - i ref.ppm ref.yuv<br>
which outputs following at the command line<br>
<br>
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers<br>
built on Apr 27 2012 07:58:14 with gcc 4.4.5<br>
configuration: --enable-shared --enable-gpl --enable-nonfree --enable-x11grab --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-pic<br>
WARNING: library configuration mismatch<br>
avutil configuration: --enable-gpl --enable-nonfree --enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-pic<br>
avfilter configuration: --enable-gpl --enable-nonfree --enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-pic<br>
swresample configuration: --enable-gpl --enable-nonfree --enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-pic<br>
libavutil 51. 35.100 / 51. 47.100<br>
libavcodec 53. 61.100 / 53. 61.100<br>
libavformat 53. 32.100 / 53. 32.100<br>
libavdevice 53. 4.100 / 53. 4.100<br>
libavfilter 2. 61.100 / 2. 72.100<br>
libswscale 2. 1.100 / 2. 1.100<br>
libswresample 0. 6.100 / 0. 11.100<br>
libpostproc 52. 0.100 / 52. 0.100<br>
Input #0, image2, from 'ref.ppm':<br>
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A<br>
Stream #0:0: Video: ppm, rgb24, 45x32, 25 tbr, 25 tbn, 25 tbc<br>
[buffer @ 0x1d457a0] w:45 h:32 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:<br>
Output #0, rawvideo, to 'ref.yuv':<br>
Metadata:<br>
encoder : Lavf53.32.100<br>
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 45x32, q=2-31, 200 kb/s, 90k tbn, 25 tbc<br>
Stream mapping:<br>
Stream #0:0 -> #0:0 (ppm -> rawvideo)<br>
Press [q] to stop, [?] for help<br>
frame= 1 fps= 0 q=0.0 Lsize= 4kB time=00:00:00.04 bitrate= 864.0kbits/s<br>
video:4kB audio:0kB global headers:0kB muxing overhead 0.000000%<br>
------------------------------<u></u>-----<br>
<br>
Which of course has warnings in it.<br>
<br>
Then I do<br>
ffmpeg -i ref.yuv ref.ppm<br>
which outputs following.<br>
------------------------------<u></u>-----------<br>
ffmpeg -i ref.yuv ref.ppm<br>
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers<br>
built on Apr 27 2012 07:58:14 with gcc 4.4.5<br>
configuration: --enable-shared --enable-gpl --enable-nonfree --enable-x11grab --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-pic<br>
WARNING: library configuration mismatch<br>
avutil configuration: --enable-gpl --enable-nonfree --enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-pic<br>
avfilter configuration: --enable-gpl --enable-nonfree --enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-pic<br>
swresample configuration: --enable-gpl --enable-nonfree --enable-shared --disable-ffserver --enable-x11grab --enable-libaacplus --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-pic<br>
libavutil 51. 35.100 / 51. 47.100<br>
libavcodec 53. 61.100 / 53. 61.100<br>
libavformat 53. 32.100 / 53. 32.100<br>
libavdevice 53. 4.100 / 53. 4.100<br>
libavfilter 2. 61.100 / 2. 72.100<br>
libswscale 2. 1.100 / 2. 1.100<br>
libswresample 0. 6.100 / 0. 11.100<br>
libpostproc 52. 0.100 / 52. 0.100<br>
[IMGUTILS @ 0x7fff69baf6a0] Picture size 0x0 is invalid<br>
[IMGUTILS @ 0x7fff69baf580] Picture size 0x0 is invalid<br>
[rawvideo @ 0x1e8e3a0] decoding for stream 0 failed<br>
[rawvideo @ 0x1e8e3a0] Could not find codec parameters (Video: rawvideo, yuv420p)<br>
[rawvideo @ 0x1e8e3a0] Estimating duration from bitrate, this may be inaccurate<br>
ref.yuv: could not find codec parameters<br>
------------------------------<u></u>-----------------------<br>
I know, my command has errors, but I don't have an idea as to how I should test the scenario you mentioned. Could you please give me a sample command line?<br>
<br>
thanks.<br>
-Sampath<br></blockquote><div><br>To read yuv raw image, you must supply the picture size and pixel format on the command line, e.g. <br><br>ffmpeg -s 45x32 -pix_fmt yuv420p -i ref.yuv ref.ppm<br><br>Regards,<br>Alex Cohn<br>
</div></div></div>