我想转换奥格视频mp4或者影片,但出现不同的错误。
我捕获了两个流(来自同一源)。它们位于 ogg 容器中。
如果我尝试将它们转换为 mkv出现ffmpeg -i stream.ogg -c copy -map 0 stream.mkv
此错误消息:
ffmpeg version 0.10.7 Copyright (c) 2000-2013 the FFmpeg developers
built on May 14 2013 21:35:02 with gcc 4.7.2 20120921 (Red Hat 4.7.2-2)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib --mandir=/usr/share/man --arch=i686 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib --cpu=i686 --enable-runtime-cpudetect
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[ogg @ 0x8685b00] Estimating duration from bitrate, this may be inaccurate
Input #0, ogg, from 'stream.ogg':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: theora, yuv420p, 640x480 [SAR 1:1 DAR 4:3], 8 fps, 8 tbr, 8 tbn, 8 tbc
Stream #0:1: Audio: flac, 48000 Hz, 1 channels, s16
Metadata:
ENCODER : Lavf53.32.100
Output #0, matroska, to '/dev/shm/stream.mkv':
Metadata:
encoder : Lavf53.32.100
Stream #0:0: Video: theora (theo / 0x6F656874), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 8 fps, 1k tbn, 8 tbc
Stream #0:1: Audio: flac ([172][241][0][0] / 0xF1AC), 48000 Hz, 1 channels
Metadata:
ENCODER : Lavf53.32.100
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x8835880] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 1440 >= 1440
av_interleaved_write_frame(): Invalid argument
如果我尝试将其转换为 mp4出现ffmpeg -i stream.ogg -c copy -map 0 stream.mp4
此错误消息:
track 0: could not find tag, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?)
这些文件可以使用 mplayer 和 ffplay 播放。它们包含一个视频流和一个音频流:
$ ffmpeg -i stream.ogg
[ogg @ 0x85a9b00] Estimating duration from bitrate, this may be inaccurate
Input #0, ogg, from 'stream.ogg':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: theora, yuv420p, 640x480 [SAR 1:1 DAR 4:3], 8 fps, 8 tbr, 8 tbn, 8 tbc
Stream #0:1: Audio: flac, 48000 Hz, 1 channels, s16
Metadata:
ENCODER : Lavf53.32.100
当我使用 VLC 播放文件时,我收到两个警告和两个错误(红色),但文件可以播放:
TagLib: Vorbis::File::read() - Could not find the Vorbis comment header.
TagLib: Vorbis::File::read() - Could not find the Vorbis comment header.
[0xb71029c0] ogg demux error: Got invalid packet, read 62187 of 63676: OggS
[0xb6d00618] main input error: Invalid PCR value in ES_OUT_SET_(GROUP_)PCR !
这些文件有什么问题?有没有办法转换这些文件,例如告诉 ffmpeg 忽略错误?如果这样能解决问题,那么跳过视频的第一秒或最后一秒就没有问题了。