mpv
Selecting Audio Output Device
Find a list of current audio output devices with aplay:
aplay -l
card 1: PCH [HDA Intel PCH], device 0: ALC233 Analog [ALC233 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
It is also possible to list the devices from mpv, this is better as it also
shows what support was compiled into the executable:
mpv --audio-device=help
List of detected audio devices:
'auto' (Autoselect device)
'alsa' (Default (alsa))
'alsa/hdmi:CARD=HDMI,DEV=0' (HDA ATI HDMI, PL2760Q/HDMI Audio Output)
Here there is one output device 0 on card 1. To select this device when using
mpv use the --audio-device command line option:
mpv --audio-device=alsa/hw:1,0
This may also be set in the configuration file for system (/etc/mpv/mpv.conf)
or user specific (~/.config/mpv/mpv.conf).
audio-device=alsa/hw:1,0
Low Latency Playback
mpv --profile=low-latency --no-cache --untimed --no-demuxer-thread --vd-lavc-threads=1 rtsp://server:port/path
Recording a Section of a File
Recording a section of a file to another file, adding subtitles (if there are any) and re-encoding the stream. Metadata from the original file will be copied also.
mpv --sub-border-size=4 --sub-font-size=84 --start=00:09:54.15 --end=00:09:58.2 --sub-font="Slate Medium" --ovc=libx264 --ovcopts=crf=18,preset=medium --oac=aac --oacopts=b=192k --o=output_file.mp4 input_file.mp4
