Mix still image file with audio file into a video file

Questions and answers on how to get the most out of FFAStrans
Post Reply
thiagowfk
Posts: 3
Joined: Tue Feb 12, 2019 4:23 am

Mix still image file with audio file into a video file

Post by thiagowfk » Thu Oct 15, 2020 9:22 pm

Hello people,

Is there anyone who can help me with this issue? I'd like to create a workflow that recieves an still image (jpg or png) and an audio file (such as a mp3 or a wav) and deliveries a video file with both contents.

Thanks in advance.

emcodem
Posts: 718
Joined: Wed Sep 19, 2018 8:11 am

Re: Mix still image file with audio file into a video file

Post by emcodem » Fri Oct 16, 2020 8:36 am

Hey thiagowfk,
welcome to the forum and thank you for using ffastrans!

You can use the encoder/"custom ffmpeg" node for this, set it up like this:
custom_ffmpeg.png
custom_ffmpeg.png (8.8 KiB) Viewed 681 times
This assumes that you start your job by submitting the wav file (e.g. set up a monitor node and watch only for *.wav) and the image that you use is static/always the same.
Let us know any doubts please.

thiagowfk
Posts: 3
Joined: Tue Feb 12, 2019 4:23 am

Re: Mix still image file with audio file into a video file

Post by thiagowfk » Tue Oct 20, 2020 1:34 pm

Thanks a lot!

I'm going to test and provide you guys feedback.

thiagowfk
Posts: 3
Joined: Tue Feb 12, 2019 4:23 am

Re: Mix still image file with audio file into a video file

Post by thiagowfk » Tue Oct 20, 2020 9:53 pm

Hi there!

I've tested the workflow, but the system keeps returnig an error: "Encoding failed - no video or audio found in media". Here is the code I've inserted:

-loop 1 -i "C:\Users\Administrador\Desktop\CONVIDA_26_CARTELAPODCAST.png" -shortest -c:v libx264 3000000 -b:a aac -b:a 128000

By the way, is there any way to force the output of this node to 1280x720p?

Thanks againt

emcodem
Posts: 718
Joined: Wed Sep 19, 2018 8:11 am

Re: Mix still image file with audio file into a video file

Post by emcodem » Thu Oct 22, 2020 8:56 am

hey thiagowfk,

Sorry for the delay.
You forgot to put -b:v before your 3000000

You could also use "3M" for 3 megabits instead of "3000000".
Of course you can set everything like resolution and such using standard ffmpeg parameters, basically you just need to google for "ffmpeg force resolution" or such. E.g. insert "-s 1280x720".

Of course it would be a lot easier for you to work with the standard H264 encode node, but in your case we can only use the custom ffmpeg node and in the custom one, you need to set all the encoding parameters like resolution, interlacing, framerate youself. By default it will always just keep the properties of the input file.

Post Reply