Jellyfin Forum
SOLVED: Tvheadend ffmpeg error - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Tvheadend ffmpeg error (/t-solved-tvheadend-ffmpeg-error)



Tvheadend ffmpeg error - Richárd Nemes - 2025-01-25

Hi, please help tvheadend ffmpeg error:
Log files:
libav: AVCodecContext: the corresponding frame type is not compatible with maximum B-frames



RE: Tvheadend ffmpeg error - Richárd Nemes - 2025-01-25

Matroska (mkv)/built-in
Video codec profile: webtv-h264
Codec: libx264
Hardware acceleration: enbaled

tvheadend conf
profile:
{
"container": 1,
"pro_vcodec": "webtv-h264",
"src_vcodec": [
],
"pro_acodec": "copy",
"src_acodec": [
],
"src_scodec": [
],
"class": "profile-transcode",
"name": "kodi",
"enabled": true,
"default": false,
"timeout": 5,
"timeout_start": 0,
"priority": 3,
"fpriority": 0,
"restart": false,
"contaccess": true,
"catimeout": 2000,
"swservice": true,
"svfilter": 0
}

codec:
{
"preset": "ultrafast",
"tune": "zerolatency",
"params": "",
"bit_rate": 0,
"crf": 0,
"deinterlace": true,
"height": 0,
"scaling_mode": 0,
"hwaccel": true,
"pix_fmt": -1,
"name": "webtv-h264",
"description": "WEBTV codec H264",
"codec_name": "libx264",
"profile": -99
}




AMD i-gpu
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Mesa Gallium driver 21.2.6 for AMD Radeon™ Vega 8 Graphics (RAVEN, DRM 3.35.0, 5.4.0-202-generic, LLVM 12.0.0)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc


RE: Tvheadend ffmpeg error - goerdi - 2025-01-25

hi !

you might need a render device like for vaapi/qsv

{
        "level": 30,
        "ui": 255,
        "uilp": 255,
        "platform": 1,
        "device": "/dev/dri/renderD128",
        "low_power": false,
        "async_depth": 2,
        "desired_b_depth": 0,
        "b_reference": 0,
        "rc_mode": 0,
        "qp": 0,
        "qmin": 0,
        "qmax": 0,
        "bit_rate": 0,
        "max_bit_rate": 0,
        "buff_factor": 3,
        "bit_rate_scale_factor": 0,
        "hw_denoise": 0,
        "hw_sharpness": 0,
        "quality": 0,
        "deinterlace": true,
        "height": 0,
        "scaling_mode": 0,
        "hwaccel": false,
        "pix_fmt": -1,
        "name": "vaapi_x264",
        "description": "vaapi_x264",
        "codec_name": "h264_vaapi",
        "profile": -99
}


Ciao Gerd


RE: Tvheadend ffmpeg error - Richárd Nemes - 2025-01-25

(2025-01-25, 03:28 PM)goerdi Wrote: hi !

you might need a render device like for vaapi/qsv

{
        "level": 30,
        "ui": 255,
        "uilp": 255,
        "platform": 1,
        "device": "/dev/dri/renderD128",
        "low_power": false,
        "async_depth": 2,
        "desired_b_depth": 0,
        "b_reference": 0,
        "rc_mode": 0,
        "qp": 0,
        "qmin": 0,
        "qmax": 0,
        "bit_rate": 0,
        "max_bit_rate": 0,
        "buff_factor": 3,
        "bit_rate_scale_factor": 0,
        "hw_denoise": 0,
        "hw_sharpness": 0,
        "quality": 0,
        "deinterlace": true,
        "height": 0,
        "scaling_mode": 0,
        "hwaccel": false,
        "pix_fmt": -1,
        "name": "vaapi_x264",
        "description": "vaapi_x264",
        "codec_name": "h264_vaapi",
        "profile": -99
}


Ciao Gerd


Thankyou, not working, not listed tvheadend.how to fix?

root@ryzenConfused-facehome/ryzen# ffmpeg -hide_banner -encoders|grep  h264
V....D libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
V....D libx264rgb          libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
V....D h264_amf            AMD AMF H.264 Encoder (codec h264)
V....D h264_nvenc          NVIDIA NVENC H.264 encoder (codec h264)
V..... h264_qsv            H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
V..... h264_v4l2m2m        V4L2 mem2mem H.264 encoder wrapper (codec h264)
V....D h264_vaapi          H.264/AVC (VAAPI) (codec h264)


RE: Tvheadend ffmpeg error - goerdi - 2025-01-25

Hi !

You have to find out which is your hw render device and put it in TVH codec ... but first you have to select during codec creation following things
(see attached pictures)

hint: the first time i had to insert the render device manually... on the next it appears automatically (see finished picture)

Ciao Gerd


RE: Tvheadend ffmpeg error - Richárd Nemes - 2025-01-26

(2025-01-25, 11:39 PM)goerdi Wrote: Hi !

You have to find out which is your hw render device and put it in TVH codec ... but first you have to select during codec creation following things
(see attached pictures)

hint: the first time i had to insert the render device manually... on the next it appears automatically (see finished picture)

Ciao Gerd

Not litsed tvheadened, installed cloudsmith

https://cloudsmith.io/~tvheadend/repos/tvheadend/packages/detail/deb/tvheadend/4.3-2375~g653bd0400~focal/a=armhf;xc=main;d=ubuntu%252Ffocal;t=binary/


RE: Tvheadend ffmpeg error - Richárd Nemes - 2025-01-26

Reconfigure tvheadend installer dpkg install and restart tvheadend and working.
https://tvheadend.org/d/4492-manual-building-deb-packages-on-clean-ubuntu-or-other-debian-distros

Thankyou