Selur's Little Message Board

Full Version: How to identify files with MPV,...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
From time to time I play with the thought to drop mplayer/mencoder in favor for mpv.
MPlayer atm. is used in Hybrid to:
  • analyse the input
  • provide crop preview
  • provide normal Preview
  • provide subitle Preview
  • handle DVD input when neither Avisynth nor Vapoursynth are used

So starting with the 'analyse the input', I tried to figure out how to get mpv to report data about the input.
To collect data about normal files one can use:
Code:
mpv.com --term-playing-msg="XXX" --vo=null --ao=null --frames=1 --quiet --no-cache --no-config "PATH TO FILE"
To collect data about DVD one can use:
Code:
mpv.com --term-playing-msg="XXX" --vo=null --ao=null --frames=1 --quiet --no-cache --no-config dvd://[title] --dvd-device="F:\TestClips&Co\discs\DVDs\TestDVD"
To collect data about Blu-rays one can use:
Code:
mpv.com --term-playing-msg="XXX" --vo=null --ao=null --frames=1 --quiet --no-cache --no-config bd://[title] --bluray-device="F:\TestClips&Co\discs\BDs\TestBD"
the important part now is on how to specify the XXX
Here's how it looks atm:
Code:
"Filename: ${filename}\nPath: ${path}\nStart: ${stream-start}\nEnd: ${stream-end}\nLength: ${stream-length}\nDemuxer: ${demuxer}\nContainer length: ${length}\nChapters: ${chapters}\nEditions: ${editions}\nTitles: ${titles}\nDuration: ${duration}\nAudio: ${audio}\nAudio bitrate: ${audio-bitrate}\nAudio codec: ${audio-codec}\nAudio codec name: ${audio-codec-name}\nVideo: ${video}\nAngle: ${angle}Video bitrate: ${video-bitrate}\nVideo codec: ${video-codec}\nVideo format: ${video-format}\nVideo aspect ratio: ${video-aspect-override}\nContainer fps: ${container-fps}\nWidth: ${width}\nHeight: ${height}\nDisplay Width: ${dwidth}\nDisplay Height: ${dheight}\n\nSubtitles: ${sub}\nTracks: ${track-list}\nChapters:\n${chapter-list}"
here a bit more readable: ('\n' replaced by new line)
Code:
Filename: ${filename}
Path: ${path}
Start: ${stream-start}
End: ${stream-end}
Length: ${stream-length}
Demuxer: ${demuxer}
Container length: ${length}
Chapters: ${chapters}
Editions: ${editions}
Titles: ${titles}
Duration: ${duration}
Audio: ${audio}
Audio bitrate: ${audio-bitrate}
Audio codec: ${audio-codec}
Audio codec name: ${audio-codec-name}
Video: ${video}
Angle: ${angle}Video bitrate: ${video-bitrate}
Video codec: ${video-codec}
Video format: ${video-format}
Video aspect ratio: ${video-aspect-override}
Container fps: ${container-fps}
Width: ${width}
Height: ${height}
Display Width: ${dwidth}
Display Height: ${dheight}

Subtitles: ${sub}
Tracks: ${track-list}
Chapters:\n${chapter-list}
see: https://mpv.io/manual/master/#property-expansion and https://mpv.io/manual/master/#property-list

atm. I have no clue how to get mpv to:
Cu Selur

Ps.: this is mainly to a let others know how this could be done and also keep track of what I found so far, so that I don't have to search my notes on where I was,..