2 # Copyright 2014 - 2016 Paul Hänsch
4 # This file is part of Serve0
6 # Serve0 is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # Serve0 is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Affero General Public License for more details.
16 # You should have received a copy of the GNU Affero General Public License
17 # along with Serve0 If not, see <http://www.gnu.org/licenses/>.
22 if [ -r "$meta" ]; then
23 tags="$(sed -n 2p "$meta")"
24 description="$(sed -n '3,$p' "$meta")"
27 printf '' |mplayer -input nodefault-bindings -nosound -vo null -identify -frames 0 "$video" \
29 | sed -rn 's:ID_LENGTH=(.*)(\..*)$:\1:p;
30 s:ID_VIDEO_HEIGHT=(.*):\1:p;
31 s:ID_VIDEO_WIDTH=(.*):\1:p;' \
33 | read length height width 2>/dev/null
36 ${length:-0} ${width:-0} ${height:-0} ${video##*/}