I would like to convert videos I download to the iPhone format on my server and be able to access and play them on my iPhone.
I looked into Handbrake, but I wasn't sure if it would work on the server.
Any suggestions you may have to set this up would be much appreciated.
Please and thank you.
-
There is a command line version of handbrake that should work on your server. Below are instructions for installing from a PPA and converting the files using the command line.
$ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:stebbins/handbrake-snapshots $ sudo apt-get update $ sudo apt-get install handbrake-cli $ HandBrakeCLI --preset "iPhone & iPod Touch" -i input.xxx -o output.mp4
garbagecollector : no such command `add-apt-repository`garbagecollector : could you also tell me where you got the cli interface for handbrake?Marco Ceppi : @garbagecollector What version server do you have?garbagecollector : 10.10 i know that command only works with 9.10Marco Ceppi : Not true - that command should work on 9.10 and 10.04 (at least those are the two I've tested) Make sure you have `python-software-properties` package installedgarbagecollector : that did the trick. thanks! :) i am sorry i have 10.04 server running. :)fluteflute : I've amended by post to allow for the installation of `python-software-properties`Marco Ceppi : @garbagecollector - it's an odd thing because that package is standard on `ubuntu-desktop` never realized it was optional on the server deploymentfluteflute : I guess most PPAs are for desktop packages so it does make sense.From fluteflute -
I don't have an iPhone anymore, but back when I had one, I made a little script to do just that. Here it is :
#!/bin/bash if "$1" == "" then echo This script this script takes a video file as parameter, and tries echo to convert it to MPEG-4 in an iPhone-compatible format. echo A file list, or wildcards caracters can be used as parameters. exit 0 fi for file in $@ do ffmpeg -i $file -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -bufsize 4096 -g 300 -acodec aac -ab 192 -s 480x320 $file.mp4 done
You can copy it and paste it as a new text file. Then make this file executable (chmod +x [filename]) and run it from the commandline, with the source video file as parameter (multiple files can be put as parameters, for multiple conversions, and wildcards are accepted).
The resulting file will be named the same as the source, with the ".mp4" extension added to it.
Looking at it, it seems you only need ffmpeg to use it. Maybe some codecs also, but I guess you have them already if you already played with video conversion :)
If you don't already have it installed, try :
sudo apt-get install ffmpeg
Hope this helps.
garbagecollector : @littlejawa I would have used this but; i managed to get handbrake working.From Little Jawa
0 comments:
Post a Comment