ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 7984|回复: 0

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

[复制链接]
发表于 2017-5-10 10:40:21 | 显示全部楼层 |阅读模式

ffmpeg 运行命令:
[C++] 纯文本查看 复制代码
./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



输出:
[C++] 纯文本查看 复制代码
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
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] decode_slice_header error
[h264 @ 0x41ca6c0] no frame!
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] decode_slice_header error
[h264 @ 0x41ca6c0] no frame!
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] decode_slice_header error
[h264 @ 0x41ca6c0] no frame!
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] decode_slice_header error
[h264 @ 0x41ca6c0] no frame!
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] decode_slice_header error
[h264 @ 0x41ca6c0] no frame!
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x41ca6c0] non-existing PPS 0 referenced
[h264 @ 0x41ca6c0] decode_slice_header error
[h264 @ 0x41ca6c0] 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[0x468]: 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[0x469]: Audio: ac3 ([6][0][0][0] / 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 [SAR 1:1 DAR 16:9], 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 [q] to stop, [?] for help
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[udp @ 0x41a5fc0] Circular buffer overrun. Surviving due to overrun_nonfatal optionitrate=   0.0kbits/s speed=2.07x    
    Last message repeated 340 times
[udp @ 0x41a5fc0] Circular buffer overrun. Surviving due to overrun_nonfatal optionitrate=   0.0kbits/s speed=1.68x    
    Last message repeated 474 times
[udp @ 0x41a5fc0] Circular buffer overrun. Surviving due to overrun_nonfatal optionbitrate=3103.5kbits/s speed=1.92x    
    Last message repeated 460 times
[udp @ 0x41a5fc0] Circular buffer overrun. Surviving due to overrun_nonfatal optionbitrate=3914.0kbits/s speed=2.03x    
    Last message repeated 452 times
[ac3 @ 0x47d10a0] exponent -2 is out-of-range28.0 size=    5930kB time=00:00:08.98 bitrate=5408.6kbits/s speed=1.96x    
[ac3 @ 0x47d10a0] error decoding the audio block
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x49c60a0] Reference 2 >= 2
[h264 @ 0x49c60a0] error while decoding MB 24 29, bytestream 1085
[mpegts @ 0x41a5700] PES packet size mismatchq=29.0 size=42672461kB time=14:38:28.77 bitrate=6632.2kbits/s speed=   1x    
[ac3 @ 0x47d10a0] invalid coupling range (5 >= 4)
[ac3 @ 0x47d10a0] error decoding the audio block
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[ac3 @ 0x47d10a0] exponent -2 is out-of-rangeq=24.0 size=72487640kB time=24:52:05.22 bitrate=6633.0kbits/s speed=   1x    
[ac3 @ 0x47d10a0] error decoding the audio block
[mpegts @ 0x41a5700] Invalid timestamps stream=0, pts=7062053200, dts=15651976992, size=909066633.6kbits/s speed=   1x    
[mpegts @ 0x41a5700] DTS 7062049600 < 15651982392 out of order
[h264 @ 0x4973540] cabac decode of qscale diff failed at 64 506769kB time=41:01:54.58 bitrate=6633.7kbits/s speed=   1x    
[h264 @ 0x4973540] error while decoding MB 64 50, bytestream 2691
[ac3 @ 0x47d10a0] 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
[h264 @ 0x4905720] left block unavailable for requested intra modekB time=44:29:07.17 bitrate=6634.1kbits/s speed=   1x    
[h264 @ 0x4905720] error while decoding MB 0 10, bytestream 3432
[ac3 @ 0x47d10a0] exponent 25 is out-of-range
[ac3 @ 0x47d10a0] error decoding the audio block
[h264 @ 0x4920ce0] Missing reference picture, default is 65536
    Last message repeated 1 times
