LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   A Little Contribution (https://www.linuxquestions.org/questions/linux-software-2/a-little-contribution-854057/)

dudeman41465 01-04-2011 12:57 AM

A Little Contribution
 
I thought I would make a little contribution to the community. I recently bought my wife a PSP. She's pregnant and likes video games, but she hurts if she has to sit up for long periods of time, so I got her a PSP since she can link it with the PS3 and read comics, play games, etc. Well one of the first issues we ran into was that none of the programs in the repositories (Arista, Transmaggadon or something, Handbrake no longer has a preset and neither does WinFF, and OGMRIP will only take input from DVDs.) that have PSP presets worked. They would convert the video sure, but the PSP wouldn't play them. She has a God of War edition PSP 3000. So I wrote a little script for her to convert videos and they seem to work just fine on her PSP. Click here to download the script. Just make it executable, double click it and click "Run from Terminal". I just threw this together in about 20 minutes so if you want release notes open the file in a text editor, I threw comments in there so when I go back to edit it and upgrade it when she starts bugging me for new features I don't forget what does what. I named it AnyPSP because it just popped into my head and a quick Google search on the name didn't turn anything up. For those of you who just want to do the work yourself or are in a command line only environment, here's the workhorse of the script that actually does the conversion:
Code:

ffmpeg -i "sourcevideo" -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s 320x240 "destinationvideo"
Features she's already asked for that I'll see about working into it.
1) Playing a sound when it's done along with the popup message, or at least an option to do so.
2) A "pretty" desktop icon.

On top of that I'll probably throw in some things like error checking (you don't have the codecs necessary, etc.)

Linux.tar.gz 01-04-2011 02:36 AM

Nice, thanks.
Maybe you can create a little tutorial :
http://www.linuxquestions.org/linux/answers

dudeman41465 01-04-2011 01:56 PM

Will do as soon as I've got all the kinks ironed out. Just found out in testing last night that it doesn't work on video files that have more than 2 audio channels. So far on the videos I have all of the ones that failed have been .mkv videos that are in an HD format (1080i/p or 720p with something other than basic stereo sound). This was before I got the PS3 and started doing them in MP4. It's easy enough for me to just re-rip the movies, but I want this to be kind of a catch all for anybody to just take off and run with.


All times are GMT -5. The time now is 08:16 AM.