What's causing my transcode error?
from velummortis@lemmy.dbzer0.com to jellyfin@lemmy.ml on 04 Oct 11:51
https://lemmy.dbzer0.com/post/54796850

Client: Roku client 3.0.10 Server: 10.10.7 on Debian Trixie kernel 6.12.48+deb13 amd64 except this time it’s a Samsung R480 instead of the 2017 Intel Macbook Pro I usually use. Which means…

Hardware Acceleration engine VAAPI, vainfo already advised me to only use H/A for H264 and MPEG2.

Still, I can’t get it to work. What am I doing wrong?

Output:

  built with gcc 14 (Debian 14.2.0-19)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '..../Videos/TV Shows/Ladies.of.the.Palace.2001/Ladies.of.the.Palace.S01E123.1080p.WEB-DL.H264.AAC-AppleTor.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    creation_time   : 2016-02-17T18:12:32.000000Z
  Duration: 01:00:05.67, start: 0.000000, bitrate: 5259 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 4998 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
      Metadata:
        creation_time   : 2016-02-17T18:12:32.000000Z
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)
      Metadata:
        creation_time   : 2016-02-17T18:12:32.000000Z
        vendor_id       : [0][0][0][0]
[Parsed_subtitles_4 @ 0x7fdcda081100] libass API version: 0x1704000
[Parsed_subtitles_4 @ 0x7fdcda081100] libass source: commit: 0.17.4-0-gbbb3c7f1570a4a021e52683f3fbdf74fe492ae84
[Parsed_subtitles_4 @ 0x7fdcda081100] Shaper: FriBidi 1.0.16 (SIMPLE) HarfBuzz-ng 10.4.0 (COMPLEX)
[Parsed_subtitles_4 @ 0x7fdcda081100] Using font provider fontconfig
[AVHWDeviceContext @ 0x7fdcda081340] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[Parsed_subtitles_4 @ 0x7fdcce4183c0] libass API version: 0x1704000
[Parsed_subtitles_4 @ 0x7fdcce4183c0] libass source: commit: 0.17.4-0-gbbb3c7f1570a4a021e52683f3fbdf74fe492ae84
[Parsed_subtitles_4 @ 0x7fdcce4183c0] Shaper: FriBidi 1.0.16 (SIMPLE) HarfBuzz-ng 10.4.0 (COMPLEX)
[Parsed_subtitles_4 @ 0x7fdcce4183c0] Using font provider fontconfig
[Parsed_subtitles_4 @ 0x7fdcce4183c0] fontselect: (Arial, 400, 0) -> /usr/share/fonts/truetype/msttcorefonts/Arial.ttf, 0, ArialMT
[Parsed_subtitles_4 @ 0x7fdcce4183c0] fontselect: (Times New Roman, 400, 0) -> /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf, 0, TimesNewRomanPSMT
[h264_vaapi @ 0x7fdcda0d0180] No usable encoding entrypoint found for profile VAProfileH264High (7).
[vost#0:0/h264_vaapi @ 0x7fdcda1f9600] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x7fdcda080d40] Error sending frames to consumers: Function not implemented
[vf#0:0 @ 0x7fdcda080d40] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x7fdcda080d40] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/h264_vaapi @ 0x7fdcda1f9600] Could not open encoder before EOF
[vost#0:0/h264_vaapi @ 0x7fdcda1f9600] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_vaapi @ 0x7fdcda1f9600] Terminating thread with return code -22 (Invalid argument)
[out#0/hls @ 0x7fdcda080ec0] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A    
Conversion failed!

#jellyfin

threaded - newest

frongt@lemmy.zip on 04 Oct 12:28 collapse

Says maybe incorrect parameters. Show the parameters.

velummortis@lemmy.dbzer0.com on 04 Oct 12:55 collapse

Is that like the media parameters? I have that here, please let me know if this isn’t the right thing!

General
Complete name                            : ...Videos/TV Shows/Ladies.of.the.Palace.2001/Ladies.of.the.Palace.S01E123.1080p.WEB-DL.H264.AAC-AppleTor.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/isom)
File size                                : 2.21 GiB
Duration                                 : 1 h 0 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 5 260 kb/s
Frame rate                               : 29.970 FPS
Encoded date                             : 2016-02-17 18:12:32 UTC
Tagged date                              : 2016-02-17 18:12:32 UTC

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 3 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 3 frames
Format settings, picture structure       : Frame
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1 h 0 min
Source duration                          : 1 h 0 min
Bit rate mode                            : Constant
Bit rate                                 : 5 000 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 29.970 (29970/1000) FPS
Minimum frame rate                       : 29.940 FPS
Maximum frame rate                       : 29.970 FPS
Original frame rate                      : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan type, store method                  : Interleaved fields
Scan order                               : Bottom Field First
Bits/(Pixel*Frame)                       : 0.080
Time code of first frame                 : 00:00:00:00
Stream size                              : 2.10 GiB (95%)
Source stream size                       : 2.10 GiB (95%)
Language                                 : English
Encoded date                             : 2016-02-17 18:12:32 UTC
Tagged date                              : 2016-02-17 18:12:32 UTC
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : 
frongt@lemmy.zip on 04 Oct 19:10 collapse

I’m not at my PC so I can’t really research or test, but you could take that command and cut it down until you find the problematic option. The other line about the entrypoint is probably relevant.

I’d validate that hardware acceleration works for the source and destination formats based on your hardware, chosen API, and software versions.

You’ll probably also get more answers if you post on the jellyfin forums.

velummortis@lemmy.dbzer0.com on 04 Oct 23:38 collapse

I think I resolved it! What vainfo didn’t tell me is that while it supports MPEG2 and H264 decoding, it doesn’t support H/W encoding. My transcodes run fine now, though a bit slow (will probably replace with someone’s X1 from eBay…)