Video

ffmpeg 無法打開 file.mpg

  • July 17, 2011

當我想使用以下命令轉換影片時:

ffmpeg -i file.wmv -sameq file.mpg

它以以下錯誤消息結束:

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'

怎麼了?我該如何解決?

問題出在這裡

Audio: 0x0162

它是名為TwoCC的音頻格式標識符,向上查找我們發現

0x0162 Windows Media Audio Professional V9

您的 ffmpeg 版本不支持此編解碼器,根據ffmpeg 首頁,在 ffmpeg 版本 0.6 中添加了 WMA pro 解碼器,請查看。

高溫高壓

引用自:https://unix.stackexchange.com/questions/16735