[Ffmpeg-devel] -pad parameters

Luca Abeni lucabe72
Tue Jun 6 09:05:48 CEST 2006


Hi Herv?,

On Sun, 2006-06-04 at 13:24 +0200, herve.flores wrote:
[...]
> 2nd, I'm on Mac 10.4.6 on PPC
[...]
> power-mac-g4-de-herve:~ herve$  ffmpeg -v 1 -i ~/test_pad.mp4 -s  
> 720x436 -padtop 70 -padbottom 70 -padcolor 000000 -r pal -f  
> image2pipe -vcodec ppm - | ffmpeg -v 1 -f image2pipe -vcodec ppm -i -  
> -y -f rawvideo -vcodec mpeg2video -target dvd -aspect 4:3 -an ~/ 
> Desktop/output.m2v
> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
>    configuration:  --enable-pthreads --enable-static --disable-shared  
> --enable-a52 --enable-x264 --enable-gpl --enable-amr_nb --enable- 
> amr_wb --enable-xvid --enable-mp3lame --enable-libogg --enable-libgsm  
> --enable-dts --enable-faac --disable-ffplay
>    libavutil version: 49.0.0
>    libavcodec version: 51.9.0
>    libavformat version: 50.4.0
>    built on Jun  4 2006 12:57:51, gcc: 4.0.1 (Apple Computer, Inc.  
> build 5341)
> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
>    configuration:  --enable-pthreads --enable-static --disable-shared  
> --enable-a52 --enable-x264 --enable-gpl --enable-amr_nb --enable- 
> amr_wb --enable-xvid --enable-mp3lame --enable-libogg --enable-libgsm  
> --enable-dts --enable-faac --disable-ffplay
>    libavutil version: 49.0.0
>    libavcodec version: 51.9.0
>    libavformat version: 50.4.0
>    built on Jun  4 2006 12:57:51, gcc: 4.0.1 (Apple Computer, Inc.  
> build 5341)
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/herve/test_pad.mp4':
>    Duration: 00:00:07.6, start: 0.000000, bitrate: 460 kb/s
>    Stream #0.0(und), 25.00 fps(r): Video: mpeg4, yuv420p, 720x576
>    Stream #0.1(und): Audio: mp4a / 0x6134706D, 48000 Hz, stereo
> Output #0, image2pipe, to 'pipe:':
>    Stream #0.0, 25.00 fps(c): Video: ppm, rgb24, 720x576, q=2-31, 200  
> kb/s
> Stream mapping:
>    Stream #0.0 -> #0.0
> Press [q] to stop encoding
> Input #0, image2pipe, from 'pipe:':ime=1.9 bitrate=248835.0kbits/s
>    Duration: N/A, bitrate: N/A
>    Stream #0.0, 25.00 fps(r): Video: ppm, rgb24, 720x576
> Assuming PAL for target.
> Output #0, dvd, to '/Users/herve/Desktop/output.m2v':
>    Stream #0.0, 25.00 fps(c): Video: mpeg2video, yuv420p, 720x576,  
> q=2-31, 6000 kb/s
> Stream mapping:
>    Stream #0.0 -> #0.0
> frame=  191 q=0.0 Lsize=  232068kB time=7.6 bitrate=248835.0kbits/s
> video:232068kB audio:0kB global headers:0kB muxing overhead 0.000000%
> frame=  191 q=2.0 Lsize=    1814kB time=7.6 bitrate=1955.3kbits/s
> video:1752kB audio:0kB global headers:0kB muxing overhead 3.526752%
I just tried, and I cannot reproduce the problem on x86. So, I think it
is an endianess problem.
My ibook is currently broken, so I cannot test on PPC.

> PS: with an output to yuv4mpegpipe or a direct encoding (no pipe)  
> there is no such pb (black remains black)
I am just guessing, but I do not think the problem is the pipe. The
problem seems to be that you are using ppm, which uses the rgb24 pixel
format (if you use yuv4mpegpipe, you do not use rgb24). Maybe rgb24 is
the problem... Is this pixel format endian-dependent?

Herv?,, do you really need "-f image2pipe -vcodec ppm"? Can you try "-f
yuv4mpeg" instead? (if my guess is correct, this should fix the
problem).

[...]
> parameter "-pad..." cancels parameter "-aspect":
Well, I do not know much about the "aspect" parameter... Anyway, I'll
try to have a look

[...]
> The last strange thing is that with (-s 644x576 -padright 38 -padleft  
> 38) or (-s 520x576 -padright 100 -padleft 100) the resulting display  
> size is the same:
> - real size        : 720*576
> - display size : 1272*576px
I just tried:
./ffmpeg -v 1 -i test_pad.mp4 -s 644x576 -padright 38 -padleft 38  -padcolor 000000 -aspect 16:9 -r pal -vcodec mpeg2video -y test.m2v
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --disable-v4l2 
  libavutil version: 49.0.0
  libavcodec version: 51.9.0
  libavformat version: 50.4.0
  built on Jun  6 2006 08:31:34, gcc: 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_pad.mp4':
  Duration: 00:00:07.6, start: 0.000000, bitrate: 460 kb/s
  Stream #0.0(und), 25.00 fps(r): Video: mpeg4, yuv420p, 720x576
  Stream #0.1(und): Audio: mp4a / 0x6134706D, 48000 Hz, stereo
Output #0, mpeg2video, to 'test.m2v':
  Stream #0.0, 25.00 fps(c): Video: mpeg2video, yuv420p, 720x576, q=2-31, 200 kb/s
Stream mapping:
  Stream #0.0 -> #0.0

./ffmpeg -i test.m2v 
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --disable-v4l2 
  libavutil version: 49.0.0
  libavcodec version: 51.9.0
  libavformat version: 50.4.0
  built on Jun  6 2006 08:31:34, gcc: 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)
Input #0, mpegvideo, from 'test.m2v':
  Duration: 00:00:00.0, start: 0.000000, bitrate: 86816 kb/s
  Stream #0.0, 25.00 fps(r): Video: mpeg2video, yuv420p, 720x576, 104857 kb/s

So, it looks correct (720x576).


				Luca
-- 
Proud to be "coglione"





More information about the ffmpeg-devel mailing list