How to put date and time in the file name? (Ffmpeg)

Asked

Viewed 94 times

2

How to put date and time in an output file name generated from a video cut using ffmpeg? I tried some code combinations but they didn’t work.

This code works to cut the video but the name is without Pattern:

ffmpeg -ss inicio -i input.mp4 -c copy -t 60 -strftime 1 -segment_format mp4 parte_video%Y-%m-%d_%H-%M-%S.mp4

I have an example working for my videos 24/7 and one for the "photos" but the same does not apply for a single video.

Example of videos 24/7:

ffmpeg -f dshow -i video= camera -c:v libx264 -f segment -strftime 1 -segment_time 24:00:00 -segment_format mp4 -segment_format_options movflags=empty_moov meu_video%Y-%m-%d_%H-%M-%S.mp4

Example of the photos:

ffmpeg -f dshow -i video=camera -qscale:v 1 -t 1 -strftime 1 -segment_format jpeg foto%Y-%m-%d_%H-%M-%S.jpeg

Does anyone have any idea how to solve?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.