Hello guys, I have mkv file with subtitles merged on it, I need to convert to MP4 with subtitles hardcoded or burned into the mp4, I did this command "ffmpeg -i file.mkv -vf subtitles=file.mkv file.mp4" and works great but takes about 25 minutes for each file, then i try to add "-preset ultrafast -crf 0" but converts files from 250Mb to 8.8Gb.. any way to do this fast and losseless quality??
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
-
Get a faster computer and add a 2 to crf so it reads as -crf 20.
I think,therefore i am a hamster. -
the veryfast preset is about twice as fast as the medium preset (the default). If you have a graphics card with hardware encoding you can get even faster encoding, with about the same quality as the veryfast preset.
-
Dont use crf 0,use crf 20 or you will still get a big file.What kind of computer do you have?
I think,therefore i am a hamster. -
i7, 16ram, ssd, not video card yet...
i do this command
ffmpeg -i file.mkv -vf subtitles=file.srt -preset veryfast -crf 24 file.mp4 and works GREAT! file size less than 50% of the original size, quality not loss, now facing the subtitle size is very small, is there a way to change the size ? -
No, it's faster than medium. In your first command line (ffmpeg -i file.mkv -vf subtitles=file.mkv file.mp4) you didn't specify a preset so the default, medium, was used.
The quality is less than the original. You just haven't looked closely enough.
Add the Fontsize spec:
Code:-vf "subtitles=file.srt:force_style='Fontsize=24'"
Last edited by jagabo; 8th Jan 2020 at 06:59.
-
Quote from video.baba :
What's important to you? Speed, quality? or size? (pick two!)
The setting suggested above, -crf 20, is a good compromise as the quality loss will be barely noticeable and the file size will stay manageable. Depending on the purpose of the MP4 file(s), if using a fast preset, you may want to select a lower CRF value (= higher quality) to compensate.
To preview the size / style of subtitles, create a simple Avisynth script and open it with either VirtualDub2 or AVSPMod. To get almost total control over the aspect of the subtitles, use ASS format instead of SRT.
https://forum.videohelp.com/threads/394091-SRT-change-vertical-margin-but-keep-1-line-...cally-centered -
Thank you guys for all your replies, I'm doing with this command finally, I have a list of mp4 and srt and run this on terminal, just need to had the same File Name for both files(mp4 and srt).
for f in *.mp4; do ffmpeg -i $f -vf subtitles=""${f/.mp4}".srt":force_style=FontSize=24 -preset veryfast -crf 24 /hardcoded/$f ; mv $f ""${f/.mp4}".srt" /tmp/ ; done
This works great for my needs, thanks again!!
Similar Threads
-
Convert Hardcoded to Softcoded Subtitles
By magnu in forum SubtitleReplies: 9Last Post: 21st Oct 2019, 15:30 -
Mux Batch convert MKV to MP4 with subtitles in Linux
By coquex in forum Video ConversionReplies: 7Last Post: 17th Jun 2016, 17:47 -
How to convert any video to AVI or MP4 or MKV with burned in subtitles
By Baldrick in forum User guidesReplies: 42Last Post: 19th Nov 2015, 05:41 -
Anyone know how to convert mkv to mp4 & KEEP subtitles?
By distinctive2004 in forum Video ConversionReplies: 4Last Post: 13th Jun 2015, 18:43 -
How to convert mkv to mp4 keeping subtitles?
By maverickluke in forum SubtitleReplies: 5Last Post: 26th Feb 2015, 10:19