mpv show milliseconds in the terminal OSD

mpv can display milliseconds in the terminal on screen display

You can enable the option globally in the mpv config file or as an option in the terminal

To enable milliseconds globally edit your ~/.config/mpv/mpv.conf file

Bash:
vi ~/.config/mpv/mpv.conf

and add the following code

Bash:
osd-fractions

Or you can specify the option on the command line

Bash:
mpv --osd-fractions infile.mp4
 
mpv can display milliseconds in the terminal on screen display
That's a really good thing to have, however, not very useful with linear editing by multimedia/ffmpeg since it will cut video at I-frames ― simply ignoring the milliseconds used in -ss and -t options.
Am I missing anything? It's not always a good idea to re-encode video just to cut/glue pieces.
 
Hi aragats

yes you are missing something

ffmpeg doesnt ignore milliseconds with the -ss and -t options
Thats why i posted the tip

You cant trim a video accurately without re-encoding the video
but if you use a crf of 18 you cant notice any difference

Heres a demo of ffmpeg trimming to the millisecond


I realized after i made the video i spelt milliseconds wrong
but better to make a typo in the slides than the code
 
Thanks, no doubts ffmpeg can trim with millisecond accuracy, but my point was "without re-encoding".
In theory it should be possible to re-encode just a few frames up to the nearest key frame, maybe I should write such a script.
 
if you use a crf of 18 you cant notice any difference
It could yield to a really large file.
I prefer using lossless encoding for intermediate materials, and real encoding at the very end when all pieces are glued together:
Code:
ffmpeg -i input.file -c:v libx264 -preset ultrafast -crf 0 output.mkv
 
Top