[x264-devel] Transparency is lost during encoding wifth ffmpeg and x264

Mustafa Aldemir m_aldemir at yahoo.com
Thu Sep 11 15:08:07 CEST 2008


Hello,

I have a FLV video encoded by Adobe After Effects using On2 VP6 encoder. I want to re-encode this video using x264 codec. FFMPEG can decode VP6 video, and encode x264. But after re-encoding the alpha channel transparency of the video is lost and the background is black. I searched a solution in ffmpeg list but, there was no response.

The input file name is onder1.flv, the output file name is onder1x264a.flv. Here are their properties and the command I use:

ffmpeg -i onder1.flv
FFmpeg version SVN-r14660, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-libvorbis --enable-liba52 --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-libxvid --enable-shared
  libavutil version: 49.7.0
  libavcodec version: 51.63.0
  libavformat version: 52.19.0
  libavdevice version: 52.0.0
  built on Aug  7 2008 15:02:01, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, flv, from 'onder1.flv':
  Duration: 00:00:08.48, start: 0.000000, bitrate: 96 kb/s
    Stream #0.0: Video: vp6a, yuva420p, 536x576, 25.00 tb(r)
    Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 96 kb/s
Must supply at least one output file



ffmpeg -i onder1x264a.flv
FFmpeg version SVN-r14660, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-libvorbis --enable-liba52 --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-libxvid --enable-shared
  libavutil version: 49.7.0
  libavcodec version: 51.63.0
  libavformat version: 52.19.0
  libavdevice version: 52.0.0
  built on Aug  7 2008 15:02:01, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Input #0, flv, from 'onder1x264a.flv':
  Duration: 00:00:08.59, start: 0.000000, bitrate: 32 kb/s
    Stream #0.0: Video: h264, yuv420p, 536x576, 25.00 tb(r)
    Stream #0.1: Audio: mp3, 44100 Hz, mono, s16, 32 kb/s
Must supply at least one output file



ffmpeg -i onder1.flv -f flv -vcodec libx264  -r 25 -acodec libmp3lame -ac 1 -ar 44100 -ab 32k onder1x264a.flv


Can I, somehow, preserve transparency? Or can someone advise me some other method of encoding transparent x264 flv video?

Mustafa  Aldemir


      


More information about the x264-devel mailing list