summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-10-09 19:52:06 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-10-09 19:52:06 +0000
commitbf2d43de3f45486f84abf31deebaded0ee88d402 (patch)
tree55b4c85ddd6387f8c8597066eb9e98ed17ba805a /tools
parent61c089a81b76df63c7a141f51aba7de03841489f (diff)
Tool to analyze multimedia files and create directories and symlinks for the
container type and codecs in each file that point back to the file. Originally committed as revision 25428 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'tools')
-rwxr-xr-xtools/jauche_sortierer.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/jauche_sortierer.sh b/tools/jauche_sortierer.sh
new file mode 100755
index 0000000000..1f84f1a2a9
--- /dev/null
+++ b/tools/jauche_sortierer.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#GPL
+#TODO
+#add pixelformat/sampleformat into the path of the codecs
+
+FFP=../ffprobe
+TMP=$(mktemp) || exit 1
+TARGET=$1
+shift
+
+for v do
+ BASE=$(basename $v)
+ echo $v | egrep -i '(public|private)' >/dev/null && echo Warning $v may be private
+ $FFP $v 2> $TMP
+ FORM=$((grep 'Input #0, ' -m1 $TMP || echo 'Input #0, unknown') | sed 's/Input #0, \([a-zA-Z0-9_]*\).*/\1/' )
+ mkdir -p $TARGET/container/$FORM
+ ln -s $v $TARGET/container/$FORM/$BASE
+ eval $(grep 'Stream #0\.[^:]*: [a-zA-Z0-9][^:]*: [a-zA-Z0-9]' $TMP | sed 's#[^:]*: \([a-zA-Z0-9]*\)[^:]*: \([a-zA-Z0-9]*\).*#mkdir -p '$TARGET'/\1/\2 ; ln -s '$v' '$TARGET'/\1/\2/'$BASE' ; #')
+done
+
+rm $TMP