[h264 @ 0x493c500] 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.
[h264 @ 0x493c500] If you want to help, upload a sample of this file to [url]ftp://upload.ffmpeg.org/incoming/[/url] and contact the ffmpeg-devel mailing list. ([email]ffmpeg-devel@ffmpeg.org[/email])
[h264 @ 0x493c500] decode_slice_header error
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x4957d20] Missing reference picture, default is 65536
[mpegts @ 0x41a5700] PES packet size mismatchq=31.0 size=129716642kB time=44:29:39.43 bitrate=6634.1kbits/s speed=   1x    
[ac3 @ 0x47d10a0] exponent -1 is out-of-range
[ac3 @ 0x47d10a0] error decoding the audio block
[h264 @ 0x4973540] error while decoding MB 108 28, bytestream -7
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x49aa700] 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.
[h264 @ 0x49aa700] If you want to help, upload a sample of this file to [url]ftp://upload.ffmpeg.org/incoming/[/url] and contact the ffmpeg-devel mailing list. ([email]ffmpeg-devel@ffmpeg.org[/email])
[h264 @ 0x49aa700] decode_slice_header error
[h264 @ 0x49c60a0] Missing reference picture, default is 65536
[h264 @ 0x4223ee0] mmco: unref short failure q=31.0 size=129716955kB time=44:29:39.81 bitrate=6634.1kbits/s speed=   1x    
[h264 @ 0x4957d20] error while decoding MB 60 65, bytestream -9979kB time=44:30:55.72 bitrate=6634.0kbits/s speed=   1x    
[h264 @ 0x4381720] cabac decode of qscale diff failed at 19 510182kB time=44:30:58.21 bitrate=6634.0kbits/s speed=   1x    
[h264 @ 0x4381720] error while decoding MB 19 51, bytestream 75
[ac3 @ 0x47d10a0] exponent -1 is out-of-rangeq=25.0 size=145958357kB time=50:03:49.99 bitrate=6634.3kbits/s speed=   1x    
[ac3 @ 0x47d10a0] error decoding the audio block
[h264 @ 0x4412580] left block unavailable for requested intra modekB time=50:04:19.17 bitrate=6634.3kbits/s speed=   1x    
[h264 @ 0x4412580] error while decoding MB 0 54, bytestream 12065
[ac3 @ 0x47d10a0] exponent -2 is out-of-rangeq=26.0 size=149452404kB time=51:15:38.34 bitrate=6634.5kbits/s speed=   1x    
[ac3 @ 0x47d10a0] error decoding the audio block
[h264 @ 0x4920ce0] Reference 2 >= 2
[h264 @ 0x4920ce0] error while decoding MB 39 15, bytestream 24592
[mpegts @ 0x41a5700] Invalid timestamps stream=0, pts=7062049808, dts=15651973600, size=51880=6633.4kbits/s speed=   1x    
[mpegts @ 0x41a5700] PES packet size mismatchq=25.0 size=168120256kB time=57:41:29.23 bitrate=6631.3kbits/s speed=   1x    
[ac3 @ 0x47d10a0] exponent -2 is out-of-range
[ac3 @ 0x47d10a0] error decoding the audio block
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x4381720] Reference 4 >= 24 fps= 25 q=27.0 size=180035426kB time=61:46:39.76 bitrate=6631.5kbits/s speed=   1x    
[h264 @ 0x4381720] error while decoding MB 117 17, bytestream 17150
[h264 @ 0x4957d20] Reference 3 >= 27 fps= 25 q=18.0 size=198316783kB time=68:02:43.47 bitrate=6632.1kbits/s speed=   1x    
[h264 @ 0x4957d20] error while decoding MB 87 39, bytestream 1631
[ac3 @ 0x47d10a0] exponent -1 is out-of-rangeq=21.0 size=219264043kB time=75:13:56.94 bitrate=6632.1kbits/s speed=   1x    
[ac3 @ 0x47d10a0] error decoding the audio block
[mpegts @ 0x41a5700] PES packet size mismatchq=27.0 size=219436503kB time=75:17:29.51 bitrate=6632.1kbits/s speed=   1x    
[h264 @ 0x4957d20] cabac decode of qscale diff failed at 42 63
[h264 @ 0x4957d20] error while decoding MB 42 63, bytestream 5101
[ac3 @ 0x47d10a0] exponent -1 is out-of-range
[ac3 @ 0x47d10a0] error decoding the audio block
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x4223ee0] Reference 2 >= 26 fps= 25 q=30.0 size=231448363kB time=79:25:01.71 bitrate=6631.7kbits/s speed=   1x    
[h264 @ 0x4223ee0] error while decoding MB 42 59, bytestream 1721
[mpegts @ 0x41a5700] Invalid timestamps stream=0, pts=7062057216, dts=15651981008, size=42534=6631.7kbits/s speed=   1x    
[mpegts @ 0x41a5700] DTS 7062050016 < 15651982808 out of order
[h264 @ 0x425d1a0] Reference 2 >= 26 fps= 25 q=28.0 size=262738532kB time=90:09:37.74 bitrate=6631.2kbits/s speed=   1x    
[h264 @ 0x425d1a0] error while decoding MB 20 6, bytestream 7403
[ac3 @ 0x47d10a0] 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
[mpegts @ 0x41a5700] PES packet size mismatchq=22.0 size=298955011kB time=102:34:59.79 bitrate=6631.6kbits/s speed=   1x    
[ac3 @ 0x47d10a0] exponent -1 is out-of-range
[ac3 @ 0x47d10a0] error decoding the audio block
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[mpegts @ 0x41a5700] Invalid timestamps stream=0, pts=7062053824, dts=15651977616, size=57765e=6631.3kbits/s speed=   1x    
[mpegts @ 0x41a5700] DTS 7062050224 < 15651983016 out of order
[mpegts @ 0x41a5700] DTS 7631822224 < 7631861824 out of order19694kB time=107:47:25.50 bitrate=6631.4kbits/s speed=   1x    
[ac3 @ 0x47d10a0] exponent 25 is out-of-range
[ac3 @ 0x47d10a0] error decoding the audio block
[h264 @ 0x424cf80] Increasing reorder buffer to 11
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[mpegts @ 0x41a5700] PES packet size mismatchq=24.0 size=314149866kB time=107:48:03.73 bitrate=6631.3kbits/s speed=   1x    
[ac3 @ 0x47d10a0] exponent 26 is out-of-range
[ac3 @ 0x47d10a0] error decoding the audio block
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x424cf80] illegal short term buffer state detected
[mpegts @ 0x41a5700] PES packet size mismatchq=23.0 size=315644859kB time=108:19:00.88 bitrate=6631.2kbits/s speed=   1x    
[ac3 @ 0x47d10a0] exponent 25 is out-of-range
[ac3 @ 0x47d10a0] error decoding the audio block
[ac3 @ 0x47d10a0] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[root@localhost log]# aframe=10536116 fps= 25 q=29.0 size=341179816kB time=117:04:08.52 bitrate=6631.8kbits/s speed=   1x    
[root@localhost log]# 




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-4-25 11:50 , Processed in 0.050716 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表