Transcoding German DVB-T2 HD h.265 on Synology DS216+II results in "Circle buffer overflow."

TVMosaic live and recorded TV products for Desktop/NAS/Raspbery Pi
Post Reply
bequiet88
Posts: 3
Joined: Tue Oct 09, 2018 8:03 pm

Transcoding German DVB-T2 HD h.265 on Synology DS216+II results in "Circle buffer overflow."

Post by bequiet88 » Tue Oct 09, 2018 9:24 pm

Hey there,

quick background on what I'd like to achieve:

German DVB-T2 HD (h.265)
=> TV Butler Stick plugged to Synology DS216+II
=> TV Mosaic Server (build 16509) on Synology DS216+II
=> Hardware Transcoding h.265 to h.264/aac transport stream
=> watch 1080p with DVBLink KODI PVR Plugin on Raspi 3 (transcoding is enabled in client)

So far, so good. My Synology DS216+II is powered by a Celeron N3060 Braswell CPU which is according to this source [1] capable of Hardware decoding h.265 with its Intel HD Graphics 400 chip.

What is working:
  • watch DVB-T2 HD on my Radeon RX 480 powered PC is very smooth (transcoding disabled in client)
  • ffmpeg is started on Synology DS216+II when transcoding is enabled in TV Mosaic client (kodi, android, windows), see attached TV Mosaic log:

    Code: Select all

    2018-Oct-09 21:50:58:   [I] Starting live_transcoder. w 1920, h 1080, b 4096, s -1, a (deu)
    2018-Oct-09 21:50:58:   [I] launch_ffmpeg. Executing /volume1/@appstore/TVMosaic/data/common/ffmpeg/ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -analyzeduration 2500000 -i pipe:0 -f mpegts -acodec aac -c:v h264_vaapi -async 1 -ab 128k -qp 25 -level 31 -bf 4 -vf deinterlace_vaapi=rate=field:auto=1,scale_vaapi=w=trunc(iw*(1080/ih)*sar/32)*32:h=trunc(ih*(1080/ih)/16)*16 -b:v 4096k -map 0:v:? -map 0:a -y pipe:1 
    2018-Oct-09 21:50:58:   [I] ffmpeg_wrapper<T>::create_ffmpeg_process: env var LD_LIBRARY_PATH=/volume1/@appstore/TVMosaic/data/common/ffmpeg
    2018-Oct-09 21:50:58:   [I] ffmpeg_wrapper<T>::create_ffmpeg_process: env var LIBVA_DRIVER_NAME=i965
    2018-Oct-09 21:50:58:   [I] ffmpeg_wrapper<T>::create_ffmpeg_process: env var LIBVA_DRIVERS_PATH=/volume1/@appstore/TVMosaic/data/common/ffmpeg/dri
     

    also tested the same with other bitrate settings
  • ffmpeg from Synology's Video station can be used to do hardware accelerated decoding, e.g. (see 2nd attached log):

    Code: Select all

    ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -analyzeduration 2500000  -i /volume1/video/Eigene/Elecard_about_Tomsk_part2_HEVC_1080p.mp4 -f mpegts -acodec aac -c:v h264_vaapi -async 1 -ab 128k -qp 25 -level 31 -bf 4 -b:v 1024k  output.mp4
    
What is not working:
  • Being able to watch transcoded stream in any client (kodi, android, windows) a sensible manner, see TV Mosaic log:

    Code: Select all

    2018-Oct-09 21:50:59:   [I] CTSStreamWaiter::ProcessStream. Found first not encrypted packet. Start streaming
    2018-Oct-09 21:51:05:   [W] ts_circle_buffer::write_stream. Circle buffer overflow. Context data_provider
    ... goes on until stream is stopped
    2018-Oct-09 21:52:17:   [W] ts_circle_buffer::write_stream. Circle buffer overflow. Context data_provider
    

Anyone any idea what I'm missing here? Are there some wrong settings? Or is my entire idea doomed to fail because something I'm overlooking here?

Thanks for the support.

Cheers Jochen


[1] https://en.wikichip.org/wiki/intel/cele ... 0#Graphics
Attachments
tvmosaic-log-20181009-2230.zip
(64.05 KiB) Not downloaded yet
ffmpeg_video_station.zip
Video Station ffmpeg HEVC Decode Log
(2.04 KiB) Downloaded 1 time

bequiet88
Posts: 3
Joined: Tue Oct 09, 2018 8:03 pm

Re: Transcoding German DVB-T2 HD h.265 on Synology DS216+II results in "Circle buffer overflow."

Post by bequiet88 » Sat Oct 20, 2018 1:37 pm

Nobody any thoughts on this? Thanks for a heads up :)

bequiet88
Posts: 3
Joined: Tue Oct 09, 2018 8:03 pm

Re: Transcoding German DVB-T2 HD h.265 on Synology DS216+II results in "Circle buffer overflow."

Post by bequiet88 » Sat Oct 20, 2018 5:41 pm

in dmesg, i found a gpu related problem

Code: Select all

[41785.551299] [drm] stuck on bsd ring
[41785.571581] [drm] GPU HANG: ecode 8:1:0x8cfffffd, in ffmpeg [27150], reason: Ring hung, action: reset
[41785.581920] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[41785.592246] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[41785.602170] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[41785.612978] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[41785.623010] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[41785.632216] drm/i915: Resetting chip after gpu hang
[41791.551207] [drm] stuck on bsd ring
[41791.571349] [drm] GPU HANG: ecode 8:1:0x8cfffffd, in ffmpeg [27150], reason: Ring hung, action: reset
[41791.583133] [drm:i915_set_reset_status [i915]] *ERROR* gpu hanging too fast, banning!
[41791.593129] drm/i915: Resetting chip after gpu hang
[42015.548075] [drm] stuck on bsd ring
[42015.570788] [drm] GPU HANG: ecode 8:1:0x8cfffffd, in ffmpeg [27948], reason: Ring hung, action: reset
[42015.582999] drm/i915: Resetting chip after gpu hang
[42025.547925] [drm] stuck on bsd ring
[42025.570296] [drm] GPU HANG: ecode 8:1:0x8cfffffd, in ffmpeg [27948], reason: Ring hung, action: reset
[42025.581001] [drm:i915_set_reset_status [i915]] *ERROR* gpu hanging too fast, banning!
[42025.591857] drm/i915: Resetting chip after gpu hang
hw transcoding in tv mosaic starts with

Code: Select all

ffmpeg_wrapper<T>::create_ffmpeg_process: env var LIBVA_DRIVER_NAME=i965
does it mean, tv mosaic loads the wrong driver?

Post Reply