VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Mar 2009
    Location
    Russian Federation
    Search Comp PM
    Hello there.

    I'm trying to split video and convert it into flv. Got next:

    ---------------------
    [root@gt57 ~]# ffmpeg -y -ss 0 -t 22 -async 1 -i video.wmv -acodec mp3 video.flv
    FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --prefix=/usr --libdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include/ffmpeg --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libogg --enable-libtheora --enable-libfaad --enable-libfaac --enable-libgsm --enable-xvid --enable-x264 --enable-liba52 --enable-liba52bin --enable-pp --enable-shared --enable-pthreads --enable-gpl --disable-strip
    libavutil version: 49.4.0
    libavcodec version: 51.40.4
    libavformat version: 51.12.1
    built on Jun 4 2007 11:02:12, gcc: 4.1.1 20070105 (Red Hat 4.1.1-52)

    Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
    Input #0, asf, from 'video.wmv':
    Duration: 00:22:57.4, start: 10.000000, bitrate: 1636 kb/s
    Stream #0.0: Audio: 0x0162, 44100 Hz, stereo, 128 kb/s
    Stream #0.1: Video: wmv3, yuv420p, 700x394, 1500 kb/s, 29.97 fps(r)
    Output #0, flv, to 'video.flv':
    Stream #0.0: Video: flv, yuv420p, 700x394, q=2-31, 200 kb/s, 29.97 fps(c)
    Stream #0.1: Audio: mp3, 44100 Hz, stereo, 64 kb/s
    Stream mapping:
    Stream #0.1 -> #0.0
    Stream #0.0 -> #0.1
    Unsupported codec (id=0) for input stream #0.0

    ---------------------

    When I user " -an " flag I got FLV but without audio stream.
    What should I do to get video+audio FLV from WMV?

    Thanks for advice,
    Dmitry.
    Quote Quote  
  2. Get Slack disturbed1's Avatar
    Join Date
    Apr 2001
    Location
    init 4
    Search Comp PM
    [root@gt57 ~]# ffmpeg -y -ss 0 -t 22 -async 1 -i video.wmv -acodec mp3 video.flv

    Change -acodec mp3 to
    -acodec libmp3lame

    Not sure why -acodec mp3 works for you.

    Unsupported codec (id=0) for input stream #0.0
    Says that your wmv stream has an unsupported audio codec by ffmpeg.

    Does this file playback with mplayer? If so, you can dump the audio stream with mencoder and import it into ffmpeg.
    mplayer -vo null -vc null -ao pcm:fast:file=audio.wav video.wmv

    ffmpeg -y -ss 0 -t 22 -async 1 -i video.wmv -an -i audio.wav -acodec libmp3lame video.flx
    -an may or may not be needed.

    Your ffmpeg version is also quite old. built on Jun 4 2007 11:02:12, gcc: 4.1.1 20070105 Perhaps an update could fix the issue as well.
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  
  3. Member
    Join Date
    Mar 2009
    Location
    Russian Federation
    Search Comp PM
    Yes, this file playback with mplayer.
    Tried to change acodec variable -acodec libmp3lame but failed. Got Unknown codec 'libmp3lame'. "-acodec mp3" works fine with some wmv files.
    Can it be because of variable bitrate?
    Quote Quote  
  4. Get Slack disturbed1's Avatar
    Join Date
    Apr 2001
    Location
    init 4
    Search Comp PM
    Originally Posted by rolikoff
    Yes, this file playback with mplayer
    Tried to change acodec variable -acodec libmp3lame but failed. Got Unknown codec 'libmp3lame'. "-acodec mp3" works fine with some wmv files.
    Can it be because of variable bitrate?
    -acodec defines the encoding codec. Your ffmpeg has --enable-libmp3lame, but if you pass -acodec libmp3lame it fails

    What does mplayer say the audio is?
    Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
    AUDIO: 44100 Hz, 2 ch, s16le, 160.0 kbit/11.34% (ratio: 20005->176400)
    Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
    I tried your command with an wmv I have -
    Code:
    ffmpeg -y -ss 0 -t 22 -async 1 -i video.wmv -acodec mp3 video.flv
    FFmpeg version SVN-r17651, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --prefix=/usr --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-swscale --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-gpl
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 0 / 52.20. 0
      libavformat   52.30. 1 / 52.30. 1
      libavdevice   52. 1. 0 / 52. 1. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Feb 27 2009 17:38:03, gcc: 4.2.4
    
    Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 30.00 (30/1)
    Input #0, asf, from 'video.wmv':
      Duration: 00:10:19.23, start: 1.579000, bitrate: 2067 kb/s
        Stream #0.0: Audio: wmav2, 44100 Hz, stereo, s16, 160 kb/s
        Stream #0.1: Video: wmv3, yuv420p, 640x480, 1900 kb/s, 30 tbr, 1k tbn, 1k tbc
    Unknown encoder 'mp3'
    Then with -acodec libmp3lame
    Code:
    ffmpeg -y -ss 0 -t 22 -async 1 -i video.wmv -acodec libmp3lame video.flv
    FFmpeg version SVN-r17651, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --prefix=/usr --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-swscale --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-gpl
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 0 / 52.20. 0
      libavformat   52.30. 1 / 52.30. 1
      libavdevice   52. 1. 0 / 52. 1. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Feb 27 2009 17:38:03, gcc: 4.2.4
    
    Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 30.00 (30/1)
    Input #0, asf, from 'video.wmv':
      Duration: 00:10:19.23, start: 1.579000, bitrate: 2067 kb/s
        Stream #0.0: Audio: wmav2, 44100 Hz, stereo, s16, 160 kb/s
        Stream #0.1: Video: wmv3, yuv420p, 640x480, 1900 kb/s, 30 tbr, 1k tbn, 1k tbc
    Output #0, flv, to 'video.flv':
        Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc
        Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
    Stream mapping:
      Stream #0.1 -> #0.0
      Stream #0.0 -> #0.1
    Press [q] to stop encoding
    frame=  2255 fps= 253 q=31.0 size=    1487kB time=8.91 bitrate= 808.3kbits/s
    I'd try to update your ffmpeg build. It's getting close to being 2 years old. Something screwy with the -acodec errors as well.
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  



Similar Threads

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