我有来自同一录音设备的几个视频文件(.tsv)。一个文件似乎打破了标题,ffmpeg报告
“尺寸未设置”
和
“无法为输出文件#0写入标头(编解码器不正确 参数)”,
另一个没问题。有没有办法指示ffmpeg(或任何其他可能有用的软件)使用用户选项或其他文件中的标题/视频参数?
ffmpeg输出已损坏的视频:
H:\PVR\TV> ffmpeg.exe -i "TV(152420).TSV" -vcodec copy -acodec copy "d:\TVP(152420).mp4"
ffmpeg version N-82966-g6993bb4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable
-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-li
bbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enabl
e-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-li
bopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable
-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zl
ib
libavutil 55. 43.100 / 55. 43.100
libavcodec 57. 70.100 / 57. 70.100
libavformat 57. 61.100 / 57. 61.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 68.100 / 6. 68.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
[h264 @ 000000000058f040] non-existing SPS 0 referenced in buffering period
[h264 @ 000000000058f040] SPS unavailable in decode_picture_timing
[h264 @ 000000000058f040] non-existing PPS 0 referenced
[h264 @ 000000000058f040] non-existing SPS 0 referenced in buffering period
[h264 @ 000000000058f040] SPS unavailable in decode_picture_timing
[h264 @ 000000000058f040] non-existing PPS 0 referenced
[h264 @ 000000000058f040] decode_slice_header error
[h264 @ 000000000058f040] no frame!
/repeated a few times/
[h264 @ 000000000058f040] non-existing SPS 0 referenced in buffering period
[h264 @ 000000000058f040] SPS unavailable in decode_picture_timing
[h264 @ 000000000058f040] non-existing PPS 0 referenced
[h264 @ 000000000058f040] non-existing SPS 0 referenced in buffering period
[h264 @ 000000000058f040] SPS unavailable in decode_picture_timing
[h264 @ 000000000058f040] non-existing PPS 0 referenced
[h264 @ 000000000058f040] decode_slice_header error
[h264 @ 000000000058f040] no frame!
[mpegts @ 000000000058a9a0] DTS discontinuity in stream 5: packet 14 with DTS 8279617306, packet 15 with DTS 8590342112
[mpegts @ 000000000058a9a0] decoding for stream 0 failed
[mpegts @ 000000000058a9a0] start time for stream 4 is not set in estimate_timings_from_pts
[mpegts @ 000000000058a9a0] start time for stream 7 is not set in estimate_timings_from_pts
[mpegts @ 000000000058a9a0] PES packet size mismatch
Last message repeated 3 times
[mpegts @ 000000000058a9a0] Could not find codec parameters for stream 0 (Video: h264 ([27][0][0][0] / 0x001B), none): u
nspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000000000058a9a0] Could not find codec parameters for stream 6 (Unknown: none ([5][0][0][0] / 0x0005)): unknow
n codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'TVP(152420).TSV':
Duration: 02:40:37.93, start: 91995.111844, bitrate: 3550 kb/s
Program 1
Stream #0:0[0x66]: Video: h264 ([27][0][0][0] / 0x001B), none, 50 fps, 50 tbr, 90k tbn, 180k tbc
Stream #0:1[0x67](pol): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 160 kb/s
Stream #0:2[0x69](pol): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:3[0x68](qaa): Audio: eac3 (EAC3 / 0x33434145), 48000 Hz, 5.1(side), fltp, 256 kb/s
Stream #0:4[0x6a](pol): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:5[0x6c](aux): Audio: eac3 (EAC3 / 0x33434145), 48000 Hz, stereo, fltp, 96 kb/s (visual impaired)
Stream #0:6[0x6b]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:7[0x6d](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Program 2
Program 21
Program 31
Program 32
Program 33
Program 34
Program 35
[mp4 @ 00000000032cd500] dimensions not set
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:3 -> #0:1 (copy)
Last message repeated 1 times
同时,来自同一传输的另一个文件经过类似的“无帧”消息,以完成成功的流识别。
[h264 @ 00000000004cf040] non-existing SPS 0 referenced in buffering period
[h264 @ 00000000004cf040] SPS unavailable in decode_picture_timing
[h264 @ 00000000004cf040] non-existing PPS 0 referenced
[h264 @ 00000000004cf040] non-existing SPS 0 referenced in buffering period
[h264 @ 00000000004cf040] SPS unavailable in decode_picture_timing
[h264 @ 00000000004cf040] non-existing PPS 0 referenced
[h264 @ 00000000004cf040] decode_slice_header error
[h264 @ 00000000004cf040] no frame!
[mpegts @ 00000000004ca9a0] start time for stream 4 is not set in estimate_timings_from_pts
[mpegts @ 00000000004ca9a0] start time for stream 7 is not set in estimate_timings_from_pts
[mpegts @ 00000000004ca9a0] PES packet size mismatch
Last message repeated 3 times
[mpegts @ 00000000004ca9a0] Could not find codec parameters for stream 6 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'TV(152420)_001.TSV':
Duration: 01:02:17.92, start: 6188.060000, bitrate: 5877 kb/s
Program 1
Metadata:
service_name : TV1
service_provider: xxx
Stream #0:0[0x66]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x67](pol): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 160 kb/s
Stream #0:2[0x69](pol): Subtitle: dvb_teletext ([6][0][0][0] / x0006)
Stream #0:3[0x68](qaa): Audio: eac3 (EAC3 / 0x33434145), 48000 Hz, 5.1(side), fltp, 256 kb/s
Stream #0:4[0x6a](pol): Subtitle: dvb_subtitle ([6][0][0][0] / x0006)
Stream #0:5[0x6c](aux): Audio: eac3 (EAC3 / 0x33434145), 48000 Hz, stereo, fltp, 96 kb/s (visual impaired)
Stream #0:6[0x6b]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:7[0x6d](eng): Subtitle: dvb_subtitle ([6][0][0][0] / x0006)
Program 2
Metadata:
service_name : TV2
service_provider: xxx
Program 3
Metadata:
service_name : TV3
service_provider: xxx