Is it possible to compress alpha and RGB channels of PNG sequence separately with FFmpeg?

jippyjoe4

Suppose I have a sequence of 32-bit (RGBa) PNG files. Is it possible to compress the RGB channel with one codec and the alpha channel with another? For example, if I had the RGB and alpha as separate PNG files (24 and 8 bit, respectively), I would do something like this:

ffmpeg -framerate 60 -i 24_bit_rgb%04d.png -c:v libx264rgb -qp 0 -preset veryslow rgb.mp4`

ffmpeg -framerate 60 -i 8_bit_alpha%04d.png -c:v libx265 -x265-params lossless=1 alpha.mp4`

But I’m not sure how I’d do this since I don’t have separate RGB and alpha PNG files. Can this be done in FFmpeg?

llogan

Use the alphaextract or extractplanes filters.

ffmpeg -i %04d.png -filter_complex "alphaextract[alf]" -map "[alf]" -c:v libx265 -x265-params lossless=1 alpha.mp4 -map 0 -c:v libx264rgb -qp 0 -preset veryslow rgb.mp4

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Merging RGB Channels in FFMPEG

From Dev

Lossless VP9 Webm Encoding of PNG Sequence with Alpha in FFmpeg

From Dev

ffmpeg resize PNG image sequence using alpha padding

From Dev

ImageMagick: Replace RGB channels with white, retain Alpha

From Dev

Use ffmpeg to compile RGBA image sequence into two separate videos (RGB + Alpha)

From Dev

Tensorflow 2D convolution on RGB channels separately?

From Dev

How to blend two RGB colors (front and back) based on their alpha channels

From Dev

How to resize PNG image with Alpha channels using GDI+?

From Dev

Is it possible for ffmpeg to select audio channels without reencoding

From Dev

ffmpeg export video from png sequence is not correct

From Dev

Converting alpha channel of PNG sequence to Y channel of H265

From Dev

Convert raw RGB32 file to JPEG or PNG using FFmpeg

From Dev

Is there a way to use the RGB channels of a texture as the alpha channel when applying multitexturing using OpenGL ES 1.1?

From Dev

Toggle between RGB channels

From Dev

Printing RGB channels

From Dev

How to make FFmpeg convert a PNG sequence into a WEBP sequence, instead of making a single animated WEBP

From Dev

Compress a PNG image with ImageMagick

From Dev

PHP continually compress PNG

From Dev

Regex extracting numeric & alpha separately

From Dev

Compress sequence in clojure

From Dev

Compress Video with FFmpeg

From Dev

Batch Compress Videos with ffmpeg

From Dev

Png with alpha background

From Dev

Access Channels in ANTLR 4 and Parse them separately

From Dev

Create histograms for three color channels separately in MATLAB

From Dev

ffmpeg 6 channels DTS to 6 channels AAC

From Dev

FFmpeg drops frames when encoding a png image sequence into an x264 mp4 video

From Dev

rmagick compress and convert png to jpg

From Dev

FFMPEG DNxHR with Alpha to Webm

Related Related

  1. 1

    Merging RGB Channels in FFMPEG

  2. 2

    Lossless VP9 Webm Encoding of PNG Sequence with Alpha in FFmpeg

  3. 3

    ffmpeg resize PNG image sequence using alpha padding

  4. 4

    ImageMagick: Replace RGB channels with white, retain Alpha

  5. 5

    Use ffmpeg to compile RGBA image sequence into two separate videos (RGB + Alpha)

  6. 6

    Tensorflow 2D convolution on RGB channels separately?

  7. 7

    How to blend two RGB colors (front and back) based on their alpha channels

  8. 8

    How to resize PNG image with Alpha channels using GDI+?

  9. 9

    Is it possible for ffmpeg to select audio channels without reencoding

  10. 10

    ffmpeg export video from png sequence is not correct

  11. 11

    Converting alpha channel of PNG sequence to Y channel of H265

  12. 12

    Convert raw RGB32 file to JPEG or PNG using FFmpeg

  13. 13

    Is there a way to use the RGB channels of a texture as the alpha channel when applying multitexturing using OpenGL ES 1.1?

  14. 14

    Toggle between RGB channels

  15. 15

    Printing RGB channels

  16. 16

    How to make FFmpeg convert a PNG sequence into a WEBP sequence, instead of making a single animated WEBP

  17. 17

    Compress a PNG image with ImageMagick

  18. 18

    PHP continually compress PNG

  19. 19

    Regex extracting numeric & alpha separately

  20. 20

    Compress sequence in clojure

  21. 21

    Compress Video with FFmpeg

  22. 22

    Batch Compress Videos with ffmpeg

  23. 23

    Png with alpha background

  24. 24

    Access Channels in ANTLR 4 and Parse them separately

  25. 25

    Create histograms for three color channels separately in MATLAB

  26. 26

    ffmpeg 6 channels DTS to 6 channels AAC

  27. 27

    FFmpeg drops frames when encoding a png image sequence into an x264 mp4 video

  28. 28

    rmagick compress and convert png to jpg

  29. 29

    FFMPEG DNxHR with Alpha to Webm

HotTag

Archive