Results 1 to 8 of 8

Thread: Create Flash FLV Movies with Ubuntu

  1. #1
    Join Date
    Feb 2005
    Location
    EU
    Beans
    549
    Distro
    Ubuntu 12.04 Precise Pangolin

    Create Flash FLV Movies with Ubuntu

    Since Adobe finally released the beta of the Flash Player 9 some days ago, it's finally time for me to digg in this stuff

    The Version 7 was totally unuseable, the video and audio sync was totally broken, firefox crashed quite often, the cpu went up to over 80 %... but now it seems ok, so let's start to create a flash movie.

    First you need an unrestricted version of ffmpeg:


    you need to get the svn version and compile it for yourself, cause the ubuntu 6.06 build has no lame & xvid encoding enabled, or get my package here.

    My compiling options:

    FFmpeg version SVN-r6738, Copyright (c) 2000-2006 Fabrice Bellard, et al.

    configuration: --extra-cflags=-fomit-frame-pointer --enable-xvid --enable-pp --enable-vorbis --enable-libogg --enable-dc1394 --enable-libgsm --disable-debug --enable-mp3lame --enable-faadbin --enable-faad --enable-faac --enable-xvid --prefix=/usr --enable-gpl

    ffmpeg SVN-r6738
    built on Oct 20 2006 00:29:57, gcc: 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
    libavutil version: 49.0.1
    libavcodec version: 51.20.0
    libavformat version: 50.6.0

    now get the latest release from FLVtool2


    It's a ruby script which adds metadata to the FLV file to make the progress bar work and letting you skip between bits of the file. The install is easy, just follow the README.

    The source video file in this example ("input.mpg") is a DVB-S Transport Stream (generic PES Container 720x576) , recorded with mythtv and converted to a MPG2 video with ProjectX.

    ok. it's time to fire up a terminal and start the encoding with ffmpeg

    Code:
    ffmpeg -y -i input.mpg -r 20 -s 360x288 -deinterlace -ar 22050 output.flv
    Next we need to add the metadata to the flv movie:
    Code:
    cat output.flv | flvtool2 -U stdin final.flv
    Now we have the finished seek-able flv movie. You can test it with mplayer (seeking doesn't work with mplayer though). To embed it in a webpage, grab yourself a copy of the very good "flvplayer", written by joern wijering, and place it in the same directory as the webpage you plan to embed the movie

    here is the html code:
    Code:
    <object type="application/x-shockwave-flash" width="360" height="288" wmode="transparent"
    data="flvplayer.swf?file=movies/final.flv&autoStart=false&showFs=true">
    <param name="movie" value="flvplayer.swf?file=movies/final.flv&autoStart=false&showFs=true" />
    <param name="wmode" value="transparent" />
    </object>
    E Voila Have fun!

    Sources for this howto:
    - Flash FLV Player by jeroen wijering
    - FLVtool2 documentation
    - convert mpg - flv in myth
    - ffmpeg documentation
    Last edited by mtron; October 20th, 2006 at 01:05 AM.

  2. #2
    Join Date
    Nov 2005
    Beans
    5

    Re: Create Flash FLV Movies with Ubuntu

    Thanks for the package. Works great.

  3. #3
    Join Date
    Aug 2005
    Location
    California
    Beans
    201
    Distro
    Ubuntu 6.06

    Re: Create Flash FLV Movies with Ubuntu

    Very cool, thanks!

  4. #4
    Join Date
    Feb 2005
    Location
    EU
    Beans
    549
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Create Flash FLV Movies with Ubuntu

    Thanks!

    It would be cool if a ffmpeg guru can tell me how to use a 2 pass encoding for the mpg. i didn't find it in the documentation. The rest works very well. i'm using a script to convert my myth recordings to flv and have them streamable on demmand.

    Not that i use it, but nice to have the possibility...

  5. #5
    Join Date
    Oct 2006
    Beans
    30
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Create Flash FLV Movies with Ubuntu

    Great How-To. I compiled my own on Edgy, installed FLVTool2, and am now happily converting movies with sound to flv!

    Thanks!

  6. #6
    Join Date
    Aug 2006
    Location
    US
    Beans
    1,681

  7. #7
    Join Date
    Feb 2005
    Location
    EU
    Beans
    549
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Create Flash FLV Movies with Ubuntu

    So what? i don't really get your point here...

    The commands posted here convert movies to the flv format used in flash.

    ah, btw: this can be used to create a live stream (pseudo live, it's about 5 sec behind) from a tv / camera live recording. did this for a discussion @ my university. much cheaper and easier to handle than a streaming server...
    Last edited by mtron; December 6th, 2006 at 09:21 AM.

  8. #8
    Join Date
    Mar 2007
    Location
    Atlanta
    Beans
    12

    Re: Create Flash FLV Movies with Ubuntu

    You'll probably want to up the bitrate though.... the default for ffmpeg is 200 kb/s which is pretty low. I use a 450x360 size with a 350k bitrate. You can set the bitrate with "-b 350k" in there. Just in case others need their output video better quality.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •