Alex Harzy
Forum Replies Created
-
Alex Harzy
December 27, 2012 at 5:50 pm in reply to: [ffmpeg] Best settings for quick images @ 720p MP4[Lou Logan] “instead of re-encoding the MKV, you can probably simply re-mux into a MP4 container since the video stream in the MKV is most likely H.264 video which works just fine in MP4 container. Assuming your audio stream is compatible with MP4 container:
ffmpeg -i input.mkv -c copy -map 0 output.mp4”Really?
Well I probably don’t know the difference between muxing and encoding.
what would that “-c copy” and “-map 0” command do?
I’m confused :-/ -
Alex Harzy
December 25, 2012 at 11:00 am in reply to: [ffmpeg] Best settings for quick images @ 720p MP4Hello,
I’ve been converting many clips and they all get good using the simple (but powerful) command offfmpeg -i input_file -vcodec libx264 -preset veryfast -crf 20 -acodec libmp3lame -ac 2 -ab 160k output.mp4
I can get enough quality for everything I want.
I figured out two big problems, though:
1) Sometimes, the aspect ratio of the output file is scrumbled. I mean, sometimes the video converted is unnaturally stretched in a 4:3 screen aspect. I don’t know why this happens, I solved this problem by adding “-s 960×540” in the command in the video section.
2) Sometimes, when I convert a two hour mkv to a mp4, the audio is out of sync by a second or two, progressively. This means that at the beginning it’s in sync, but at the end it is not anymore. How can I do to re-sync it? What can I do to convert mkv to mp4 without having this loss of sync?
Thank you and merry X-Mas everybody!
-
Alex Harzy
December 9, 2012 at 10:10 pm in reply to: [ffmpeg] Best settings for quick images @ 720p MP4[Lou Logan] ” These values are probably not very useful since they can vary depending on your input and your preset.”
Can they vary *that* much?
I’m asking you because I couldn’t find a sort of a table displaying couples regarding # crf <—> kbit/s bitrate.Thank you.
-
Alex Harzy
December 6, 2012 at 1:35 pm in reply to: [ffmpeg] Best settings for quick images @ 720p MP4Thank you so much, friends.
I narrowed it down a little more:
ffmpeg -i input_file -vcodec libx264 -s 960x540 -preset veryfast -crf XX -acodec libmp3lame -ac 2 -ab 160k Output.mp4
-crf XX values:
0 – 18 for lossless
20 for about 2500-3000 kbit/s bitrate
21 for about 2000-2500 kbit/s bitrate
22 for about 1500-2000 kbit/s bitrate
23 for about 1000-1500 kbit/s bitrate
24 – 28 for low quality files (useful for still images) -
Alex Harzy
November 26, 2012 at 5:46 pm in reply to: [ffmpeg] Best settings for quick images @ 720p MP4Narrowing it all down, I wrote this command and believe me, it works *flawlessly*. My jaw was on the floor when it took 1 minute to convert a full hd video of 400MB into a 70MB mp4 simil-high quality clip.
The CRF factor was essential to my experiments.
I tried different values: from 0 to 18 it’s the same, it copies the stream losslessly… but…. when you begin to reach 20…and couple it with the -preset veryfast command….it definitely has to be the best setting that I’ve been searching for at least one year.
This is it:
Converting a full hd into a 960×540 → mp4 1500k / mp3 160kbps (no map) FAST & CRF = 22
ffmpeg -i input_file -vcodec libx264 -s 960x540 -b 1500k -preset veryfast -crf 22 -acodec libmp3lame -ac 2 -ab 160k -threads 4 output_file.mp4Converting a full hd into a HD 720p → mp4 1750k / mp3 160kbps (no map) FAST (30s:85s)
ffmpeg -i input_file -vcodec libx264 -s 1280x720 -b 1750k -preset veryfast -crf 22 -acodec libmp3lame -ac 2 -ab 160k -threads 4 output_file.mp4Thanks Reuben Martin and Lou Logan.
I hope this post will help all the people that had been searching good ffmpeg settings in the last years, just like me.
-
Alex Harzy
November 25, 2012 at 11:02 am in reply to: [ffmpeg] Best settings for quick images @ 720p MP4You’re right.
I want to find the most convenient compromise between them all, in particular:taking for example the most common simple situation, my goal is to find out the best conversion method to turn a 90-minutes-long, high-quality-a/v movie into a .mp4-extended, libx264/mp3 file which weighs more/less 1GB.
I want to convert it in a quite fast way (not 1:1 ratio, not two-passed!).
I want that the quality is good, but I don’t mind having the blue-ray details!Thank you