learn_ffmpeg 发表于 2017-5-10 10:40:21

ffmpeg 转码一段时间后出现音视频不同步的现象


ffmpeg 运行命令:
./ffmpeg -async 1 -i udp://230.0.0.108:20000?overrun_nonfatal=1 -c:a aac -b:a 128k -c:v hevc_nvenc -b:v 6M -gpu 0 -deinterlace -g 25 -tier high -preset llhq -rc ll_2pass_quality -f mpegts -async 1 -y udp://230.0.0.109:5300?pkt_size=1316&overrun_nonfatal=1&ttl==64&localaddr=192.168.172.114


输出:
ffmpeg version 3.2.git Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
configuration: --enable-gpl --enable-nonfree --yasmexe= --prefix=/root/NVENC/coder/build_ffmpeg/auto/nvidia_release_static --cc= --enable-static --disable-shared --enable-debug --extra-cflags='-I${ffmpeg_exported_release_dir}/include -I/usr/local/cuda-7.5/targets/x86_64-linux/include' --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -L/usr/local/cuda-7.5/targets/x86_64-linux/lib -L/usr/lib64/nvidia -lm -ldl -lstdc++ ' --disable-ffplay --enable-ffprobe --enable-ffserver --enable-doc --enable-postproc --enable-bzlib --enable-zlib --enable-parsers --enable-libx264 --enable-libx265 --enable-libmp3lame --enable-libfdk-aac --enable-libspeex --enable-pthreads --extra-libs=-lpthread --enable-decoders --enable-encoders --enable-avfilter --enable-muxers --enable-demuxers --enable-nvenc --enable-cuvid --enable-vdpau --enable-cuda --enable-decoders
libavutil      55. 35.100 / 55. 35.100
libavcodec   57. 66.100 / 57. 66.100
libavformat    57. 57.100 / 57. 57.100
libavdevice    57.2.100 / 57.2.100
libavfilter   6. 66.100 /6. 66.100
libswscale      4.3.100 /4.3.100
libswresample   2.4.100 /2.4.100
libpostproc    54.2.100 / 54.2.100
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
decode_slice_header error
no frame!
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
decode_slice_header error
no frame!
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
decode_slice_header error
no frame!
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
decode_slice_header error
no frame!
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
decode_slice_header error
no frame!
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
SPS unavailable in decode_picture_timing
non-existing PPS 0 referenced
decode_slice_header error
no frame!
Input #0, mpegts, from 'udp://230.0.0.108:20000?overrun_nonfatal=1':
Duration: N/A, start: 78527.203322, bitrate: N/A
Program 19
    Stream #0:0: Video: h264 (High) ( / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 , 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: ac3 ( / 0x0006), 48000 Hz, 5.1(side), fltp, 448 kb/s
-async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
Output #0, mpegts, to 'udp://230.0.0.109:5300?pkt_size=1316&overrun_nonfatal=1&ttl==64&localaddr=192.168.172.114':
Metadata:
    encoder         : Lavf57.57.100
    Stream #0:0: Video: hevc (hevc_nvenc) (Main), yuv420p, 1920x1080 , q=-1--1, 6000 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.66.100 hevc_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/6000000 buffer size: 12000000 vbv_delay: -1
    Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1(side), fltp, 128 kb/s
    Metadata:
      encoder         : Lavc57.66.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Press to stop, [?] for help
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
Circular buffer overrun. Surviving due to overrun_nonfatal optionitrate=   0.0kbits/s speed=2.07x   
    Last message repeated 340 times
Circular buffer overrun. Surviving due to overrun_nonfatal optionitrate=   0.0kbits/s speed=1.68x   
    Last message repeated 474 times
Circular buffer overrun. Surviving due to overrun_nonfatal optionbitrate=3103.5kbits/s speed=1.92x   
    Last message repeated 460 times
Circular buffer overrun. Surviving due to overrun_nonfatal optionbitrate=3914.0kbits/s speed=2.03x   
    Last message repeated 452 times
exponent -2 is out-of-range28.0 size=    5930kB time=00:00:08.98 bitrate=5408.6kbits/s speed=1.96x   
error decoding the audio block
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
Reference 2 >= 2
error while decoding MB 24 29, bytestream 1085
PES packet size mismatchq=29.0 size=42672461kB time=14:38:28.77 bitrate=6632.2kbits/s speed=   1x   
invalid coupling range (5 >= 4)
error decoding the audio block
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
exponent -2 is out-of-rangeq=24.0 size=72487640kB time=24:52:05.22 bitrate=6633.0kbits/s speed=   1x   
error decoding the audio block
Invalid timestamps stream=0, pts=7062053200, dts=15651976992, size=909066633.6kbits/s speed=   1x   
DTS 7062049600 < 15651982392 out of order
cabac decode of qscale diff failed at 64 506769kB time=41:01:54.58 bitrate=6633.7kbits/s speed=   1x   
error while decoding MB 64 50, bytestream 2691
frame sync error95 fps= 25 q=18.0 size=125694485kB time=43:06:50.26 bitrate=6634.2kbits/s speed=   1x   
Error while decoding stream #0:1: Invalid data found when processing input
left block unavailable for requested intra modekB time=44:29:07.17 bitrate=6634.1kbits/s speed=   1x   
error while decoding MB 0 10, bytestream 3432
exponent 25 is out-of-range
error decoding the audio block
Missing reference picture, default is 65536
    Last message repeated 1 times
