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

1

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

This code works to cut the video but the name is without a 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 "photos" but the same does not apply to a single video.

Example 24/7 videos:

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 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 it?

    
asked by anonymous 03.11.2017 / 18:49

0 answers