Possible to Prepend a custom video to source during transcode workflow?

Questions and answers on how to get the most out of FFAStrans
Post Reply
gdpodesta
Posts: 48
Joined: Tue Mar 26, 2019 6:11 pm

Possible to Prepend a custom video to source during transcode workflow?

Post by gdpodesta »

I am brand new to FFAStrans and am exploring possibilities - I don't mind saying that I'm excited about possibilities!

We encode from a variety of source formats, and a certain frequency of them require a custom 10 second disclaimer prepended to them.
Is it possible to create a workflow with a provided png image (or a silent ffmpeg-genereated mp4), and prepend that to the source video file to produce a final MP4 that has the disclaimer? Obviously the audio of the source video must be retained (I had some trouble learning that early on when concatenating videos).
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Possible to Prepend a custom video to source during transcode workflow?

Post by emcodem »

Hey there,

you might want to use the "Insert Media" Filter Processor, but it does not support png but only .AVI files instead (and only very few codecs). It is best when this .avi does not have any audio tracks. (you don't really need to care about the tracks).

So, to convert your png to AVI, use an ffmpeg transcoding like that:

Code: Select all

ffmpeg -loop 1 -i PATH_TO_INPUT_PNG -t 1  -vf scale=720:576 -pix_fmt rgb32 -c:a pcm_s24le -c:v rawvideo -map 0 c:\temp\out.avi
Explain:
-t 1 (seconds of output duration)
scale=... (resolution of output video)

Your workflow would look like this:
Monitor->A/V Decode->InsertMedia->Encode->Deliver

cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
authorleon
Posts: 108
Joined: Fri May 08, 2020 5:18 pm

Re: Possible to Prepend a custom video to source during transcode workflow?

Post by authorleon »

Hello, please can you tell me which codecs are supported in the AVI wrapper so I can compress it a little better.

Thank you
Post Reply