FORUMS: list search recent posts

At my wit's end..... Need info on using ffmpeg to convert mp3 and image to mp4

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
James Robinson
At my wit's end..... Need info on using ffmpeg to convert mp3 and image to mp4
on Oct 5, 2019 at 1:16:54 am

Hello all.
I have combed the internet, tried everything suggested, and am in dire need of help.

I am trying to add a jpg file to an mp3 and convert it to an mp4 to put on a DVD.

I am using multiple files (both mp3 and jpg) in a directory, as follows:

MP3 files: (48 kbps, 24000 Hz, Mono)
nwt_60_1Pe_E_01.mp3
nwt_60_1Pe_E_02.mp3
nwt_60_1Pe_E_03.mp3
etc, etc.

JPG files from mp3 tag: (600x600, 600 dpi)
nwt_60_1Pe_E_01.jpg
nwt_60_1Pe_E_02.jpg
nwt_60_1Pe_E_03.jpg
etc., etc

My goal is : (Video: 600x600, Data rate: 47 kbps, Total Bitrte: 157 kbps, FPS: 25; Audio 110 kbps, 24,000 Hz, Mono)
nwt_60_1Pe_E_01.mp4
nwt_60_1Pe_E_02.mp4
nwt_60_1Pe_E_03.mp4
etc, etc.

I need the command line to count the total # of MP3's and convert them automatically.

Thank you all very much in advance for your help.

James Robinson


Return to posts index

Lou Logan
Re: At my wit's end..... Need info on using ffmpeg to convert mp3 and image to mp4
on Oct 9, 2019 at 6:49:50 pm

ffmpeg can't do this by itself. You need to use additional features present in your shell/command line.

The answer depends on what you are using, but you didn't mention your OS.

For Linux or macOS you can use a Bash for loop:

for f in *.jpg; do ffmpeg -framerate 25 -loop 1 -i "$f" -i "${f%.*}.mp3" -c:v libx264 -vf format=yuv420p -c:a aac -movflags +faststart -shortest "${f%.*}.mp4"; done

If you're on Windows refer to cmd, batch file, or PowerShell help resources regarding a "for loop" or whatever the Windows equivalent is.


Return to posts index

James Robinson
Re: At my wit's end..... Need info on using ffmpeg to convert mp3 and image to mp4
on Oct 9, 2019 at 7:09:33 pm

Lou,

Thank you for your response. I am using Windows 7.

I will give it my best shot, but may be back....

Thank you again,

James


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]