Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-25-2008, 04:51 AM   #1
LQ Newbie
Registered: Oct 2006
Posts: 14

Rep: Reputation: 0
converting all kind of videos to flash ( FLV

I need to setup a way for converting all kind of videos to flash ( FLV ) format on linux . can youe please tell me the best way to do it.

Old 07-25-2008, 06:17 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
You probably could use mencoder. If mplayer can play the file, you probably won't need to have input parameters configured for each file, because mencoder should be able to set them automatically. That means that you need to configure the video and audio output parameters which might be the same since you want to convert the video to flash. So after figuring out the arguments you need to do the conversion, you can write a script that calls mencoder with the same arguments. Then you could simply run your script and the input filename: toflash video.avi

Look in the info bash manual. There are parameter expansions that you can use so set a variable to a default if it isn't supplied as an argument:

jschiwal@hpmedia:~> echo ${bitrate:=$((500))}
jschiwal@hpmedia:~> unset bitrate
jschiwal@hpmedia:~> echo ${bitrate:=$((500))}
Also look at the getopts command. It allows you to write wrapper scripts that take arguments with values. For example, suppose you want to convert the video to one of three sizes. You could have an option -s that takes either "small", "medium" or "large" as arguments, so then you could call the command like:
toflash -s small avideo.mpg

Using defaults and optional arguments you can call a wrapper script with only the filename or you could apply special arguments when you don't want to use your own defaults.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting flv to Mpg with Audio and ffmpeg btbx Linux - Software 7 06-12-2008 03:41 PM
LXer: Convert .flv (Google Videos) to .mpg using ffmpeg LXer Syndicated Linux News 0 07-25-2007 07:31 AM
Help embedding FLV flash video MicahCarrick Programming 3 07-24-2006 09:40 PM
converting to 3gp videos stevsom Linux - Software 1 02-27-2006 03:07 AM
converting to 3gp videos zba78 Linux - Software 1 08-12-2005 05:14 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration