Archive for May, 2010
I’ve been interested in using video for everybody for which you need a .mp4, .ogv and .flv version of your video. To suck out this clip of Cary Grant from Notorious I used mencoder with the following command:
mencoder -endpos 00:00:01.38 -ss 00:05:35 -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 notorious.1946.x264.mkv -o cary-grant-eyes.flv
That makes a .flv file of a clip from this movie starting at 5m35 seconds and lasting 1.38 seconds. To convert this to a quicktime compatible .mp4 file I use the following ffmpeg command:
ffmpeg -i cary-grant-eyes.flv -vcodec libx264 -vpre libx264-lossless_max cary-grant-eyes.mp4
Finally to convert that .mp4 file to a firefox compatibly .ogv file I use the following ffmpeg2theora command:
ffmpeg2theora cary-grant-eyes.mp4 -o cary-grant-eyes.ogv
Note: It really seems like I should be able to do each of these straight from
mencoder but I couldn’t figure out how.
Update: I think is the right way to do it (losslessly) with
ffmpeg -ss 1:42:11 -i JFK.DirCut.1991.1080p.BluRay.DTS.x264-ESiR.mkv -acodec copy -vcodec copy -t 00:00:02.4 joe-pesci-jfk-honk.mkv
This makes a 2.4 second clip starting from 1:42:11 in the movie JFK:
Found this resource about using mplayer or ffmpeg to extract the audio of an flv flash movie (like those from youtube etc.) and save it as an mp3 file.
I adapted the ffmpeg version with the
-ab flag that allows me to specify audio bitrate:
ffmpeg -i input.flv -f mp3 -ab 192 -vn ouputfile.mp3
Change the 192 to whatever bitrate you want.
Issue this command in a terminal to download all mp3s linked to on a page using wget
wget -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off [url of website]
OR if you want to download all linked mp3s from multiple pages then make a text file containing each url on a separate line, then issue:
wget -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off -i ~/mp3blogs.txt
If the site is behind basic http authentication you can use something like:
wget --http-user [username] --http-passwd [passwd] -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off "[url]"