I'm trying to auto mark the output file with timestamps with ffmpeg. Here's my test cmd:
.\ffmpeg.exe -y -loglevel 99 -i test.mp3 -strftime 1 %Y.ogg
I expected a file named 2020.ogg
, however only got %Y.ogg
. In another word, output filename is not processed by strftime()
. I'm using powershell so there should be no relation with cmd's %%
escaping.
Here's the output: https://pastebin.com/LUVh2kFA I'm using static builds from https://ffmpeg.zeranoe.com (Thanks Zeranoe!) I confirmed that the problem exists in v4.2.2 and git-20200515. Is there any chance to fix it or am I doing it wrong?
-strftime
is not a general option and is only supported by certain muxers. A workaround is to use the segment muxer and to provide a -segment_time
longer than the expected output duration:
ffmpeg -i input.mp3 -f segment -strftime 1 -segment_time 10:00:00 %Y.ogg