Asked • 07/06/19

How to fade in/out a video/audio clip with unknown duration?

I'm working on a project where I'm using ffmpeg to batch convert some video files, and adding fade in/out effects at the head and tail of each clip.I've been using this bit of code to add the fade/out effect on clips with known durations:```ffmpeg -i clip.mp4 -filter:v 'fade=in:0:30,fade=out:9650:30' -c:v libx264 -crf 22 -preset veryfast -c:a copy fadeInOut.mp4```My two questions are:1. How can I simultaneously fade the audio in/out?2. Can ffmpeg automatically figure out the duration of the clip and be told just fade out the last 30 frames?Thanks!

1 Expert Answer

By:

David A. answered • 09/07/19

Tutor
5 (3)

FILM SCHOOL TEACHER AND MOTION GRAPHICS EXPERT BROADCAST VIDEO

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.