ffmpeg could not open file.mpg-Collection of common programming errors


  • Michael Mrozek

    When I want to convert a video with the following command:

    ffmpeg -i file.wmv -sameq file.mpg
    

    it ends with this error message:

    FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.1, Copyright (c) 2000-2009 Fabrice Bellard, et al.   configuration:
    --extra-version=4:0.5.1-1ubuntu1.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static   libavutil     49.15. 0 / 49.15. 0   libavcodec    52.20. 1 / 52.20. 1   libavformat   52.31. 0 / 52.31. 0  libavdevice   52. 1. 0 / 52. 1. 0   libavfilter    0. 4. 0 /  0. 4. 0  libswscale     0. 7. 1 /  0. 7. 1   libpostproc   51. 2. 0 / 51. 2. 0  built on Mar 31 2011 18:53:20, gcc: 4.4.3 [wmv3 @ 0x82dbc50]Extra data: 8 bits left, value: 0
    
    Seems stream 1 codec frame rate differs from container frame rate:
    1000.00 (1000/1) -> 30.00 (30/1) Input #0, asf, from 'file.wmv':   Duration: 00:16:53.68, start: 3.065000, bitrate: 3827 kb/s
        Stream #0.0: Audio: 0x0162, 44100 Hz, stereo, s16, 48 kb/s
        Stream #0.1: Video: wmv3, yuv420p, 1920x1080, 3750 kb/s, 30 tbr, 1k tbn, 1k tbc Could not open 'file.mpg'
    

    What is wrong? How can I fix it?


  • Philomath

    The problem lies here

    Audio: 0x0162

    It’s the audio format identifier called TwoCC, looking up there we find

    0x0162 Windows Media Audio Professional V9

    This codec is just not supported by your version of ffmpeg, according to the ffmpeg home page the WMA pro decoder was added in ffmpeg version 0.6, check it out.

    HTH