我使用了很长一段时间的mumudvb和一张dvb-t pci卡来流式传输我网络上的电视频道。这项工作正常,但我最近添加了另一个功能不如其他播放器的播放器,因此我想对视频流进行重新编码。
这是我的输入流视频:
Input #0, mpegts, from 'udp://@239.1.4.1:8200':
Duration: N/A, start: 53843.533922, bitrate: N/A
Program 1025
Metadata:
service_name : M6
service_provider: Multi4
Stream #0:0[0x78]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [ SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x82](fra): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, 5.1(side), fltp, 192 kb/s
Stream #0:2[0x83](qad): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 96 kb/s
Stream #0:3[0x84](qaa): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:4[0x8c](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:5[0x8d](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:6[0xaa]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:7[0xab]: Unknown: none ([11][0][0][0] / 0x000B)
ffmpeg版本3.0.1
在Ubuntu 12.04.5 LTS上运行
这是我运行ffmpeg的命令行:
ffmpeg -i udp://@239.1.4.1:8200 -qscale:v:0 7 -c:v:0 mpeg4 -b:v:0 4000k -minrate:v 0 -maxrate:v 4000k -bufsize:v 5000k -s hd720 -c:a copy -f mpegts udp://239.1.24.1:8200?pkt_size=1316
但是当我这样做时,我的VLC播放器上出现了这样的错误:
[00007f2ff3ad64c0] main audio output debug: inserting 35549 zeroes
[00007f2ff3ad64c0] main audio output warning: playback too early (-55552): down-sampling
[00007f2ff3adc4c0] xcb vout display debug: display is visible
[00007f2ff3ad64c0] main audio output debug: resampling stopped (drift: -13228 us)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 33 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 2 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 4 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 0 ms)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 22 ms)
[00007f2ff3ad64c0] main audio output warning: playback too early (-40559): down-sampling
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 8 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 13 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 3 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 3 ms)
[00007f2ff3ad64c0] main audio output debug: resampling stopped (drift: 1666 us)
[00007f2ff3ad64c0] main audio output warning: playback way too early (-130510): playing silence
[00007f2ff3ad64c0] main audio output debug: inserting 6264 zeroes
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 13 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 15 ms)
[00007f2ff3ad64c0] main audio output warning: playback too early (-41304): down-sampling
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 10 ms)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 54 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 15 ms)
[00007f2ff3ad64c0] main audio output warning: timing screwed (drift: -105734 us): stopping resampling
[00007f2ff3ad64c0] main audio output warning: playback too early (-105702): down-sampling
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 10 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 10 ms)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 60 ms)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 20 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 14 ms)
[00007f300dd870c0] main video output debug: picture might be displayed late (missing 13 ms)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 61 ms)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 25 ms)
[00007f2ff3ad64c0] main audio output debug: resampling stopped (drift: -40141 us)
[00007f2ff3ad64c0] main audio output warning: playback too early (-40140): down-sampling
[00007f2ff3ad64c0] main audio output warning: playback too late (91622): up-sampling
[00007f2ff3ad64c0] main audio output debug: resampling stopped (drift: 120767 us)
[00007f2ff3ad64c0] main audio output warning: playback too late (120781): up-sampling
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 64 ms)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 25 ms)
[00007f300dd870c0] main video output warning: picture is too late to be displayed (missing 31 ms)
在网络插件VLC媒体播放器上-在Ubuntu 16.04.3 LTS上运行的3.0.3 Vetinari
这是由于VLC视频上的许多故障导致的,并且一段时间后音频和视频变得不同步。
由于某些原因,我无法更新VLC / FFMPEG / Ubuntu
您能帮我吗?
提前感谢您的时间!
答案 0 :(得分:0)
您可以尝试使用另一种稳定的,稳定的流媒体,并且可以进行https://github.com/Dash-Industry-Forum/dash-live-source-simulator的UDP流传输。例如,编辑以下变量:
DEFAULT_AVAILABILITY_STARTTIME_IN_S = time.time()
DEFAULT_AVAILABILITY_TIME_OFFSET_IN_S = 300
DEFAULT_TIMESHIFT_BUFFER_DEPTH_IN_SECS = 300
DEFAULT_SHORT_MINIMUM_UPDATE_PERIOD_IN_S = 10
通过调整这些变量,您可以确保音频/视频同步并且图片不会迟到。请注意,这需要一个MPD文件才能工作。