Hi,
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
-
-
Something like:
Code: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 -
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 11: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 16: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 03:10.
-
Hi, today only I have seen a thread about handbrakecli, command line tool
Will that be faster Jagabo.
If so, kindly give the formula in handbrakecli
if not inform me please -
Handbrake uses the same x264 encoder as ffmpeg. So it's the same speed with the same settings.
-
-
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:
Code: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; 27th Jan 2021 at 23:25.
Similar Threads
-
ffmpeg reencoding video ignoring -c:v copy
By lenberg in forum AudioReplies: 2Last Post: 31st Oct 2018, 00:26 -
How to convert mp4 audio to AAC and keep original video w FFMPEG or ?
By trueblueCj in forum Newbie / General discussionsReplies: 1Last Post: 1st Jul 2018, 18:24 -
Convert audio part of a video and increase volume by 30% wiht ffmpeg?
By pxstein in forum Newbie / General discussionsReplies: 2Last Post: 21st Jun 2017, 04:06 -
Audio track drops when i use AAC passthru to convert a video with mp3 or dt
By lalit.jindal885 in forum Video ConversionReplies: 4Last Post: 27th Apr 2017, 01:26 -
How to convert mp3 audio to mp4 video using Windows Movie Maker?
By Agita Weltschmertz in forum Video ConversionReplies: 3Last Post: 22nd Feb 2016, 08:20