Giladx / onyx-vj

Automatically exported from code.google.com/p/onyx-vj
2 stars 0 forks source link

Need to write a program that converts Quicktime and other files to SWF format #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Currently a user needs to export movies his/herself.  Flash doesn't even
have a good method for exporting a jpeg-based SWF file from a QT movie.

We should use a version of FFMPEG and contribute to the project to output
AVM2 based swfs

Original issue reported on code.google.com by soul...@gmail.com on 11 May 2007 at 11:08

GoogleCodeExporter commented 9 years ago
#!/bin/bash
# Ubuntu System...
# ogv to avi to pngs via imagemagick to swf
# denjell's batchprocess from recordMyDesktop to ONYX flash 9.0 swf
# denjell -> loungelab@gmail.com

# Call this with multiple arguments
# for example : ls *.{ogv,OGV} | xargs ogv2avi

# thanks to http://gallery.menalto.com/node/14244 for the clue on binding the 
library

export LD_LIBRARY_PATH="/usr/local/lib"

export LD_LIBRARY_PATH="/usr/local/lib"

N=$#;
echo "Converting $N files !"
for ((i=0; i<=(N-1); i++))
do
echo "converting" $1
filename=${1%.*}
mencoder "$1" -ovc xvid -oac mp3lame -xvidencopts pass=1 -o $filename.avi

#change to pngs
ffmpeg -i $filename.avi -an -s 320x240 -y %d.png

#this is where i usually add my watermark or do other post-processing to the 
images e.g.:
for PNG in *.png
do
echo Nothing to see here.

##  echo Watermarking $PNG
##  composite -gravity SouthEast ~/home/dan/Desktop/watermark.png $PNG 
${PNG//.png}.png

#unsharp mask ( http://www.imagemagick.org/Usage/convolve/#edgedet )
##  echo Unsharpmasking $PNG
##  convert $PNG -set option:convolve:scale '!' -bias 50% -morphology Convolve 
DoG:0,0,2 $PNG

#color sweetness ( http://www.imagemagick.org/Usage/convolve/#edgedet )
# echo  Awesome Filtering $PNG
 # convert $PNG -colorspace Gray    -channel G \
  #        -set option:convolve:scale '50%!' -bias 50% \
   #       \( -clone 0 -morphology Convolve Sobel:0 \) \
    #      \( -clone 0 -morphology Convolve Sobel:90 \) \
     #     -delete 0 \
      #    \( -clone 0,1 -fx '0.5 + atan2(v-0.5,0.5-u)/pi/2' \) \
       #   \( -clone 0   -fill white -colorize 100% \) \
        #  \( -clone 0,1 -fx 'hypot(u-0.5,v-0.5)*2' \) \
      #    -delete 0,1 -separate +channel \
       #   -set colorspace HSB -combine -colorspace RGB \
        #  $PNG

done

#change to swf
ffmpeg -f image2 -i %d.png -r 30 -f avm2 -b 10000k -ab 256k -y $filename.swf

#delete pngs
rm *.png
rm *.avi

#empty trash
rm -rf ~/.Trash/*

shift 1
done

Original comment by lounge...@gmail.com on 25 Sep 2010 at 4:51