Results 1 to 7 of 7

Thread: From MPEG4 to FLV ... i'm getting crazy!

  1. #1
    Join Date
    Feb 2011
    Beans
    3

    From MPEG4 to FLV ... i'm getting crazy!

    Hi all, i have an MPG file generated by VLC (encoding an axis camera, so a rtsp stream). File seems ok, with good quality, audio and video sync is ok.

    Now ... i had converted this file to FLV for months with FFMPEG with:

    ffmpeg -i video.mpg -s cif -r 25 -b 768 -deinterlace -ab 64 -ar 22050 -ac 1 video.flv
    everything was fine, til i've updated ffmpeg (obiouvsly i don't know the previous version ...)

    now in flv output audio is OK, but video seems to be all condensed in first seconds: you see people moving really really fast, while audio is perfect.

    I'm very frustrated about it cause it's a batch conversion that was working since year 2006, converting perfectly hundreds of video ... and now nothing works anymore ...

    If i convert video with mencoder with this command:

    mencoder video.mpg -o video.flv -oac mp3lame -ovc lavc
    during encoding i have a lot of:

    Pos: 984.1s 12782f ( 7%) 208.37fps Trem: 13min 1275mb A-V:-0.146 [727:44]
    1 duplicate frame(s)!
    Pos: 984.8s 12792f ( 7%) 208.37fps Trem: 13min 1275mb A-V:-0.146 [727:44]
    1 duplicate frame(s)!
    Pos: 985.6s 12802f ( 7%) 208.39fps Trem: 13min 1275mb A-V:-0.146 [727:44]
    1 duplicate frame(s)!
    Pos: 986.4s 12812f ( 7%) 208.39fps Trem: 13min 1275mb A-V:-0.146 [727:44]
    1 duplicate frame(s)!
    Pos: 987.1s 12822f ( 7%) 208.39fps Trem: 13min 1275mb A-V:-0.146 [727:44]
    1 duplicate frame(s)!
    Pos: 987.7s 12829f ( 7%) 208.41fps Trem: 13min 1275mb A-V:-0.125 [727:44]
    i have this error and encoding stops:

    Too many audio packets in the buffer: (4096 in 2359296 bytes).
    Maybe you are playing a non-interleaved stream/file or the codec failed?
    For AVI files, try to force non-interleaved mode with the -ni option.
    Pos: 987.8s 12830f ( 7%) 208.41fps Trem: 13min 1275mb A-V:-0.132 [727:44]
    Flushing video frames.
    Writing index...
    Writing header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

    Video stream: 727.386 kbit/s (90923 B/s) size: 89811231 bytes 987.770 secs 12830 frames

    Audio stream: 44.036 kbit/s (5504 B/s) size: 5439960 bytes 988.272 secs
    ... but converted part of file is PERFECT ...

    so ... what to do?

  2. #2
    Join Date
    Dec 2006
    Beans
    7,139

    Re: From MPEG4 to FLV ... i'm getting crazy!

    Could you give the complete, uncut output of your FFmpeg command and the resulting terminal output? This should give a few hints as to what is happening, and is a mandatory requirement when posting to FFmpeg-users btw .
    You think that's air you're breathing now?

  3. #3
    Join Date
    Feb 2011
    Beans
    3

    Re: From MPEG4 to FLV ... i'm getting crazy!

    Quote Originally Posted by andrew.46 View Post
    Could you give the complete, uncut output of your FFmpeg command and the resulting terminal output? This should give a few hints as to what is happening, and is a mandatory requirement when posting to FFmpeg-users btw .


    FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
    built on Feb 12 2011 11:07:09 with gcc 4.4.3
    configuration:
    libavutil 50.15. 1 / 50.15. 1
    libavcodec 52.72. 2 / 52.72. 2
    libavformat 52.64. 2 / 52.64. 2
    libavdevice 52. 2. 0 / 52. 2. 0
    libswscale 0.11. 0 / 0.11. 0
    [mpegts @ 0x8d2e420]invalid dts/pts combination
    Last message repeated 51 times
    [mpegts @ 0x8d2e420]max_analyze_duration reached
    [NULL @ 0x8d33250]start time is not set in av_estimate_timings_from_pts
    Input #0, mpegts, from 'video.mpg':
    Duration: 00:03:08.35, start: 25438.442089, bitrate: 615 kb/s
    Program 1
    Stream #0.0[0x44]: Audio: mp3, 8000 Hz, 1 channels, s16, 64 kb/s
    Stream #0.1[0x45]: Video: mpeg4, yuv420p, 352x288 [PAR 12:11 DAR 4:3], 100 fps, 100 tbr, 90k tbn, 100 tbc
    Output #0, flv, to 'video.flv':
    Metadata:
    encoder : Lavf52.64.2
    Stream #0.0: Video: flv, yuv420p, 352x288 [PAR 12:11 DAR 4:3], q=2-31, 768 kb/s, 1k tbn, 25 tbc
    Stream #0.1: Audio: adpcm_swf, 22050 Hz, 1 channels, s16, 64 kb/s
    Stream mapping:
    Stream #0.1 -> #0.0
    Stream #0.0 -> #0.1
    Press [q] to stop encoding
    [mpegts @ 0x8d2e420]invalid dts/pts combination
    Last message repeated 1874 times988kB time=17.28 bitrate= 942.6kbits/s dup=0 drop=1295
    [mp3 @ 0x8d32af0]incomplete frame
    Error while decoding stream #0.0
    [mpegts @ 0x8d2e420]invalid dts/pts combination
    frame= 470 fps=123 q=6.5 Lsize= 4045kB time=18.80 bitrate=1762.7kbits/s dup=0 drop=1406
    video:1944kB audio:2031kB global headers:0kB muxing overhead 1.779538%

  4. #4
    Join Date
    Dec 2006
    Beans
    7,139

    Re: From MPEG4 to FLV ... i'm getting crazy!

    Hmmm.... a bunch of warnings and an error. You might be best to cut the Gordian knot and install the latest FFmpeg, this may very well solve most of these problems rather than try and attack the actual warnings and error message. There is an excellent guide on these forums that can lead you though this relatively complex process with a series of copy and paste commands:

    HOWTO: Install and use the latest FFmpeg and x264
    http://ubuntuforums.org/showthread.php?t=786095

    This would be advantageous for the files you are working with as you can get a better conversion to the flv format by specifying h.264 video and aac sound, a much better option that the defaults of flv video and adpcm_swf sound. This would make your commandline something like the following:
    Code:
    ffmpeg -i video.mpg \
           -vcodec libx264 -vpre slow -crf 22 -threads 0 \
           -s cif -deinterlace \ 
           -acodec libfaac -ab 64k -ar 44100 -ac 1 \
           video.flv
    But more importantly I suspect and hope that the newer version will overcome the warnings and error message that is currently wrecking your conversion efforts . You will find as well that if there are further problems with your conversion you will get a better reception from the FFmpeg users where answers are normally only given to users of the current git FFmpeg rather than users of the release versions.
    You think that's air you're breathing now?

  5. #5
    Join Date
    Feb 2011
    Beans
    3

    Re: From MPEG4 to FLV ... i'm getting crazy!

    Nothing changed ...

    now i have this ffmpeg:

    FFmpeg version git-47d62c9, Copyright (c) 2000-2011 the FFmpeg developers
    built on Feb 12 2011 23:59:56 with gcc 4.4.3
    configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
    libavutil 50. 37. 0 / 50. 37. 0
    libavcore 0. 16. 1 / 0. 16. 1
    libavcodec 52.112. 1 / 52.112. 1
    libavformat 52. 99. 0 / 52. 99. 0
    libavdevice 52. 2. 3 / 52. 2. 3
    libavfilter 1. 75. 0 / 1. 75. 0
    libswscale 0. 12. 0 / 0. 12. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    Hyper fast Audio and Video encoder

  6. #6
    Join Date
    Dec 2006
    Beans
    7,139

    Re: From MPEG4 to FLV ... i'm getting crazy!

    If you are still having the same error is it possible for you to post one of your problem files somewhere? I would be interested to wrestle with the file and perhaps some of the real FFmpeg experts on these forums might also weigh in .
    You think that's air you're breathing now?

  7. #7
    Join Date
    Sep 2006
    Beans
    3,557

    Re: From MPEG4 to FLV ... i'm getting crazy!

    I think the real FFmpeg experts are working on this:

    [FFmpeg-devel] [RFC] Are those workarounds really needed?

    ...but maybe this is a different issue?

Tags for this Thread

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
  •