我正在使用tvheadend将广播录制到光盘(运行ubuntu)。后来,我正在播放使用MX Videoplayer或IJK播放器等播放器的文件。有时,媒体文件的时间信息是有效的。例如,使用
ffprobe -i some-file.ts
显示的是10小时甚至20小时的长度,但录制时间仅为2小时。这是一个ffmpeg错误吗?如何才能获得正确的媒体长度?
以下是在光盘上录制后原始文件的ffprobe输出:
ffprobe version N-85175-ga434657 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration:
libavutil 55. 59.100 / 55. 59.100
libavcodec 57. 90.100 / 57. 90.100
libavformat 57. 72.100 / 57. 72.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 83.100 / 6. 83.100
libswscale 4. 7.100 / 4. 7.100
libswresample 2. 8.100 / 2. 8.100
[mp3 @ 0x24caef0] Header missing
[mpeg2video @ 0x24817b0] Invalid frame dimensions 0x0.
[mp3 @ 0x24caef0] Header missing
Last message repeated 1 times
[mpeg2video @ 0x24817b0] Invalid frame dimensions 0x0.
Last message repeated 3 times
[mp3 @ 0x24caef0] Header missing
Last message repeated 1 times
[mpeg2video @ 0x24817b0] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mp3 @ 0x24caef0] Header missing
Last message repeated 1 times
[mpeg2video @ 0x24817b0] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mp3 @ 0x24caef0] Header missing
Last message repeated 1 times
[mpeg2video @ 0x24817b0] Invalid frame dimensions 0x0.
[mp3 @ 0x24caef0] Header missing
Last message repeated 9 times
[mpeg2video @ 0x24817b0] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mp3 @ 0x24caef0] Header missing
Last message repeated 1 times
[mpeg2video @ 0x24817b0] Invalid frame dimensions 0x0.
[mp3 @ 0x24caef0] Header missing
Last message repeated 11 times
[mpeg2video @ 0x24817b0] Invalid frame dimensions 0x0.
[mp3 @ 0x24caef0] Header missing
Last message repeated 318 times
[mpegts @ 0x247cd40] decoding for stream 4 failed
[mpegts @ 0x247cd40] start time for stream 3 is not set in estimate_timings_from_pts
[mpegts @ 0x247cd40] PES packet size mismatch
Last message repeated 2 times
[mpegts @ 0x247cd40] Could not find codec parameters for stream 4 (Audio: mp3, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from '30d0b11f21ce831b56cc306d9c4a18c0.backup':
Duration: 10:03:33.54, start: 60774.296367, bitrate: 1883 kb/s
Program 12101
Metadata:
service_name : ?RTL Television
service_provider: ?Unitymedia
Stream #0:0[0x20b]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x20c](ger): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:2[0x20d](ger): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 384 kb/s
Stream #0:3[0x60f](ger): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
No Program
Stream #0:4[0x210]: Audio: mp3, 0 channels, s16p
这是ffprobe的输出somefile -show_entries stream = index,start_time,duration -of compact -v 0:
program|stream|index=0|start_time=88858.718567|duration=8129.120000
stream|index=1|start_time=88858.104267|duration=8129.496000
stream|index=2|start_time=88858.104289|duration=8129.498833
stream|index=3|start_time=60774.296367|duration=36213.542200
stream|index=0|start_time=88858.718567|duration=8129.120000
stream|index=1|start_time=88858.104267|duration=8129.496000
stream|index=2|start_time=88858.104289|duration=8129.498833
stream|index=3|start_time=60774.296367|duration=36213.542200
stream|index=4|start_time=60774.296367|duration=8129.520000