[FFmpeg-user] converting mov with alpha to webm with alpha

hsi_chorton chorton at hotsalsainteractive.com
Thu Jun 18 01:09:45 CEST 2015


Hi.  I've been trying to get some mov files we have properly converted to
webm.  The mov files have an alpha channel.  when I convert, the webm does
get created but it is not with the alpha channel, so it shows a black
background when I play it or when I overlay it on anything.

*Examples of what I have tried:*

*Doing it with png files that have transparency:*

/Applications/ffmpeg -i trex-02-%03d.png -pix_fmt yuva420p trex-02.webm
ffmpeg version 2.6.2-tessus Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
[...]
Input #0, image2, from 'trex-02-%03d.png':
  Duration: 00:00:09.56, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, pal8, 640x360, 25 fps, 25 tbr, 25 tbn, 25 tbc
[libvpx @ 0x7fe68c024a00] v1.3.0
Output #0, webm, to 'trex-02.webm':
  Metadata:
    encoder         : Lavf56.25.101
    Stream #0:0: Video: vp8 (libvpx), yuva420p, 640x360, q=-1--1, 200 kb/s,
25 fps, 1k tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.26.100 libvpx
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> vp8 (libvpx))
Press [q] to stop, [?] for help
frame=  239 fps= 21 q=0.0 Lsize=     514kB time=00:00:09.56 bitrate=
440.8kbits/s    
video:509kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.014111%

*Then, testing it with /Application/ffmpeg -i elephant-01.webm:*

[...]
Input #0, matroska,webm, from 'elephant-01.webm':
  Metadata:
    encoder         : libwebm-0.2.1.0
    creation_time   : 2015-06-18 15:02:25
  Duration: 00:00:07.42, start: 0.007000, bitrate: 578 kb/s
    Stream #0:0(eng): Video: vp9, yuv420p, 640x360, SAR 1:1 DAR 16:9, 30
fps, 30 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)

*Directly from mov to webm:*

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'elephant-01.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2013-02-01 10:12:43
  Duration: 00:00:07.43, start: 0.000000, bitrate: 10691 kb/s
    Stream #0:0(eng): Video: png (png  / 0x20676E70), rgba, 640x360 [SAR
2834:2834 DAR 16:9], 9962 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc (default)
    Metadata:
      creation_time   : 2013-02-01 10:12:43
      handler_name    : Apple Alias Data Handler
      encoder         : PNG
      timecode        : 00:00:00:00
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz, 1
channels, s16, 705 kb/s (default)
    Metadata:
      creation_time   : 2013-02-01 10:12:44
      handler_name    : Apple Alias Data Handler
      timecode        : 00:00:00:00
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2013-02-01 10:12:54
      handler_name    : Apple Alias Data Handler
      timecode        : 00:00:00:00
[libvpx @ 0x7fca5102d600] v1.3.0
Output #0, webm, to 'elephant-01.webm':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    encoder         : Lavf56.25.101
    Stream #0:0(eng): Video: vp8 (libvpx), yuva420p, 640x360 [SAR 1:1 DAR
16:9], q=-1--1, 200 kb/s, 30 fps, 1k tbn, 30 tbc (default)
    Metadata:
      creation_time   : 2013-02-01 10:12:43
      handler_name    : Apple Alias Data Handler
      timecode        : 00:00:00:00
      encoder         : Lavc56.26.100 libvpx
    Stream #0:1(eng): Audio: vorbis (libvorbis), 44100 Hz, mono, fltp
(default)
    Metadata:
      creation_time   : 2013-02-01 10:12:44
      handler_name    : Apple Alias Data Handler
      timecode        : 00:00:00:00
      encoder         : Lavc56.26.100 libvorbis
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> vp8 (libvpx))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
frame=  223 fps= 33 q=0.0 Lsize=     441kB time=00:00:07.43 bitrate=
486.5kbits/s    
video:383kB audio:48kB subtitle:0kB other streams:0kB global headers:3kB
muxing overhead: 2.394408%

*Then, testing it with /Application/ffmpeg -i elephant-01.webm:*

Input #0, matroska,webm, from 'elephant-01.webm':
  Metadata:
    encoder         : Lavf56.25.101
  Duration: 00:00:07.44, start: 0.000000, bitrate: 486 kb/s
    Stream #0:0(eng): Video: vp8, yuv420p, 640x360, SAR 1:1 DAR 16:9, 30
fps, 30 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      alpha_mode      : 1
    Stream #0:1(eng): Audio: vorbis, 44100 Hz, mono, fltp (default)




--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/converting-mov-with-alpha-to-webm-with-alpha-tp4671044.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list