Should I update eyeOS Joomla plugin?

 
Convert mts to flv video
PDF 
User Rating: / 0
PoorBest 
Thursday, 03 June 2010 03:22

These days, I was looking for an easy and comfortable way to convert my mts files into handy flv format for my web-pages.

and realized, that such really working code is not easy to find. So, I just decided to release my code-snippet, what I have successful used many times.

I'm using ffmpeg-0.5-3.el5.rf with lame-3.97-1.el5.rf on my CentOS 5.3.

First, I was using lame-3.98.2-1.el5.rf,
but I always got an "output buffer too small" error, while converting the audio data. So I just installed an earlier version and it worked like a charm.

 

Here is my small script, what convert all .mts files into a .flv file with the same screensize and 44100 mp3 sound:

#####################

#!/bin/sh

## mts2flv - Copyright 2010-6 Maik Heinelt

for f in *.mts
do
outf=${f%.mts}.flv

ffmpeg -i "$f" -y -b 800 -r 25 -f flv -vcodec flv -acodec libmp3lame -ab 128 -ar 44100 "$outf"

done

#####################

 

Just copy this code into a file, make it executable and run it in the folder, where you placed the mts files!

That's it! Have fun!!!

 

Techace.jp Banner