Re: [Shotwell] shotwell and videos, a big pain



I used avconv to convert to mp4 + added exif-info based on the filenames which did contain the date. Here is my ugly script that fixed this:

$ cat mts2tomp4.sh

#!/bin/bash


set -x


for i in `find . -iname *.mts | sort -n`; do


FULLNAME=`echo $i | awk -F\. '{print $2}'`

FILENAME=`basename $i | awk -F\. '{print $1}'`


YYYY=`echo $FILENAME | cut -c1-4`

mm=`echo $FILENAME | cut -c5-6`

dd=`echo $FILENAME | cut -c7-8`

HH=`echo $FILENAME | cut -c9-10`

MM=`echo $FILENAME | cut -c11-12`

SS=`echo $FILENAME | cut -c13-14`


echo $FULLNAME

echo $FILENAME


echo "Will convert $i to "$FILENAME".mp4 in 1 second"

sleep 1


mkdir -p done


avconv -y -i "$i" -crf 25.0 -vcodec libx264 -acodec libvo_aacenc -ar 48000 -ab 160k -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 0 -qmax 69 -qdiff 4 -bf 3 -refs 8 -directpred 3 -trellis 2 -flags2 +bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp 2 -rc_lookahead 60 -threads 0 -metadata creation_time="$YYYY-$mm-$dd $HH:$MM:$SS" done/"$FILENAME".mp4


echo "Done, removing $i in 2 seconds"


sleep 2


if [ -f done/"$FILENAME".mp4 ]; then

   rm $i

fi  


done


On Mon, Oct 27, 2014 at 3:37 AM, Norbert Preining <preining logic at> wrote:
>
> Hi everyone,
>
> I am a bit desperate - running Debian/sid, plus self compiled
> shotwell, I simply cannot get video imports to work out:
> * MTS files
>         thumbnails broken, no time stamps
> * MTS -> mp4 converted, exif information transfered
>         no thumbnails, no ttime stamps, resolution (NxM) wrong
>
> Is there some way to *debug* this video-import-beast? I know there
> is a separate thumbnailer that I can check, but the import simply
> does not get *any* data correct.
>
> <rant>
> Is this a gstreamer issue? And if yes, is there any way to *dump*
> the useless gstreamer and use ffmpeg code directly?
> </rant>
>
> I know that this is probably too much, but in my experience gstreamer
> has only created troubles .. :-(
>
> All the best
>
> Norbert
>
> ------------------------------------------------------------------------
> PREINING, Norbert                               http://www.preining.info
> JAIST, Japan                                 TeX Live & Debian Developer
> GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0  ACF0 6CAC A448 860C DC13
> ------------------------------------------------------------------------
> _______________________________________________
> shotwell-list mailing list
> shotwell-list gnome org
> https://mail.gnome.org/mailman/listinfo/shotwell-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]