VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi All,

    Can ffmpeg convert an AVI video to a proper WMV video file?

    I found this on the net :

    ffmpeg.exe -i myvideo.avi -b 500k myvideo.wmv

    however windows media player refuses to play the result.

    Loading the resulting file in AVI codec show that its not even a wmv file. the video is msmpeg and the audio pcm!

    If ffmpeg cannot produce proper WMV files, is there something similair that can?

    Thanks

    Vertuas

    PS i need it to work on windows, not linux
    Quote Quote  
  2. Windows Media Encoder from Microsoft can do it and it's free.

    EDIT - The above bit is true. The bit below is entirely incorrect.

    BTW, AVI files do not hold WMV. WMV is its own file format so any tools that look at them designed for AVIs won't give the right information.
    Quote Quote  
  3. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Shouldn't
    Code:
    ffmpeg.exe -i file.avi -vcodec wmv2 -b 500 -acodec wmav2 file.wmv
    with a newer version of ffmpeg work? I have read that it's a problem with older version of ffmpeg and wmv output.

    What version of ffmpeg are you using? where did you download it?
    Quote Quote  
  4. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi Boldrick,

    I tryed the command line that you suggested and I have to say the result is better.

    AVI codec report audio as Windows Media Audio V8. But the video is wmv2, and not Windows Media Video V8.

    The file now plays in WMP, but is very blocky......i guess i need to up the bitrate

    i got the download from http://ffdshow.faireal.net/mirror/ffmpeg/ its the newest version but one!

    heres the output from ffmpeg :

    C:\>ffmpeg.exe -i d\test.avi -vcodec wmv2 -b 500 -acodec wmav2 d:\test.wmv
    FFmpeg version SVN-r10141, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --
    enable-liba52 --enable-avisynth --enable-libamr-nb --enable-libamr-wb --enable-l
    ibfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --en
    able-libogg --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx
    vid --cpu=i686 --enable-memalign-hack --extra-ldflags=-static
    libavutil version: 49.5.0
    libavcodec version: 51.41.0
    libavformat version: 51.12.2
    built on Aug 19 2007 19:58:01, gcc: 4.2.1
    d\test.avi: no such file or directory

    C:\>ffmpeg.exe -i d:\test.avi -vcodec wmv2 -b 500 -acodec wmav2 d:\test.wmv
    FFmpeg version SVN-r10141, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --
    enable-liba52 --enable-avisynth --enable-libamr-nb --enable-libamr-wb --enable-l
    ibfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --en
    able-libogg --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx
    vid --cpu=i686 --enable-memalign-hack --extra-ldflags=-static
    libavutil version: 49.5.0
    libavcodec version: 51.41.0
    libavformat version: 51.12.2
    built on Aug 19 2007 19:58:01, gcc: 4.2.1
    Input #0, avi, from 'd:\test.avi':
    Duration: 00:00:22.5, start: 0.000000, bitrate: 30336 kb/s
    Stream #0.0: Video: dvvideo, yuv420p, 720x576, 28800 kb/s, 25.00 fps(r)
    Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
    Output #0, asf, to 'd:\test.wmv':
    Stream #0.0: Video: wmv2, yuv420p, 720x576, q=2-31, 0 kb/s, 25.00 fps(c)
    Stream #0.1: Audio: wmav2, 48000 Hz, stereo, 64 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1
    Press [q] to stop encoding
    frame= 564 fps= 29 q=31.0 Lsize= 1304kB time=22.5 bitrate= 474.1kbits/s
    video:1085kB audio:176kB global headers:0kB muxing overhead 3.414205%
    Quote Quote  
  5. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    ffmpeg are only using wmv2/wmv8 and it's not that good, if you want better results I would switch to wme as JohnnyMalaria says or wmnicenc as they support wmv3 and also vc-1.
    Quote Quote  
  6. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    JohnnyMalaria wrote:

    BTW, AVI files do not hold WMV. WMV is its own file format
    so any tools that look at them designed for AVIs
    won't give the right information.
    http://en.wikipedia.org/wiki/Wmv#Container_format says:

    Although WMV is generally packed into the ASF container format, it can also be put into the AVI or Matroska container format. The resulting files will be have the .AVI, or .MKV file extensions, respectively. WMV can be stored in an AVI file when using the WMV 9 Video Compression Manager (VCM) codec implementation. Another common way to store WMV in an AVI file is to use the VirtualDub encoder.
    VirtualDub says:

    Quote Quote  
  7. Well, there you go!

    I will amend my original reply.

    Though if you want WMV format in a way that is most widely used, it makes sense to use the free-standing format (IMHO).

    John.
    Quote Quote  
  8. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    AVI codec is capable of readinfo the stream info from WMV/ASF aswell as AVI containers........



    Quote Quote  
  9. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    Hi All,

    THe two solution that I have at the moment.

    1) WMEncode........good quality video, small size but take forever to encode

    2) FFmpeg......if i don;t use -sameq then the video comes out blocky no matter what bit rate i enter. If i do use -sameq the files coming out are huge!
    I would like use ffmpeg because of its speed of encoding, howver i need to know how to improve video quality.

    Any ideas anyone?

    Thanks

    Vertuas
    Quote Quote  
  10. Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Search Comp PM
    I fixed the video blockness now the F'in audio is way out of sync


    C:\>ffmpeg.exe -i e:\test.avi -s 640x480 -r 30 -vcodec wmv2 -b 407000 -acodec wm
    av2 e:\test-ffmpeg-1.wmv
    FFmpeg version SVN-r10141, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --
    enable-liba52 --enable-avisynth --enable-libamr-nb --enable-libamr-wb --enable-l
    ibfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --en
    able-libogg --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx
    vid --cpu=i686 --enable-memalign-hack --extra-ldflags=-static
    libavutil version: 49.5.0
    libavcodec version: 51.41.0
    libavformat version: 51.12.2
    built on Aug 19 2007 19:58:01, gcc: 4.2.1
    Input #0, avi, from 'e:\test.avi':
    Duration: 00:07:05.2, start: 0.000000, bitrate: 27934 kb/s
    Stream #0.0: Video: dvvideo, yuv411p, 720x480, 29.97 fps(r)
    Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
    Output #0, asf, to 'e:\test-ffmpeg-1.wmv':
    Stream #0.0: Video: wmv2, yuv420p, 640x480, q=2-31, 407 kb/s, 30.00 fps(c)
    Stream #0.1: Audio: wmav2, 44100 Hz, stereo, 64 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1
    Press [q] to stop encoding
    frame=11753 fps= 76 q=15.4 Lsize= 23706kB time=391.8 bitrate= 495.7kbits/s

    video:19609kB audio:3317kB global headers:0kB muxing overhead 3.400150%
    Quote Quote  



Similar Threads

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