I have set of files of different video files having different video and audio contained in different containers like mp4, etc.
I want to convert the same files to x264 video and mp3 audio files using ffmpeg formula.
If there is a fast flag to recommend , this also be recommended.
Normally x264 supports aac audio, but I want it in mp3 audio format
plelase give me the solution
+ Reply to Thread
Results 1 to 16 of 16
ffmpeg -i input.ext -map 0 -c:v libx264 -preset veryfast -crf 20 -ac 2 -c:a mp3 output.mkv
-map 0 : specifies all streams from the input file should be copied (including chapters, subtitles, etc., otherwise only video and audio will be copied)
-c:v libx264 : compress the video with x264
-preset veryfast : very fast encoding, not the greatest quality, others: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo
-crf 20 : lower values give higher quality, bigger files; higher values give lower quality, smaller files
-ac 2 : convert audio to stereo (eg, downmix 5.1 to 2 channel stereo)
-c:a mp3 " encode the audio as mp3
-b:a 192k : the audio bitrate to use
output.mkv : the output filename, mkv container
IMHO, it should be -c:a libmp3lame, not -c:a mp3.
Yes, libmp3lame is the better mp3 encoder. I can just never remember the name (I haven't used mp3 encoding in a long time).
Last edited by JKyle; 26th Jan 2021 at 12:02.
I tried a few different builds. With "-c:a mp3" one defaulted to libmp3lame, the other mp3_mf. So you probably want to specify which you want on the command line: "-c:a libmp3lame" or "-c:a mp3_mf". ffmpeg shows you which encoder it's using.
Last edited by jagabo; 26th Jan 2021 at 17:15.
Hi, Jagabo, I used your formula . thanks.
mere mp3 did not proceed with some error.
i changed that part of libmp3lame and it is proceeding.
I have to check the time
while processing , it says q as 25, what does that mean
I checked the time , it is a time consuming, probably due to the reencoding.
Last edited by jraju; 27th Jan 2021 at 04:10.
Hi, Yes. Thanks for the reply.I also noticed that while processing ffmpeg command above, the fps changed on decreasing rate say 24 to 17, and I also noticed that q remains at 25. I think that 25 is the video frame rate which is constant at 25 as per the properties of the video.
what is this fps rate dcreasing on process. Is that the processsing frame rate and nothing to do with the constant rate or, the video has different fps , variable rate, in the entire video.
This is to knowsomething
Here's an example status line:
frame= 2302 fps=656 q=25.0 size= 5376kB time=00:01:33.59 bitrate= 470.5kbits/s speed=26.7x
"frame= 2302" is the current frame being processed.
"fps=656" is the average rate at which it is encoding frames, so far.
"q=25.0" With bitrate encoding it is the average quantizer, so far. I'm not sure exactly what it means with crf encoding (it remains constant).
"size= 5376kB" is the current size of the output file.
"time=00:01:33.59" is the timestamp of the frame currently being processed.
"bitrate= 470.5kbits/s" this is the average bitrate, so far.
"speed=26.7x" is the average encoding speed relative to real time, so far. For example, a 30fps video encoding at 60 fps is encoding at 2x real time.
Hi, thanks . Command line takes a lot of time compared to converters , it seems.
Last edited by jagabo; 28th Jan 2021 at 00:25.