![]() ![]() REM map unused drive letters to source and destinationįor /R x:\ %%F in (*.mp4, *.aac, *.flv, *.m4a, *.mp3) do (įfmpeg -v quiet -i "%%F" -vcodec libx264 "y:%%~pnF-converted. That would allow you to use the full absolute path (without the drive letter). There is a really simple solution if you have two unassigned drive letters that can be mapped to your root source and destination folders. REM do not copy empty folders or any Copying directory structure from %1 to %2. REM get absolute path of source and destination roots Once I know the length of the root source path, it is easy to do a substring operation on the full path of a source file to get the relative path. There are many techniques for computing string length in batch. The batch file looks like this: sourcecode languageplain echo off for a in (c:\source\.flac) do ( c:\ffmpeg\bin\ffmpeg -i a -aq 1 -mapmetadata 0 -id3v2version 3 c:\output\na.mp3 move a c:\source\done) /sourcecode FFMPEG supports a number of quality presets for MP3, in this example I use -aq 1 which gives a variable bitrate of 190-250. ![]() The untested code below uses a batch function to determine the length of a string. That is not trivial to do if you want the script to be bullet proof. You need to incorporate the relative path of each source file into your destination. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |