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: 5
Joined: Tue Feb 12, 2019 4:23 am

Mix still image file with audio file into a video file

Post by thiagowfk »

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: 1811
Joined: Wed Sep 19, 2018 8:11 am

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

Post by emcodem »

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 5039 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.
emcodem, wrapping since 2009 you got the rhyme?
thiagowfk
Posts: 5
Joined: Tue Feb 12, 2019 4:23 am

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

Post by thiagowfk »

Thanks a lot!

I'm going to test and provide you guys feedback.
thiagowfk
Posts: 5
Joined: Tue Feb 12, 2019 4:23 am

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

Post by thiagowfk »

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: 1811
Joined: Wed Sep 19, 2018 8:11 am

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

Post by emcodem »

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.
emcodem, wrapping since 2009 you got the rhyme?
Post Reply