[FFmpeg-user] alpha channel "overlay" or "movie"

angelfilo at gmail.com angelfilo at gmail.com
Mon Aug 6 23:26:26 CEST 2012


this is all I see

$ ffmpeg -i video1.mov -i video2.mov -loglevel verbose -filter_complex "scale=512:304,overlay=0:0" video_result.mov

objc[7219]: Class SDLTranslatorResponder is implemented in both /opt/local/lib/libSDL-1.2.0.dylib and /usr/local/lib/libavdevice.54.dylib. One of the two will be used. Which one is undefined.
objc[7219]: Class SDL_QuartzView is implemented in both /opt/local/lib/libSDL-1.2.0.dylib and /usr/local/lib/libavdevice.54.dylib. One of the two will be used. Which one is undefined.
objc[7219]: Class SDL_QuartzWindowDelegate is implemented in both /opt/local/lib/libSDL-1.2.0.dylib and /usr/local/lib/libavdevice.54.dylib. One of the two will be used. Which one is undefined.
objc[7219]: Class SDL_QuartzWindow is implemented in both /opt/local/lib/libSDL-1.2.0.dylib and /usr/local/lib/libavdevice.54.dylib. One of the two will be used. Which one is undefined.
ffmpeg version N-43170-gd84dd35 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  6 2012 18:05:03 with llvm-gcc 4.2.1 (LLVM build 2336.9.00)
  configuration: --enable-gpl --enable-libx264
  WARNING: library configuration mismatch
  avutil      configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-gpl --enable-nonfree --enable-avfilter
  avcodec     configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-gpl --enable-nonfree --enable-avfilter
  avformat    configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-gpl --enable-nonfree --enable-avfilter
  avdevice    configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-gpl --enable-nonfree --enable-avfilter
  avfilter    configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-gpl --enable-nonfree --enable-avfilter
  swscale     configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-gpl --enable-nonfree --enable-avfilter
  swresample  configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-gpl --enable-nonfree --enable-avfilter
  postproc    configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-gpl --enable-nonfree --enable-avfilter
  libavutil      51. 66.100 / 51. 66.100
  libavcodec     54. 48.100 / 54. 48.100
  libavformat    54. 22.100 / 54. 22.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3.  5.102 /  3.  5.102
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video1.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf54.22.100
  Duration: 00:00:04.23, start: 0.000000, bitrate: 1463 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 1427 kb/s, 1000.24 fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      handler_name    : DataHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'video2.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf54.22.100
  Duration: 00:00:03.40, start: 0.000000, bitrate: 338 kb/s
    Stream #1:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 512x304 [SAR 19:18 DAR 16:9], 335 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 2997 tbc
    Metadata:
      handler_name    : DataHandler
[graph 0 input from stream 0:0 @ 0x7f86d941a220] w:320 h:240 pixfmt:yuv420p tb:1/1000 fr:1000/1 sar:1/1 sws_param:flags=2
[graph 0 input from stream 1:0 @ 0x7f86d941a530] w:512 h:304 pixfmt:yuv420p tb:1/2997 fr:2997/100 sar:19/18 sws_param:flags=2
File 'video_result.mov' already exists. Overwrite ? [y/N] Y
auto-inserting filter 'auto-inserted scaler 0' between the filter 'graph 0 input from stream 1:0' and the filter 'Parsed_overlay_1'
[Parsed_scale_0 @ 0x7f86d94197b0] w:320 h:240 fmt:yuv420p sar:1/1 -> w:512 h:304 fmt:yuv420p sar:19/24 flags:0x2
[auto-inserted scaler 0 @ 0x7f86d941b2b0] w:512 h:304 fmt:yuv420p sar:19/18 -> w:512 h:304 fmt:yuva420p sar:19/18 flags:0x2
[Parsed_overlay_1 @ 0x7f86d9419b70] main w:512 h:304 fmt:yuv420p overlay x:0 y:0 w:512 h:304 fmt:yuva420p
[Parsed_overlay_1 @ 0x7f86d9419b70] main_tb:1/1000 overlay_tb:1/2997 -> tb:1/2997000 exact:1
Output #0, mov, to 'video_result.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf54.22.100
    Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 512x304 [SAR 19:24 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 1k tbc
Stream mapping:
  Stream #0:0 (mpeg4) -> scale
  Stream #1:0 (mpeg4) -> overlay:overlay
  overlay -> Stream #0:0 (mpeg4)
Press [q] to stop, [?] for help
No more inputs to read from, finishing.6kB time=00:00:04.14 bitrate=4302.8kbits/s    
frame= 4232 fps=187 q=31.0 Lsize=    2214kB time=00:00:04.23 bitrate=4284.9kbits/s    
video:2195kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.855406%

is it possible that the library configuration create the problem?

Thanks a lot!
Filippo


On 6 Aug 2012, at 20:03, Nicolas George wrote:

> Le decadi 20 thermidor, an CCXX, angelfilo at gmail.com a écrit :
>> I'm trying to overlay a video with a second video containing alpha
>> channel. like this:
>> 
>> ffmpeg -i video1.mov -i video2.mov  -filter_complex "scale=512:304,overlay=0:0" video_result.mov
>> 
>> the result contains both video1 and video2 but the background of the
>> video2 (which contains alpha channel) is black.
> 
> Please post the complete console output so we can see more precisely what is
> happening. Adding "-loglevel verbose" would be a good idea.
> 
>> I also tried to use the movie filter like:
> 
> In this case, this is more or less equivalent.
> 
> Regards,
> 
> -- 
>  Nicolas George
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list