This PowerShell code divides a large audio file (sound1
) in 5 minutes parts and saves them as sound100_1.mp3
, sound1_002.mp3
...
ffmpeg -i $file_name_complete -f segment -segment_time 300 -c copy $fileNameOnly"_"%03d$fileExtensionOnly
How can I set the metadata
title
to be the same than thefile name
?And how can I also (on the same time) edit the
Album
metadata with an incremental name (it's useless, but it's to understand how that work). It should bealb_1
,alb_2
.
I have seen on the docs that I should use:
-metadata title="my title"
But:
should I repeat each timeEDIT: yes according to this-metadata
for each metadata?how can I increment the number since the title need to be quoted (
-metadata title="$fileNameOnly""_"%03d
won't work since the last quote is missing)how can I set the
title
field so it take the same value than theName
?
This did not work:
ffmpeg -i $file_name_complete -f segment -segment_time 300
-metadata title="$fileNameOnly""_"%03d album="test"
-c copy $fileNameOnly"_"%03d$fileExtensionOnly
I get this error:
-metadata : The term '-metadata' is not recognized as the name of a cmdlet