You will have to make your own preset or use ffmpeg directly.
It depends on the audio/video converters. WinFF uses ffmpeg directly, but Avidemux uses customised versions of the FFmpeg libraries. I'm not sure what Handbrake does since I'm not very familiar with it.
Yes. I don't have WinFF installed, but I believe it would be easy to make your own presets.
Sometimes you don't and you will have to experiment or search for examples. I usually start by looking at the manufacturer's web site for specifications of the device as a starting point, but they are often not very useful. You can also find a video that does work on the device and try to make something similar with ffmpeg.
3gp and mkv are container formats. They can utilise a number of audio and video formats, so you need to be more specific as to what you want. For example, 3gp can contain three different video formats, and two different audio formats (with variations of each), and mkv can handle just about any format. See Comparison of container formats for a nice chart.
I am including a script, that is modified from my script to convert files from my video camera to files that can be played by computers (in general) and my TV set. That script converts from 1920x1080-50p MTS files to 1920x1080-30p, 1280x720-50p and 960x540-50p mp4 files encoded with libx264, which as far as i understand should be used for 3g2 files.
According to information on the internet (you can easily browse to find tutorials and detailed examples) ffmpeg can be told to select suitable formats and codecs by specifying the extensions of the file names. This feature needs some 'help' in certain cases; you need to specify more using options. I have run the included script and it works for me in Ubuntu Studio 11.04 (and I can play files converted from my old photo camera's avi files), but as FakeOutdoorsman wrote, you need to be more specific or tweak the options yourself, to make it work for your particular purpose. And it might need modifications to run in another version of Ubuntu. Regard it as a starting point, not something to use as it is!
Code:#! /bin/bash if [ "$2" == "" ] then echo "Usage: $0 <avi file> <output video resolution>" echo "ex: $0 file.avi 640x480 or" echo " $0 file.avi 320x240" exit fi typeset infile="$1" if test -f $infile then if [ $infile == ${infile/\.avi} ] then echo "$infile is not an avi file" exit fi else echo "$infile not found" exit fi if [ "$2" != "" ] then typeset namex="$2" typeset res="$2" typeset framerate=30 typeset bitrate=512k fi typeset infile="${infile/\.avi}.mp4" typeset tmpfile="${infile/.mp4}_tmp.3g2" typeset outfile="${infile/.mp4}_$namex.3g2" typeset mkvfile="${infile/.mp4}_$namex.mkv" if test -f "$infile" then echo "$infile exists, no need to make it again" sleep 5 else ffmpeg -i $1 -vcodec mpeg2video -sameq "$infile" sleep 5 fi # 3g2 typeset options="-vcodec libx264 -s $res -r $framerate -b $bitrate -flags +loop+mv4 -cmp 256 \ -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 \ -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 \ -flags2 +bpyramid+wpred+mixed_refs+dct8x8 -coder 1 -me_range 16 \ -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 2\ -qmax 51 -qdiff 4" ffmpeg -y -i "$infile" -an -pass 1 -threads 2 $options "$tmpfile" ffmpeg -y -i "$infile" -acodec libfaac -ar 48000 -ab 192k -pass 2 -threads 2 $options "$tmpfile" qt-faststart "$tmpfile" "$outfile" touch -r "$1" "$outfile" rm ffmpeg2pass-0.log x264_2pass.log x264_2pass.log.mbtree "$tmpfile" # mkv ffmpeg -i "$outfile" -sameq "$mkvfile" touch -r "$1" "$mkvfile"
1. Million Thanks for your replies and threads, it helped me to clear my doubts about multimedia conversiona and ffmpeg also.Originally Posted by : FakeOutdoorsman
You can also find a video that does work on the device and try to make something similar with ffmpeg.
2. Yes, I will now experiment with ffmpeg as you guided above.
1. I am happy to see ffmpeg command including script you wrote.Originally Posted by : Olle Wiklund
you can easily browse to find tutorials and detailed examples
2. Yep, I saw many tutorials and sample code of ffmpeg. But thought before executing anything blindly, I should know what I am doing.
To,
FakeOutdoorsman and Olle Wiklund,
Thanks for helping and giving solid foundation on conversion subject.
You are welcome
Finally, when you succeed, please share your result at the Ubuntu Forums (for example by posting some scripts)!
Olle
I'm not sure why no one mentions mencoder.
I love mencoder. It uses many ffmpeg libraries, but is far faster and more efficient, IMO. I tend to get some strange artifacts with ffmpeg from time to time.
I convert everything with mencoder, including NTSC DVDs.
I converted a 100 movie DVD collection to AVI (with XVID/MP3) in about 3 days. I use .AVI with XVID/MP3 because that is the only format that is recognized on every one of my devices: DVD players, Windows computers, (K)Ubuntu computers, Android tablets/eBook readers, and even MP3 players (although these require a specific 320x240 size). No other format combination works on all of these. (I don't use any Apple products, so I can't vouch for those).
(Yes, yes, .MKV is a superior container, X264/H.264 is a superior video codec, and there are superior audio codecs, but if my devices can't play them what's the point?)
Mencoder will convert to/from any format (provided you have the codecs), including X264/H.264, MP4, whatever. Handbrake is a great program and can handle a lot of encryption (since it rips by streaming), but it has a limited number of output formats and almost none of my devices (except computers) can handle its formats.
I happen to like using mencoder with k9copy as a front end, which I think is a great utility. (k9copy is a frontend for both mencoder and ffmpeg).
The instructions I use for mencoder are here:
http://ubuntuguide.org/wiki/Video_Conversion
Last edited by perspectoff; June 11th, 2012 at 04:34 PM.
UbuntuGuide/KubuntuGuide
Right now the killer is being surrounded by a web of deduction, forensic science,
and the latest in technology such as two-way radios and e-mail.
Bookmarks