I was getting 100% CPU utilization as I have an older CPU/GPU in my media server (GTX 570 & i7-4790k), so I turned on QSV hardware decoding. Now, a device that would previously play media is unable to play anything at all. Checking my logs, for each time I try to play media on that device, a ffmpeg.transcode log entry is created. On my other devices that work, I get a ffmpeg.directstream entry instead, with no issues. I have tried about 5 titles and they each led to the same error.
That said, I am trying to have my devices do direct play and not require transcoding. They each support HDR, Dolby Vision, and 4k. I have not confirmed if the audio formats are all supported, but would that be as heavy of a transcode? Nevertheless, this one device is creating a transcode, but others are not. My problematic TV is a Hisense 55U6HSKU Google 4k TV.
I'm on version 10.9.0
- OS: Windows 10
- Clients: Jellyfin App for Android TV
- FFmpeg Version: ffmpeg version 6.0.1-Jellyfin
- Playback Method: Have attempted all player options including getting MX Player and choosing 'external player'
- Hardware Acceleration: QSV
- GPU Model: GeForce 570
- Networking: Playing over LAN to TV
Relevant Jellyfin logs:
[2024-06-09 22:51:37.215 -04:00] [ERR] [51] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/c9a75433-d62a-e5b0-dde1-1eb73b5ce769/hls1/main/0.ts".
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
at MediaBrowser.MediaEncoding.Transcoding.TranscodeManager.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, Guid userId, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource, String workingDirectory)
at Jellyfin.Api.Controllers.DynamicHlsController.GetDynamicSegment(StreamingRequestDto streamingRequest, Int32 segmentId)
at Jellyfin.Api.Controllers.DynamicHlsController.GetHlsVideoSegment(Guid itemId, String playlistId, Int32 segmentId, String container, Int64 runtimeTicks, Int64 actualSegmentLengthTicks, Nullable
Relevant ffmpeg logs, truncated a bit:
ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device d3d11va=dx11:,vendor=0x8086 -init_hw_device qsv=qs@dx11 -filter_hw_device qs -noautorotate -i file:"S:\video.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -preset veryfast -look_ahead 0 -b:v 17453235 -maxrate 17453235 -bufsize 34906470 -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,1920)/2)*2:trunc(ow/a/2)*2,format=nv12" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "C:\Jellyfin\Data\cache\transcodes\cf2c12d6aaae96562081366167262d73%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "C:\Jellyfin\Data\cache\transcodes\cf2c12d6aaae96562081366167262d73.m3u8"
ffmpeg version 6.0.1-Jellyfin Copyright © 2000-2023 the FFmpeg developers
built with gcc 13-win32 (GCC)
configuration: --prefix=/opt/ffmpeg --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Jellyfin --disable-ffplay --disable-debug --disable-doc --disable-sdl2 --disable-ptx-compression --disable-w32threads --enable-pthreads --enable-shared --enable-lto --enable-gpl --enable-version3 --enable-schannel --enable-iconv --enable-libxml2 --enable-zlib --enable-lzma --enable-gmp --enable-chromaprint --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libwebp --enable-libvpx --enable-libzimg --enable-libx264 --enable-libx265 --enable-libsvtav1 --enable-libdav1d --enable-libfdk-aac --enable-opencl --enable-dxva2 --enable-d3d11va --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
[AVHWDeviceContext @ 00000234a6bbab40] Using device 8086:0412 (Intel® HD Graphics 4600).
[AVHWDeviceContext @ 00000234a6c89bc0] Error creating a MFX session: -9.
Device creation failed: -1313558101.
Failed to set value 'qsv=qs@dx11' for option 'init_hw_device': Unknown error occurred
Error parsing global options: Unknown error occurred
That said, I am trying to have my devices do direct play and not require transcoding. They each support HDR, Dolby Vision, and 4k. I have not confirmed if the audio formats are all supported, but would that be as heavy of a transcode? Nevertheless, this one device is creating a transcode, but others are not. My problematic TV is a Hisense 55U6HSKU Google 4k TV.
I'm on version 10.9.0
- OS: Windows 10
- Clients: Jellyfin App for Android TV
- FFmpeg Version: ffmpeg version 6.0.1-Jellyfin
- Playback Method: Have attempted all player options including getting MX Player and choosing 'external player'
- Hardware Acceleration: QSV
- GPU Model: GeForce 570
- Networking: Playing over LAN to TV
Relevant Jellyfin logs:
[2024-06-09 22:51:37.215 -04:00] [ERR] [51] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/c9a75433-d62a-e5b0-dde1-1eb73b5ce769/hls1/main/0.ts".
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
at MediaBrowser.MediaEncoding.Transcoding.TranscodeManager.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, Guid userId, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource, String workingDirectory)
at Jellyfin.Api.Controllers.DynamicHlsController.GetDynamicSegment(StreamingRequestDto streamingRequest, Int32 segmentId)
at Jellyfin.Api.Controllers.DynamicHlsController.GetHlsVideoSegment(Guid itemId, String playlistId, Int32 segmentId, String container, Int64 runtimeTicks, Int64 actualSegmentLengthTicks, Nullable
1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable
1 segmentLength, Nullable1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable
1 enableAutoStreamCopy, Nullable1 allowVideoStreamCopy, Nullable
1 allowAudioStreamCopy, Nullable1 breakOnNonKeyFrames, Nullable
1 audioSampleRate, Nullable1 maxAudioBitDepth, Nullable
1 audioBitRate, Nullable1 audioChannels, Nullable
1 maxAudioChannels, String profile, String level, Nullable1 framerate, Nullable
1 maxFramerate, Nullable1 copyTimestamps, Nullable
1 startTimeTicks, Nullable1 width, Nullable
1 height, Nullable1 maxWidth, Nullable
1 maxHeight, Nullable1 videoBitRate, Nullable
1 subtitleStreamIndex, Nullable1 subtitleMethod, Nullable
1 maxRefFrames, Nullable1 maxVideoBitDepth, Nullable
1 requireAvc, Nullable1 deInterlace, Nullable
1 requireNonAnamorphic, Nullable1 transcodingMaxAudioChannels, Nullable
1 cpuCoreLimit, String liveStreamId, Nullable1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable
1 audioStreamIndex, Nullable1 videoStreamIndex, Nullable
1 context, Dictionary`2 streamOptions)Relevant ffmpeg logs, truncated a bit:
ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device d3d11va=dx11:,vendor=0x8086 -init_hw_device qsv=qs@dx11 -filter_hw_device qs -noautorotate -i file:"S:\video.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -preset veryfast -look_ahead 0 -b:v 17453235 -maxrate 17453235 -bufsize 34906470 -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,1920)/2)*2:trunc(ow/a/2)*2,format=nv12" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "C:\Jellyfin\Data\cache\transcodes\cf2c12d6aaae96562081366167262d73%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "C:\Jellyfin\Data\cache\transcodes\cf2c12d6aaae96562081366167262d73.m3u8"
ffmpeg version 6.0.1-Jellyfin Copyright © 2000-2023 the FFmpeg developers
built with gcc 13-win32 (GCC)
configuration: --prefix=/opt/ffmpeg --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Jellyfin --disable-ffplay --disable-debug --disable-doc --disable-sdl2 --disable-ptx-compression --disable-w32threads --enable-pthreads --enable-shared --enable-lto --enable-gpl --enable-version3 --enable-schannel --enable-iconv --enable-libxml2 --enable-zlib --enable-lzma --enable-gmp --enable-chromaprint --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libwebp --enable-libvpx --enable-libzimg --enable-libx264 --enable-libx265 --enable-libsvtav1 --enable-libdav1d --enable-libfdk-aac --enable-opencl --enable-dxva2 --enable-d3d11va --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
[AVHWDeviceContext @ 00000234a6bbab40] Using device 8086:0412 (Intel® HD Graphics 4600).
[AVHWDeviceContext @ 00000234a6c89bc0] Error creating a MFX session: -9.
Device creation failed: -1313558101.
Failed to set value 'qsv=qs@dx11' for option 'init_hw_device': Unknown error occurred
Error parsing global options: Unknown error occurred