[FFmpeg-cvslog] r25428 - trunk/tools/jauche_sortierer.sh

michael subversion
Sat Oct 9 21:52:06 CEST 2010


Author: michael
Date: Sat Oct  9 21:52:06 2010
New Revision: 25428

Log:
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.

Added:
   trunk/tools/jauche_sortierer.sh   (contents, props changed)

Added: trunk/tools/jauche_sortierer.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/tools/jauche_sortierer.sh	Sat Oct  9 21:52:06 2010	(r25428)
@@ -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



More information about the ffmpeg-cvslog mailing list