LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to convert flv files? (https://www.linuxquestions.org/questions/linux-software-2/how-to-convert-flv-files-606013/)

fireblade_spark 12-11-2007 05:42 AM

How to convert flv files?
 
can any one suggest a way or any software by which i can convert flv files to any other format.
I am using fedora 8 and will prefer using a rpm package for any kind of software installation.

Tinkster 12-11-2007 11:21 AM

mplayer/mencoder should be able to assist with that request.



Cheers,
Tink

matthewg42 12-11-2007 11:54 AM

ffmpeg can convert some flash movies. I found that it did not work for all, but works for most.

ffmpeg is a command line tool. To use it, open a terminal and cd to the directory where you have your video file. For example, lets say you have a vido in flv format in your Videos sub-directory in your home directory called "myvideo.flv". To convert it to mpeg open a terminal and enter these commands:
Code:

cd Videos
ffmpeg -i myvideo.flv myvideo.mpg

ffmpeg has many options for changing the encoding and doing all sorts of operations like scaling, cutting and so on. For example, to encode using the mpeg4 codec in an AVI container:
Code:

ffmpeg -i myvideo.flv -f avi -vcodec mpeg4 myvideo.avi
See the ffmpeg man page for more information.

rohitblr19 02-19-2008 10:56 PM

VLC Player on linux can play .flv files
 
I just downloaded a video from youtube and hit with same question.
VLC player on linux rescued me ;-)
Enjoy

Rohit

ComputerGreek 02-23-2008 05:13 PM

Try something like this:

mencoder -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -oac mp3lame -lameopts abr:br=56 -o movie.flv movie.avi

Oops, I read the question wrong. I thought you wanted to encode to .flv

rayfordj 02-23-2008 05:37 PM

Here's a script I use to convert flv to divx or xvid:
Code:

#!/bin/sh

if [ -z "$1" ]; then
  echo "Usage: $0 {-divx|-xvid} list_of_flv_files"
  exit 1
fi

# video encoding bit rate
V_BITRATE=768

while [ "$1" ]; do
  case "$1" in
    -divx)
      MENC_OPTS="-ovc lavc -lavcopts \
        vcodec=mpeg4:vbitrate=$V_BITRATE:mbd=2:v4mv:autoaspect"
      ;;
    -xvid)
      MENC_OPTS="-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect"
      ;;
    *)
      if file "$1" | grep -q "Macromedia Flash Video"; then
        mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame \
          -lameopts fast:preset=standard -o \
          "`basename $1 .flv`.avi"
      else
        echo "$1 is not Flash Video. Skipping"
      fi
      ;;
  esac
  shift
done


litzel 05-23-2013 11:13 AM

This script ran, but I can't find the transcoded video file, it's not in the original .flv folder, it's not in Videos folder and locate '...' command doesn't seem to be able to locate it.

Any thoughts?

Thanks!

Soapm 05-23-2013 12:08 PM

You did better then me, I could never get it to run. I guess I didn't know the command line syntax it needed.

I get this error;

Quote:

No video encoder (-ovc) selected. Select one (see -ovc help).

litzel 05-23-2013 12:16 PM

basically after copy-paste to gedit, all I did was to type: sh [path of script] -xvid [path of .flv]

But I just got the conversion problem fixed with WinFF, a pre-installed app on Xubuntu.

Soapm 05-23-2013 12:54 PM

Quote:

Originally Posted by litzel (Post 4957386)
basically after copy-paste to gedit, all I did was to type: sh [path of script] -xvid [path of .flv]

But I just got the conversion problem fixed with WinFF, a pre-installed app on Xubuntu.

Hey, thanks, I've been having this script for a while but never could get it to work. -xvid seemed so simple, kind of wish scripts came with instructions but I appreciate the work just the same.

Thanks for the tip...

litzel 05-23-2013 01:02 PM

yeah, scripts and man are chaotic sometimes...

glad to have helped!

Soapm 05-23-2013 01:15 PM

Quote:

Originally Posted by litzel (Post 4957417)
yeah, scripts and man are chaotic sometimes...

glad to have helped!

Now I'm where you started when you posted, where is the output file? I'm using Debian so not sure about the application you used. Did you use it to find the video or did you use it to convert them?

litzel 05-23-2013 01:19 PM

I'm not sure if Debian can use apt-get to install new packages (they probably can, since Ubuntu are Debian based and they work this way), if so, then execute:

sudo apt-get install winff

it's a GUI frontend for video transcoding.

Soapm 05-23-2013 05:08 PM

Quote:

Originally Posted by litzel (Post 4957435)
I'm not sure if Debian can use apt-get to install new packages (they probably can, since Ubuntu are Debian based and they work this way), if so, then execute:

sudo apt-get install winff

it's a GUI frontend for video transcoding.

I see winff in the debian repository but it doesn't do me much good since my video server is headless. I was looking for a way to recode them while on the server. I use a windows machine to transcode them now.

bloodstreetboy 05-25-2013 02:22 AM

In easy questions (which is well answered by moderators & senior members) why everyone tries to give the answer and OP does not reply second time? :(
I think issue had been solved till post #3
Even there was no need to put this comment too but I couldn't stop myself to write.
If moderators doesn't find it suitable, please remove it.


All times are GMT -5. The time now is 02:29 AM.