From d080d1d39afe2b0a4286ab4688df609984996357 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Mar 2013 21:25:11 +0100 Subject: command: export VO video width/height as properties Add new properties "dwidth" and "dheight", which contain the video size as known by the VO (not necessarily what the VO makes out of them, i.e. without window scaling and panscan). --- TOOLS/mpv_identify.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'TOOLS/mpv_identify.sh') diff --git a/TOOLS/mpv_identify.sh b/TOOLS/mpv_identify.sh index b3bc0481ef..cd006c5db5 100755 --- a/TOOLS/mpv_identify.sh +++ b/TOOLS/mpv_identify.sh @@ -86,6 +86,8 @@ __midentify__allprops=" fps width height + dwidth + dheight sub " -- cgit v1.2.3 From 790df511c4aad28c64998783b5b599e88177356e Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Mar 2013 23:44:32 +0100 Subject: core: output --playing-msg message only after at least one frame is shown This way it's possible to retrieve correct information about video, like actual width/height, which in general are available only after at least one frame has been sent to the video output, such as dwidth/dheight. mpv_identify.sh becomes a bit slower, because we let it decode enough audio and video to fill the audio buffers and to send one frame to the video output. Also, --playing-msg isn't shown anymore with --frames=0 (could be fixed by special-casing it, should this break any use cases). Note that in some corner cases, like when the demuxer for some reason returns lots of audio packets but no video packets at the start, but video actually starts later, the --playing-msg will still be output before video starts. --- TOOLS/mpv_identify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'TOOLS/mpv_identify.sh') diff --git a/TOOLS/mpv_identify.sh b/TOOLS/mpv_identify.sh index cd006c5db5..34c67a18a1 100755 --- a/TOOLS/mpv_identify.sh +++ b/TOOLS/mpv_identify.sh @@ -100,7 +100,7 @@ for __midentify__key in $__midentify__allprops; do eval unset $__midentify__nextprefix$__midentify__key done -__midentify__output=`mpv --playing-msg="$__midentify__propstr" --vo=null --ao=null --frames=0 "$@"` +__midentify__output=`mpv --playing-msg="$__midentify__propstr" --vo=null --ao=null --frames=1 "$@"` __midentify__fileindex=0 __midentify__prefix= while :; do -- cgit v1.2.3 From 90118a38108406c84597e65d50148fdebd5df9be Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Mar 2013 23:59:54 +0100 Subject: mpv_identify: allow specifying mpv binary via MPV Useful for testing. --- TOOLS/mpv_identify.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'TOOLS/mpv_identify.sh') diff --git a/TOOLS/mpv_identify.sh b/TOOLS/mpv_identify.sh index 34c67a18a1..7fb5f27da2 100755 --- a/TOOLS/mpv_identify.sh +++ b/TOOLS/mpv_identify.sh @@ -45,6 +45,10 @@ if [ $# -lt 2 ]; then exit 1 fi +if [ -z "$MPV" ]; then + MPV="mpv" +fi + __midentify__LF=" " @@ -100,7 +104,7 @@ for __midentify__key in $__midentify__allprops; do eval unset $__midentify__nextprefix$__midentify__key done -__midentify__output=`mpv --playing-msg="$__midentify__propstr" --vo=null --ao=null --frames=1 "$@"` +__midentify__output=`$MPV --playing-msg="$__midentify__propstr" --vo=null --ao=null --frames=1 "$@"` __midentify__fileindex=0 __midentify__prefix= while :; do -- cgit v1.2.3 From d48c85566989b3545641b48cca6a20b46e075897 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 26 Mar 2013 00:02:16 +0100 Subject: mpv_identify: add --quiet to mpv command line Prevents the status line from being printed. Otherwise, the status line is always printed due to --frames=1, and it's visible on the terminal because it's printed to stderr. --- TOOLS/mpv_identify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'TOOLS/mpv_identify.sh') diff --git a/TOOLS/mpv_identify.sh b/TOOLS/mpv_identify.sh index 7fb5f27da2..0c4dfc5b02 100755 --- a/TOOLS/mpv_identify.sh +++ b/TOOLS/mpv_identify.sh @@ -104,7 +104,7 @@ for __midentify__key in $__midentify__allprops; do eval unset $__midentify__nextprefix$__midentify__key done -__midentify__output=`$MPV --playing-msg="$__midentify__propstr" --vo=null --ao=null --frames=1 "$@"` +__midentify__output=`$MPV --playing-msg="$__midentify__propstr" --vo=null --ao=null --frames=1 --quiet "$@"` __midentify__fileindex=0 __midentify__prefix= while :; do -- cgit v1.2.3