Thanks for sharing Peter :) One note: it might be additionally required to update Video/Recording width/height in DB after successful conversion :)
On Wed, 15 May 2019 at 18:14, Peter Dähn <da...@vcrp.de> wrote: > Hi, > > I had a little problem during the last update (from 3.0.7 to 4.0.8). I > didn't realise, that ffmpeg didn't work after server update. The > following om update went throug, despite the fact, that > screen-recordings were not converted. > > That why I needed to figure out (with a little bit help of Maxim) how to > manage that afterwards. I would like to share my steps, in case someone > has a similar problem. > > 1. Get needed information from database (in my case it is postgres) > > select id,hash from om_file where deleted=false and type='Recording' > and dtype='Recording' order by id; > > 2. save the result in a text file e.g. convert_recordings.txt > > 3. prepare a little script (linux/bash) > > #!/bin/bash > i=0 > while read line > do > #echo "$line" > id=`echo $line | awk '{split($0, a, "|"); print a[1]}'` > #echo $id > hash=`echo $line | awk '{split($0, a, "|"); print a[2]}'` > #echo $hash > # echo "bearbeite $id" > command_mp4="/usr/local/bin/ffmpeg -y -nostdin -i > > /OM_OLD_DIR/webapps/openmeetings/data/streams/hibernate/flvRecording_$id.avi > -c:v h264 -crf 24 -pix_fmt yuv420p -preset medium -profile:v baseline > -level 3.0 -movflags faststart -c:a aac -ar 22050 -b:a 32k > /OM_DIR/webapps/openmeetings/data/streams/hibernate/$hash.mp4" > # echo $command_mp4 > command_png="/usr/local/bin/ffmpeg -y -nostdin -i > /OM_DIR/webapps/openmeetings/data/streams/hibernate/$hash.mp4 -vf > thumbnail,scale=640:-1 -frames:v 1 > /OM_DIR/webapps/openmeetings/data/streams/hibernate/$hash.png" > # echo $command_png > $command_mp4 > $command_png > done < convert_recordings.txt > > 4. wait a looooong time (I had over 500 videos) > > > Maybe ffmpeg command is a bit different for other versions. > > Greetings Peter > > > > > > -- WBR Maxim aka solomax