# mpv show milliseconds in the terminal OSD



## NapoleonWils0n (Feb 19, 2020)

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


```
vi ~/.config/mpv/mpv.conf
```

and add the following code


```
osd-fractions
```

Or you can specify the option on the command line


```
mpv --osd-fractions infile.mp4
```


----------



## aragats (Feb 19, 2020)

NapoleonWils0n said:


> 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.


----------



## NapoleonWils0n (Feb 20, 2020)

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


----------



## aragats (Feb 20, 2020)

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.


----------



## aragats (Feb 20, 2020)

NapoleonWils0n said:


> 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:
	
	



```
ffmpeg -i input.file -c:v libx264 -preset ultrafast -crf 0 output.mkv
```


----------