Found reference and non-reference fields in the same frame, which is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
decode_slice_header error
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
Missing reference picture, default is 65536
PES packet size mismatchq=31.0 size=129716642kB time=44:29:39.43 bitrate=6634.1kbits/s speed=   1x   
exponent -1 is out-of-range
error decoding the audio block
error while decoding MB 108 28, bytestream -7
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
Found reference and non-reference fields in the same frame, which is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
decode_slice_header error
Missing reference picture, default is 65536
mmco: unref short failure q=31.0 size=129716955kB time=44:29:39.81 bitrate=6634.1kbits/s speed=   1x   
error while decoding MB 60 65, bytestream -9979kB time=44:30:55.72 bitrate=6634.0kbits/s speed=   1x   
cabac decode of qscale diff failed at 19 510182kB time=44:30:58.21 bitrate=6634.0kbits/s speed=   1x   
error while decoding MB 19 51, bytestream 75
exponent -1 is out-of-rangeq=25.0 size=145958357kB time=50:03:49.99 bitrate=6634.3kbits/s speed=   1x   
error decoding the audio block
left block unavailable for requested intra modekB time=50:04:19.17 bitrate=6634.3kbits/s speed=   1x   
error while decoding MB 0 54, bytestream 12065
exponent -2 is out-of-rangeq=26.0 size=149452404kB time=51:15:38.34 bitrate=6634.5kbits/s speed=   1x   
error decoding the audio block
Reference 2 >= 2
error while decoding MB 39 15, bytestream 24592
Invalid timestamps stream=0, pts=7062049808, dts=15651973600, size=51880=6633.4kbits/s speed=   1x   
PES packet size mismatchq=25.0 size=168120256kB time=57:41:29.23 bitrate=6631.3kbits/s speed=   1x   
exponent -2 is out-of-range
error decoding the audio block
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
Reference 4 >= 24 fps= 25 q=27.0 size=180035426kB time=61:46:39.76 bitrate=6631.5kbits/s speed=   1x   
error while decoding MB 117 17, bytestream 17150
Reference 3 >= 27 fps= 25 q=18.0 size=198316783kB time=68:02:43.47 bitrate=6632.1kbits/s speed=   1x   
error while decoding MB 87 39, bytestream 1631
exponent -1 is out-of-rangeq=21.0 size=219264043kB time=75:13:56.94 bitrate=6632.1kbits/s speed=   1x   
error decoding the audio block
PES packet size mismatchq=27.0 size=219436503kB time=75:17:29.51 bitrate=6632.1kbits/s speed=   1x   
cabac decode of qscale diff failed at 42 63
error while decoding MB 42 63, bytestream 5101
exponent -1 is out-of-range
error decoding the audio block
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
Reference 2 >= 26 fps= 25 q=30.0 size=231448363kB time=79:25:01.71 bitrate=6631.7kbits/s speed=   1x   
error while decoding MB 42 59, bytestream 1721
Invalid timestamps stream=0, pts=7062057216, dts=15651981008, size=42534=6631.7kbits/s speed=   1x   
DTS 7062050016 < 15651982808 out of order
Reference 2 >= 26 fps= 25 q=28.0 size=262738532kB time=90:09:37.74 bitrate=6631.2kbits/s speed=   1x   
error while decoding MB 20 6, bytestream 7403
frame sync error54 fps= 25 q=29.0 size=275790491kB time=94:38:21.71 bitrate=6631.2kbits/s speed=   1x   
Error while decoding stream #0:1: Invalid data found when processing input
PES packet size mismatchq=22.0 size=298955011kB time=102:34:59.79 bitrate=6631.6kbits/s speed=   1x   
exponent -1 is out-of-range
error decoding the audio block
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
Invalid timestamps stream=0, pts=7062053824, dts=15651977616, size=57765e=6631.3kbits/s speed=   1x   
DTS 7062050224 < 15651983016 out of order
DTS 7631822224 < 7631861824 out of order19694kB time=107:47:25.50 bitrate=6631.4kbits/s speed=   1x   
exponent 25 is out-of-range
error decoding the audio block
Increasing reorder buffer to 11
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
PES packet size mismatchq=24.0 size=314149866kB time=107:48:03.73 bitrate=6631.3kbits/s speed=   1x   
exponent 26 is out-of-range
error decoding the audio block
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
illegal short term buffer state detected
PES packet size mismatchq=23.0 size=315644859kB time=108:19:00.88 bitrate=6631.2kbits/s speed=   1x   
exponent 25 is out-of-range
error decoding the audio block
frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
# aframe=10536116 fps= 25 q=29.0 size=341179816kB time=117:04:08.52 bitrate=6631.8kbits/s speed=   1x   
#




页: [1]
查看完整版本: ffmpeg 转码一段时间后出现音视频不同步的现象