Extract alpha from video ffmpeg

dreamfire

I want to overlay transparent video on the background image. I have a video where the top half is RGB object and bottom half is an alpha mask.

Now, for making this I do next steps:

1) I am extracting all frames from video and save to the folder

2) Each frame splitting to top and bottom half bitmap

3) Top bitmap composite with bottom mask for extract alpha and get a frame with transparent background

3) I am drawing each frame on the background and save to a folder

4) Create a video using FFmpeg

The problem is step 2, 3 and 4, they very slow. Maybe has another way to overlay transparent video on the background image?

Gyan

You can use

ffmpeg -i bg -i video_with_mask
       -filter_complex "[1]crop=iw:ih/2:0:0[rgb];[1]crop=iw:ih/2:0:ih/2[alp];\
                        [rgb][alp]alphamerge[va];[0][va]overlay"  out 

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ffmpeg extract alpha channel from prores

From Dev

Extract alpha channel from webm video

From Dev

Extract final frame from a video using ffmpeg

From Dev

Extract every audio and subtitles from a video with ffmpeg

From Dev

Extract frames from video with ffmpeg - header problem?

From Dev

Can FFMPEG extract images from a video with timestamps?

From Dev

Ffmpeg alpha channel video generation

From Dev

Extract frames from a video (errors from using grabVideoStills and ffmpeg)

From Dev

Extract frames from video using ffmpeg -- frame accurate?

From Dev

Extract keyframe info and byte offset from video ffmpeg/ffprobe

From Dev

Cannot extract audio tracks from video using ffmpeg

From Dev

when i extract an audio from video using ffmpeg, It appear an error

From Dev

Extract video cover/thumbnail from file with embedded cover using ffmpeg

From Dev

Extract Yuv frames from mp4 video using ffmpeg

From Dev

How to extract images from video files using FFmpeg without blur?

From Dev

Extract video without audio ffmpeg

From Dev

Use ffmpeg to extract parts of video

From Dev

Using the ffmpeg to extract video stream

From Dev

FFMPEG extract 1 frame from video, consecutive frames from other video and overlay the latter on the former with one command

From Dev

Want to extract out only alpha using ffmpeg

From Dev

ffmpeg extract subclips from video at 10s; 30%; 60%; last 30s of a video

From Dev

ffmpeg command to extract first two minutes of a video

From Dev

Using ffmpeg to extract segment in the middle of long video

From Dev

How to extract small video chunk with ffmpeg?

From Dev

FFMPEG: extract audio with exact frame length of video

From Dev

How to extract a frame out of a video using ffmpeg

From Dev

Extract all video frames as images with FFMPEG

From Dev

Extract transparent png in .mov video without ffmpeg

From Dev

How to extract video+audio streams from MP4 file via ffmpeg?

Related Related

  1. 1

    ffmpeg extract alpha channel from prores

  2. 2

    Extract alpha channel from webm video

  3. 3

    Extract final frame from a video using ffmpeg

  4. 4

    Extract every audio and subtitles from a video with ffmpeg

  5. 5

    Extract frames from video with ffmpeg - header problem?

  6. 6

    Can FFMPEG extract images from a video with timestamps?

  7. 7

    Ffmpeg alpha channel video generation

  8. 8

    Extract frames from a video (errors from using grabVideoStills and ffmpeg)

  9. 9

    Extract frames from video using ffmpeg -- frame accurate?

  10. 10

    Extract keyframe info and byte offset from video ffmpeg/ffprobe

  11. 11

    Cannot extract audio tracks from video using ffmpeg

  12. 12

    when i extract an audio from video using ffmpeg, It appear an error

  13. 13

    Extract video cover/thumbnail from file with embedded cover using ffmpeg

  14. 14

    Extract Yuv frames from mp4 video using ffmpeg

  15. 15

    How to extract images from video files using FFmpeg without blur?

  16. 16

    Extract video without audio ffmpeg

  17. 17

    Use ffmpeg to extract parts of video

  18. 18

    Using the ffmpeg to extract video stream

  19. 19

    FFMPEG extract 1 frame from video, consecutive frames from other video and overlay the latter on the former with one command

  20. 20

    Want to extract out only alpha using ffmpeg

  21. 21

    ffmpeg extract subclips from video at 10s; 30%; 60%; last 30s of a video

  22. 22

    ffmpeg command to extract first two minutes of a video

  23. 23

    Using ffmpeg to extract segment in the middle of long video

  24. 24

    How to extract small video chunk with ffmpeg?

  25. 25

    FFMPEG: extract audio with exact frame length of video

  26. 26

    How to extract a frame out of a video using ffmpeg

  27. 27

    Extract all video frames as images with FFMPEG

  28. 28

    Extract transparent png in .mov video without ffmpeg

  29. 29

    How to extract video+audio streams from MP4 file via ffmpeg?

HotTag

Archive