Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for %%i in (*.mp3) do (
- ffmpeg -loop 1 -i picture.jpg -i "%%i" -c:v libx264 -tune stillimage -c:a aac -strict experimental -b:a 192k -pix_fmt yuv420p -shortest "%%~i.mp4"
- )
- done
- ### MANUAL ###
- 1. Copy the abowe code and save it using your favorite editor as "my awesome converter.bat"
- 2. run it
- 3. Win
- note* you have to have ffmpeg.exe in your system32 folder for this to work - download it from the official site
- ### DESCRITION ###
- The converter exports all MP3 files (can be changed to any type: aac, wav...) from a folder where this script is located (to the same folder) to MP4 files (can be changed to AVI, FLV,...) with the image "picture.jpg" (can also be changed: png, gif...) provided.
- ### BREAKDOWN ###
- %%i - for every file with the given parameter (witch here is the mp3 files)
- (*.mp3) - any file with the mp3 filetype
- do ( - starts the command: ffmpeg -i picture.jpg -i "%%i" -c:a copy -vcodec libx264 -pix_fmt yuv420p "%%~i.mp4"
- ffmpeg - starts the ffmpeg.exe converter with the parameters:
- -i picture.png - "-i" inserts a new file, wich here is the picture we want
- -i "%%i" - inserts a new file, wich here is the first in order of files from the folder, and than starts the next one...
- -c:a copy - uses the same encoding ("a" stands for audio, "v" for video - but we have a pic, so we don't need that) as the file provided (better coz it needs less time to convert the file)
- -vcodec libx264 - (forces the video exported to have the 264 video codec)
- -pix_fmt yuv420p - google it, but you will need it xD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement