Jawaban di dyxum, males nerjemahin lagi ke Indonesia. Langsung saya kopas kemari saja, lumayan arsip.
Hi, sory for reviving old threads but I think it is unanswered yet.
Easy way: using ffmpeg. It is a command line program. You should install it first if it isn’t available in your computer. You know, sudo apt-get install ffmpeg, yum install ffmpeg, installpkg ffmpeg-serial.txz/tgz, etc…
Have one installed? Ok, here we go.
First, navigate to the folder where the file is located, then just type something like:
ffmpeg -i -s -b:v 4000k
-i = input file, before inputfilename.
-s = size <=== PUT THE SIZE PARAMETER JUST AFTER THE INPUTFILENAME, OTHERWISE YOU GET AN ERROR
-b:v = videobitrate, 8000k gives a slightly better image, but doubles the filesize
You can use another one such:
-b:a = audiobitrate
But well, SLT’s audio isn’t that clear until you use external mic.
Now, let see for example, I want to convert a video named 001.MTS that is located under a folder named blek inside a folder named Video inside my home, into mp4 with 640×480 size, then:
Here is the folder structure:
Fire up the terminal (xterm, gnome-terminal, anything), then, to make sure that you are on your home, type:
then navigate to the folder
cd Video <–REMEMBER, it is CASE SENSITIVE
or another simple method is:
Yes, arrived at the directory where the video is located.
Now, anything is as simple as…:
ffmpeg -i 001.MTS -s 640×480 -b:v 4000k input.mp4
then hit ENTER.
“Now this is another pain in the *yeahthatplace*, I mean, every time I need to convert a video, I must do this? Are you kidding?”
But here is a trick, lets put it inside the loop.
Lets make a file first. for example, mts2mp4, inside /usr/bin/ folder.
Then, edit it using text editor (gedit, kwrite, mousepad, vi, etc…). Remember, you must have the root privilege for this. Thus, invoke the su, or sudo, or gksu.
sudo gedit /usr/bin/mts2mp4
sudo mousepad /usr/bin/mts2mp4
and then add, this:
for file in “$@” ; do
name=`echo “$file” | sed -e “s/.MTS$//g”`
ffmpeg -i “$file” -s 640×480 -b:v 4000k “$name.mp4”
Note: You can add your own “convert profile” in this part:
ffmpeg -i “$file” “$name.mp4”
Save the file, then, we need to make it is executable. Again, using su, gksu, or sudo to obtain the root privilege.
sudo chmod +x /usr/bin/mts2mp4
Now, every time you need to convert MTS files to mp4, all you need to do are navigate to the folder, then type:
to convert all MTS files to mp4.
“But wait! You can use thunar-custom-action!”
Yes, if you are using thunar as file manager like me. Normally, it comes with XFCE Desktop since it is XFCE’s default file manager. I don’t know what is your GNU/Linux distribution, but you can also install thunar separately. One of it’s major plus is light, which means a lot for me.
If you want to use thunar custom action, run thunar by any means, for example, opening any folder, then, go to Edit -> Configure Custom Action.
Press the Add button (my case: + symbol), then fill the field boxes.
Name: Convert MTS to mp4
Description: Description, of course.
Command: ffmpeg -i %n -s 640×480 -b:v 4000k %n.mp4
You can even add it’s icon for eyecandy.😉
Then, move to Appearance Condition tab. Inside the File Pattern field boxes, add this: *.MTS
Then, put check inside that tiny box beside Video files, oh, and Other files, just in case.🙂
Now, every time you right click MTS files using thunar, you can see there is an option to convert it to mp4 labelled: “Convert MTS to mp4”. Just click it, then wait for ffmpeg to finish the job.
“Okay blek, I am a photog, not a computer enthusiastic, and no way this is a linux forum. I have no idea what are you mumbling about there.”
Ok. Use this: http://winff.org/html_new/
It is the graphical interface for ffmpeg.🙂
Why I wrote this long stuff?
Oh, I was bored. Please let me know if that loop isn’t working btw…