Created
August 29, 2022 18:23
-
-
Save v0lt/60c0a2a67608f9ff3f7a97c34f54b484 to your computer and use it in GitHub Desktop.
Convert audio from MP4 to MP3 and add first frame of video as cover art
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
CHCP 65001 | |
PUSHD %~dp0 | |
SET ffmpegexe="C:\Utils\FFmpeg\ffmpeg.exe" | |
FOR %%f IN (*.mp4) DO ( | |
%ffmpegexe% -i "%%f" -vframes 1 "%%~nf.jpg" | |
%ffmpegexe% -i "%%f" -i "%%~nf.jpg" -map 0:a -map 1:0 -c:v copy -codec:a libmp3lame -b:a 192k -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" "%%~nf.mp3" | |
DEL "%%~nf.jpg" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment