Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


RTMP output artefacting (x264)

Discussions about problems encountered using ffmpeg.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

RTMP output artefacting (x264)

Postby Cypher » Fri Mar 31, 2017 4:46 pm

I am having an issue, tried it on multiple pc's now and with different settings.
What I am doing is streaming a higher bitrate from OBS to a NGINX server that than pushes the higher quality version to YouTube and transcodes the input to a lower bitrate to stream to Twitch.

What's happening is that the output video is hanging, mainly when there's a lot changing on the screen, it then produces artefacts, blockie image,before continuing again. The audio keeps playing fine and the input is also perfect.
The same thing also happens when having a file as output, which makes me feel that it's not because it is unable to keep up. Is there something I'm missing here or that I can try to improve the quality


Commandline:
Code: Select all
ffmpeg -re -i rtmp://127.0.0.1/*******/******* -threads 3 -codec:v libx264 -preset medium -crf 15 -x264-params aq-mode=2:keyint=60:min_keyint=60 -maxrate 6000k -minrate 5000k -bufsize 6000k -sc_threshold 0 -c:a copy -r 30 -s hd720 -f flv rtmp://127.0.0.1/*******_stream/*******


Output:
Code: Select all
ffmpeg version N-84940-g1ddc370 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --enable-gpl --enable-libx264
  libavutil      55. 56.100 / 55. 56.100
  libavcodec     57. 88.100 / 57. 88.100
  libavformat    57. 70.100 / 57. 70.100
  libavdevice    57.  5.100 / 57.  5.100
  libavfilter     6. 81.100 /  6. 81.100
  libswscale      4.  5.100 /  4.  5.100
  libswresample   2.  6.100 /  2.  6.100
  libpostproc    54.  4.100 / 54.  4.100
Input #0, flv, from 'rtmp://127.0.0.1/*******/*******':
  Metadata:
    Server          : NGINX RTMP ([link]/arut/nginx-rtmp-module)
    displayWidth    : 1920
    displayHeight   : 1080
    fps             : 60
    profile         :
    level           :
  Duration: 00:00:00.00, start: 214.738000, bitrate: N/A
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 327 kb/s
    Stream #0:1: Video: h264 (High), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 20480 kb/s, 60 fps, 60 tbr, 1k tbn, 120 tbc
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x26112a0] using SAR=1/1   0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A
[libx264 @ 0x26112a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x26112a0] profile High, level 3.1
[libx264 @ 0x26112a0] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - [link] - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60 keyint_min=31 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=15.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=6000 vbv_bufsize=6000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=2:1.00
Output #0, flv, to 'rtmp://127.0.0.1/*******_stream/*******':
  Metadata:
    Server          : NGINX RTMP ([url]/arut/nginx-rtmp-module)
    displayWidth    : 1920
    displayHeight   : 1080
    fps             : 60
    profile         :
    level           :
    encoder         : Lavf57.70.100
    Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 1k tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.88.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 6000000/0/0 buffer size: 6000000 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 327 kb/s
[h264 @ 0x2712980] co located POCs unavailablee=00:00:43.37 bitrate=1399.4kbits/s dup=0 drop=521 speed=   1x
[h264 @ 0x25c1ee0] co located POCs unavailable
[h264 @ 0x2608980] co located POCs unavailablee=00:00:43.81 bitrate=1407.3kbits/s dup=0 drop=524 speed=0.997x
[h264 @ 0x25c1ee0] co located POCs unavailablee=00:01:04.22 bitrate=1880.5kbits/s dup=0 drop=720 speed=   1x
[h264 @ 0x25c1ee0] co located POCs unavailablee=00:01:29.88 bitrate=1881.2kbits/s dup=0 drop=983 speed=0.999x
[h264 @ 0x2712980] co located POCs unavailablee=00:02:27.86 bitrate=2183.5kbits/s dup=0 drop=1691 speed=0.999x
[h264 @ 0x25c1ee0] co located POCs unavailable
[h264 @ 0x2608980] co located POCs unavailable
[h264 @ 0x2712980] co located POCs unavailablee=00:03:09.49 bitrate=2144.9kbits/s dup=0 drop=2358 speed=0.999x
[h264 @ 0x2608980] co located POCs unavailablee=00:03:17.85 bitrate=2171.7kbits/s dup=0 drop=2434 speed=   1x
[h264 @ 0x25c1ee0] co located POCs unavailable
[h264 @ 0x272a4c0] co located POCs unavailablee=00:03:26.05 bitrate=2199.8kbits/s dup=0 drop=2511 speed=   1x
[h264 @ 0x2712980] co located POCs unavailable
[h264 @ 0x2712980] co located POCs unavailablee=00:04:28.79 bitrate=2247.9kbits/s dup=0 drop=3333 speed=   1x
[h264 @ 0x272a4c0] co located POCs unavailablee=00:04:53.57 bitrate=2311.5kbits/s dup=0 drop=3652 speed=   1x
[h264 @ 0x2712980] co located POCs unavailablee=00:04:57.84 bitrate=2351.8kbits/s dup=0 drop=3724 speed=   1x
[h264 @ 0x25c1ee0] co located POCs unavailable
[h264 @ 0x2712980] co located POCs unavailable
frame= 3904 fps= 13 q=21.0 size=   86393kB time=00:05:01.46 bitrate=2347.7kbits/s dup=0 drop=3787 speed=   1x


PS. Had to replace a few lines with links with [link] because I was not allowed to post links, these were basically just github links though in the output.


Edit: I also ocasionally get the following error:
Too many packets buffered for output stream 0:1.

Code: Select all
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
Too many packets buffered for output stream 0:1.
Cypher
 
Posts: 1
Joined: Fri Mar 31, 2017 4:08 pm

Return to ffmpeg

Who is online

Users browsing this forum: No registered users and 5 guests