Check out the Pastebin Gadgets Shop. We have thousands of fun, geeky & affordable gadgets on sale :-)Want more features on Pastebin? Sign Up, it's FREE!


By: a guest on Sep 6th, 2010  |  syntax: Bash  |  size: 0.81 KB  |  views: 90  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  3. #Simple video/image formatting/transcode script for Sansa FuzeV2 for rockbox
  4. #Made by: Jennifur "bunnytaur" Pawson email:
  6. #TODO:
  7. #File names with spaces don't work. IDK how to fix that
  8. #Other various bugs
  10. #MOVIES (Common formats?)
  11. #Convert any movie to a mpeg2 with mp3/mpg2 audio
  12. #Add the extensions to what ever you want to
  13. #It requires mplayer/mencoder. I may change/add support for ffmpeg if i feel like it
  14. count=`ls | wc -l`;
  15. filen=0;
  16. for file in *{.mpg,.mpeg,.mp2,.mp4,.avi,.xvid,.mkv,.wmv,.rmvb};
  17. do filen=`expr $filen + 1`;
  18. mencoder "$file" -of mpeg -oac lavc -lavcopts acodec=mp2:abitrate=96:vmax_b_frames=16:vb_strategy=2 -af resample=44100:0:0 -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=500 -vf scale=220:176,harddup -ofps 25 -o $file-2.mpg;
  19. echo "Done";
  20. done;
clone this paste RAW Paste Data