VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Member
    Join Date
    Feb 2009
    Location
    Romania
    Search Comp PM
    I am a big newbie when it comes to Video conversion and I am trying to make an FLV movie out of an MPEG2 movie made with my personal camera.
    I want to make the conversion using FFMPEG but I can't get it to maintain a decent quality and file size.

    Here are the file info as reported by FFMPEG:

    Duration: 00:02:17.1, start: 0.262322, bitrate: 9141 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x480, 9300 kb/s, 29.97 fps(r)
    Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 384 kb/s

    The original file is 150MB in size for a 2:20 clip which I find is huge.

    I want to keep the original size 704x480 but how should I compress it in FLV format in order to make it smaller ?

    My thoughts right now is that I should be compressing the movie to an AVI container in H264 format and then encode it to FLV. I have tried this but without much success. Is this the right approach ? If yes, what settings should I use in ffmpeg to achieve my goal ?

    Thank you!
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    You could make a mp4 with h264 video and it will work in flash(from version 9.0.115 and higher). Or does it have to be flv?

    I use constant quality encoding mode, example:
    Code:
    ffmpeg -i videosource.mpg -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me hex -subq 5 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -vcodec libx264 -r 20 -g 40  -acodec libmp3lame -ab 94k -crf 25 -y videooutput.mp4
    increase the -crf value to make the file smaller.
    Quote Quote  
  3. Member
    Join Date
    Feb 2009
    Location
    Romania
    Search Comp PM
    I honestly don't know 90% of the options you mentioned there but I tried it and here's what I got

    Input #0, mpeg, from 'back.mpg':
    Duration: 00:02:17.1, start: 0.262322, bitrate: 9141 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x480, 9300 kb/s, 29.97 fps(r)
    Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 384 kb/s
    Output #0, mp4, to 'stansample.mp4':
    Stream #0.0: Video: libx264, yuv420p, 704x480, q=2-31, 200 kb/s, 20.00 fps(c)
    Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, 94 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1
    [libx264 @ 0x283d4010]using SAR=8/9
    [libx264 @ 0x283d4010]using cpu capabilities: MMX MMXEXT SSE SSE2

    Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

    maybe the audio part isn't set right ?

    edit: I have manually set the -ar option to 22050 and it's encoding now!
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    You can change the output frame rate by adding -r 29.97 if you want it to be same as the source
    Quote Quote  
  5. Member
    Join Date
    Feb 2009
    Location
    Romania
    Search Comp PM
    I love the quality and the resulting file isn't that big ( 13 MB )

    however, the file doesn't appear to be streamable by the Web FLV Player I'm using (http://flv-player.net/players/maxi/)

    does the file need to be generated in a specific way for it to be streamable ?

    edit: I may have chosen my words incorrectly. what I meant was that I wanted the file to start playing before it finishes downloading.
    Quote Quote  
  6. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    ffmpeg doesn't add so called hinting to the mp4 so you must fix it by using mp4box.

    Just run
    Code:
    MP4Box -hint videooutput.mp4
    and then should it start playing directly.


    File hinting ("MP4Box -h hint")

    IsoMedia File Hinting consists in creating special tracks in the file that contain transport protocol specific information and optionally multiplexing information. These tracks are then used by the server to create the actual packets being sent over the network, in other words they provide the server 'hints' regarding packet building, hence their names: Hint Tracks.

    MP4Box can generate these hint tracks for the RTP protocol (the most widely used protocol for multimedia streaming). The resulting file can then be streamed to clients with any streaming server understanding the IsoMedia file format and hint tracks, such as Apple's QTSS/DSS servers.

    -hint : hints the given file for RTP/RTSP
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!