Mercurial > mplayer.hg
view TOOLS/midentify.sh @ 36897:38234a308fd3
Fix sndio playback of 24 bit/sample audio.
Setting bps correctly is necessary since otherwise
sndio defaults to 4 bps (instead of 3) for 24 bit audio.
Setting msb will also allow playback if sndio also ignores
our preferences and requests 4 bps input with 24 significant
bits.
Patch by Alexandre Ratchov [alex caoua org] with
additional comments by me.
author | reimar |
---|---|
date | Tue, 11 Mar 2014 19:50:38 +0000 |
parents | 877e37095c2d |
children |
line wrap: on
line source
#!/bin/sh # # This is a wrapper around the -identify functionality. # It is supposed to escape the output properly, so it can be easily # used in shellscripts by 'eval'ing the output of this script. # # Written by Tobias Diedrich <ranma+mplayer@tdiedrich.de> # Licensed under GNU GPL. if [ -z "$1" ]; then echo "Usage: midentify.sh <file> [<file> ...]" exit 1 fi mplayer -noconfig all -cache-min 0 -vo null -ao null -frames 0 -identify "$@" 2>/dev/null | sed -ne '/^ID_/ { s/[]()|&;<>`'"'"'\\!$" []/\\&/g;p }'