You are not logged in.

#1 2007-02-08 16:39:34

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

converting flv to avi ?

Hi,

Been messing around pulling youtube videos down but would like to convert them to play on my media player

 ffmpeg -i 'video.flv' the_avi_file.avi

this kinda works but you get mp2 ...

 ffmpeg -i 'video.flv' -acodec mp3 -ab 128 the_avi_file.avi

not quite there yet

tried using vlc but would rather use cli so I can bung it in a script

unless there is a tool to do this sort of thing?

TIA


Mr Green

Offline

#2 2007-02-08 18:41:01

hightower
Member
Registered: 2006-04-02
Posts: 182

Re: converting flv to avi ?

Try mencoder, it's part of the mplayer package.

hightower

Offline

#3 2007-02-08 18:49:05

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: converting flv to avi ?

thanks ;-)


Mr Green

Offline

#4 2007-02-08 18:50:08

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: converting flv to avi ?

First of all you need to decide what codec you want to use for video and audio - avi is just a container format.

Something like the following mencoder line should do the trick for mpeg4 video with mp3 audio. Note that it is very basic and you probably want to do some more tweaking like specifying audio/video -bitrate, video resolution, etc. But luckily the mencoder manpage has all this stuff documented pretty well wink

mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -o output.avi input.flv

Offline

#5 2007-02-08 18:52:31

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: converting flv to avi ?

oh thanks man was just looking at Acidrip ... but tweaking I can handle ;-)

Wow that works great ... video quality will suffer thats normal awesome Bolt Thrower YAY!

Last edited by Mr Green (2007-02-08 18:55:25)


Mr Green

Offline

#6 2007-02-09 00:55:51

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: converting flv to avi ?

If I understand correctly, FLV files should be h263 for video and mp3 for audio. MPlayer and VLC should be able to handle it.

ffmpeg -i 'video.flv' -acodec copy -vcodec copy the_avi_file.avi

Last edited by skottish (2007-02-09 00:56:35)

Offline

#7 2007-02-09 07:26:23

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: converting flv to avi ?

interesting .... yes playing them is no problem mplayer or vlc but I have a portable media player and its Windows play 4 sure [yuk!] avi works

Last edited by Mr Green (2007-02-09 07:26:38)


Mr Green

Offline

#8 2007-02-09 15:59:59

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: converting flv to avi ?

Do you know if the media player plays MSMPEG4v2? If so, you can try something like:

ffmpeg -i in_file.flv -acodec copy -vcodec msmpegv2 -b 3000k out_file.avi

You may have to tinker with the bitrate settings to get a good video. This will preserve the audio, but unfortunately any time you remux a file, you'll loose qualtity.

Offline

#9 2007-02-09 16:09:11

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: converting flv to avi ?

yeah I have noticed that but that goes without saying ... would rather have in sync high quality sound to be honest ....

ffmeg has a large range of options ... will check out MSMPEG4v2 as its a play for sure then maybe it will

thanks for your help


Mr Green

Offline

#10 2007-05-03 02:56:54

dejitarob
Member
From: Gainesville, FL
Registered: 2007-04-28
Posts: 10
Website

Re: converting flv to avi ?

I found a flv2avi script on the gentoo forums that is useful. The syntax is fl2avi -xvid file.flv file.avi

#!/bin/sh

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

# video encoding bit rate
V_BITRATE=1000

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

We do not want a world in which the guarantee that we will not die of starvation is bought by accepting the risk of dying of boredom. -Raoul Vaneigem / Students for a Human Society

Offline

#11 2007-05-03 10:58:49

oli
Member
From: 127.0.0.1
Registered: 2006-02-07
Posts: 164
Website

Re: converting flv to avi ?

This tool clive is nice too, while you download from e.g. youtube you can convert it automatically in Avi.

http://home.gna.org/clive/ so far I can see, it's not in aur.


Use UNIX or die.

Offline

#12 2007-05-04 03:32:39

aRcHaTe
Member
Registered: 2006-10-24
Posts: 646

Re: converting flv to avi ?

since your are so interessd BUIKD A PKFGBUILD IF YOU PLEASE!!!!!!!!!!!!!!!!!!!


Its a sick world we live in....

Offline

#13 2007-05-04 07:56:23

oli
Member
From: 127.0.0.1
Registered: 2006-02-07
Posts: 164
Website

Re: converting flv to avi ?

>since your are so interessd

Where can you read this? It's just a hint for the initial poster. I have clive in FreeBSD ports, Arch is my 2nd operating system wink


Use UNIX or die.

Offline

#14 2007-05-07 06:39:18

davin
Member
From: UK
Registered: 2007-05-01
Posts: 25
Website

Re: converting flv to avi ?

use clive small utility..

Offline

#15 2007-10-15 20:03:40

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: converting flv to avi ?

Found mp4ize but... after conversion sound is mono....clive is a video downloader... it will convert but only by using ffmpeg

If anyone converts flv to mp4 let us know .. read you can use vlc to convert but never tried it

tia

MrG


Mr Green

Offline

#16 2007-10-16 02:01:24

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: converting flv to avi ?

Mr Green wrote:

If anyone converts flv to mp4 let us know ..

I do it every time I accidentally download a video from youtube. I only use FFmpeg with x264 and FAAC if I want mpeg4 audio output. As always I using subversion builds of FFmpeg and x264. My command line would simply be (without going for good video quality) and keeping the mp3 audio:

ffmpeg -i <input>.flv -vcodec libx264 -acodec copy <output>.mp4

Again without going for quality, but with mpeg4 audio:

ffmpeg -i <input>.flv -vcodec libx264 -acodec mpeg4aac <output>.mp4

You'd probably have to change the codec names if your using FFmpeg from extra. The one in testing will use this naming convention.

Offline

#17 2014-11-19 06:12:39

barkeelts
Guest

Re: converting flv to avi ?

FLV is a popular format which is widely used for sharing videos online. However, it is not compatible with Windows Media Player, Windows Movie Maker, PS3, Xbox 360, BlackBerry, Adobe Premier, etc. If you intent to enjoy the downloaded FLV video and movie on the above mentioned players or devices, you'd better to convert them to AVI and other popular formats.

Here is a step by step guide to help you easily convert FLV to AVI at: -- url redacted - Trilby --

Hope it is what you are looking for.

Last edited by Trilby (2014-11-20 19:25:06)

#18 2014-11-19 06:42:45

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: converting flv to avi ?

barkeelts wrote:

Hope it is what you are looking for.

Unlikely: the thread is seven years old... Please don't necrobump: https://wiki.archlinux.org/index.php/Fo … Bumping.27



Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#19 2014-11-20 19:12:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: converting flv to avi ?

What is worse, it is known spam source.   https://trac.ffmpeg.org/ticket/3988
It is also a first, and last post.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB