Open Angels-group opened 5 years ago
Thanks for the request!
We already have a feature where you can specify FFmpeg filters, but nothing yet that would allow -filter_complex with an image as input. We'll give some thought to how this would be specified in a config file. We didn't plan for -filter_complex in general.
but nothing yet that would allow -filter_complex with an image as input
I imagined that this could be done inside input_xxx_config.yaml In the inputs section.
Something like:
- name: logo.png
media_type: overlay
position_x: 64
position_y: 64
start_time: 00:00:00
end_time: 00:20:00
z_index: 1
Yes, that could work. If we support overlays specifically, we could do something targeted like that.
If we don't find any other compelling use-cases for -filter_complex
, then we might choose to support overlays directly as you suggested.
One more filter complex use case is burning in subtitles as an overlay on the video. ie. -filter_complex "[0:v][0:s]overlay[v]" -map "[v]" -filter_complex "[0:v][0:s]overlay" https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
Feature Request: ffmpeg supports source overlay. It would be very nice to add this feature to Shaka-streamer. This is very convenient for organizing branded broadcasting of a video stream (TV channel, presentation, broadcast of events, and so on)
Example:
overlay=64:64 - means that we want to place the logo with a shift of 64px to the right and with a shift of 64px down, relative to the upper left corner (0:0)
enable='between(t,0,20)' - means we want to overlay the logo in the range from 0 to 20 seconds
[0:v][1:v] - means layer order. The first layer (0: v) is video.mp4, the next (1: v) is logo.png
I understand that this is not paramount. But it would be very good to have such an option in the future :)