### This issue respects the following points:
- [X] This is a **bug**, not a qu…estion or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found [here](https://jellyfin.org/contact/).
- [X] This issue is **not** already reported on [GitHub](https://github.com/jellyfin/jellyfin/issues?q=is%3Aopen+is%3Aissue) _(I've searched it)_.
- [X] I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
- [X] I agree to follow Jellyfin's [Code of Conduct](https://jellyfin.org/docs/general/community-standards.html#code-of-conduct).
- [X] This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.
### Description of the bug
When attempting to play a video on a client which requires/requests VP9 video, and the video requires transcoding (I.e. the video is not already encoded in VP9), Jellyfin uses incorrect ffmpeg parameters, fails to transcode the video and the video fails to play in the client.
### Reproduction steps
1. Play a video which is not already vp9 encoded on a client requesting/requiring vp9
### What is the current _bug_ behavior?
The video fails to begin playing and ffmpeg errors are shown in the jellyfin server logs.
### What is the expected _correct_ behavior?
The video begins playback in the requested format.
### Jellyfin Server version
10.9.7
### Specify commit id
_No response_
### Specify unstable release number
_No response_
### Specify version number
_No response_
### Specify the build version
Release
### Environment
```markdown
- OS: Arch Linux
- Linux Kernel: 6.9.9-zen1-1-zen
- Virtualization: N/A
- Clients: Browser, https://github.com/gurrrrrrett3/vrchat-jellyfin (manually configured to request vp9 and opuis in a webm container)
- Browser: Firefox 129.0b3 (64-bit)
- FFmpeg Version: 6.0.1-jellyfin
- Playback Method: Transcode
- Hardware Acceleration: NVENC
- GPU Model: GTX1070
- Plugins: AudioDB, MusicBrainz, OMDb, Open Subtitles, Studio Images, TMDb
- Reverse Proxy: nginx
- Base URL: none
- Networking: Host
- Storage: local
```
### Jellyfin logs
```shell
[2024-07-22 08:38:41.155 -05:00] [INF] WS "192.168.1.10" closed
[2024-07-22 08:38:41.485 -05:00] [INF] WS "192.168.1.10" request
[2024-07-22 08:40:55.982 -05:00] [INF] WS "192.168.1.10" request
[2024-07-22 08:41:13.083 -05:00] [INF] User policy for "<redacted>". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-07-22 08:41:13.516 -05:00] [INF] Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2024-07-22 08:41:13.521 -05:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-dump_attachment:t \"\" -y -i file:\"/data/Media/Anime/Yu Yu Hakusho/Season 1/Yu Yu Hakusho - S01E02 - Koenma Appears Bluray-1080p.mkv\" -t 0 -f null null"
[2024-07-22 08:41:14.187 -05:00] [INF] ffmpeg attachment extraction completed for "file:\"/data/Media/Anime/Yu Yu Hakusho/Season 1/Yu Yu Hakusho - S01E02 - Koenma Appears Bluray-1080p.mkv\"" to "/var/cache/jellyfin/attachments/ddb057280d84f2b6940b81b8bb961272"
[2024-07-22 08:41:14.189 -05:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -init_hw_device cuda=cu:0 -filter_hw_device cu -noautorotate -i file:\"/data/Media/Anime/Yu Yu Hakusho/Season 1/Yu Yu Hakusho - S01E02 - Koenma Appears Bluray-1080p.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:0 -codec:v:0 h264_nvenc -preset p1 -b:v 8096664 -maxrate 8096664 -bufsize 16193328 -g:v:0 72 -keyint_min:v:0 72 -filter_complex \"[0:3]scale=-1:1080:fast_bilinear,scale,crop,pad=max(1920\,iw):max(1080\,ih):(ow-iw)/2:(oh-ih)/2:black@0,crop=1920:1080[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p[main];[main][sub]overlay=eof_action=pass:repeatlast=0\" -start_at_zero -codec:a:0 libopus -strict -2 -ac 2 -ab 192000 -ar 48000 -af \"volume=2\" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename \"c9f6f1f6ddc243bd373d5f63f4f9065c-1.mp4\" -start_number 0 -hls_segment_filename \"/var/lib/jellyfin/transcodes/c9f6f1f6ddc243bd373d5f63f4f9065c%d.mp4\" -hls_playlist_type vod -hls_list_size 0 -y \"/var/lib/jellyfin/transcodes/c9f6f1f6ddc243bd373d5f63f4f9065c.m3u8\""
[2024-07-22 08:41:17.908 -05:00] [INF] Stopping ffmpeg process with q command for "/var/lib/jellyfin/transcodes/c9f6f1f6ddc243bd373d5f63f4f9065c.m3u8"
[2024-07-22 08:41:18.198 -05:00] [INF] FFmpeg exited with code 0
[2024-07-22 08:41:18.198 -05:00] [INF] Deleting partial stream file(s) "/var/lib/jellyfin/transcodes/c9f6f1f6ddc243bd373d5f63f4f9065c.m3u8"
[2024-07-22 08:41:19.707 -05:00] [INF] Playback stopped reported by app "Jellyfin Web" "10.9.7" playing "Koenma of the Spirit Realm! A Trial Towards Resurrection". Stopped at "1710" ms
[2024-07-22 08:41:48.097 -05:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -i file:\"/data/Media/Anime/Yu Yu Hakusho/Season 1/Yu Yu Hakusho - S01E02 - Koenma Appears Bluray-1080p.mkv\" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libvpx-vp9 -force_key_frames \"expr:gte(t,n_forced*5)\" -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1280\,720*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1280/a\,720))/2)*2,format=yuv420p\" -deadline good -cpu-used 1 -crf 31 -row-mt 1 -profile 1 -maxrate:v 4857998 -bufsize:v 9715996 -b:v 4857998 -map_metadata -1 -map_chapters -1 -threads 23 -codec:a:0 libopus -ac 2 -ab 128000 -y \"/var/lib/jellyfin/transcodes/ada72b355c50361860956702f66e9aab.webm\""
[2024-07-22 08:41:48.297 -05:00] [ERR] FFmpeg exited with code 1
[2024-07-22 08:41:49.228 -05:00] [ERR] Error processing request. URL "GET" "/Videos/ddb057280d84f2b6940b81b8bb961272/stream".
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.Helpers.FileStreamResponseHelpers.GetTranscodedFile(StreamState state, Boolean isHeadRequest, HttpContext httpContext, ITranscodeManager transcodeManager, String ffmpegCommandLineArguments, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource)
at Jellyfin.Api.Controllers.VideosController.GetVideoStream(Guid itemId, String container, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions)
at lambda_method469(Closure, Object)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2024-07-22 08:42:18.208 -05:00] [INF] WS "192.168.1.10" closed
[2024-07-22 08:42:18.535 -05:00] [INF] WS "192.168.1.10" request
```
### FFmpeg logs
```shell
{"Protocol":0,"Id":"ddb057280d84f2b6940b81b8bb961272","Path":"/data/Media/Anime/Yu Yu Hakusho/Season 1/Yu Yu Hakusho - S01E02 - Koenma Appears Bluray-1080p.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":359566432,"Name":"Yu Yu Hakusho - S01E02 - Koenma Appears Bluray-1080p","IsRemote":false,"ETag":"abe367da1f47b6ba5b1796fe72b9f02d","RunTimeTicks":14210939904,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"av1","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":"smpte170m","ColorTransfer":"smpte170m","ColorPrimaries":"smpte170m","DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"1080p AV1 SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":2024166,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":1080,"Width":1920,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p10le","Level":8,"IsAnamorphic":null},{"Codec":"opus","CodecTag":null,"Language":"jpn","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"Japanese 2.0","VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"Japanese 2.0 - OPUS - Stereo","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"stereo","BitRate":152394,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":48000,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"opus","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"English 5.1","VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"English 5.1 - OPUS - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":216225,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"PGSSUB","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":"English","VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":"Undefined","LocalizedDefault":"Default","LocalizedForced":"Forced","LocalizedExternal":"External","LocalizedHearingImpaired":"Hearing Impaired","DisplayTitle":"English - Default - PGSSUB","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":3,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"mjpeg","CodecTag":null,"Language":null,"ColorRange":null,"ColorSpace":"bt470bg","ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/90000","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":null,"NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"IsHearingImpaired":false,"Height":360,"Width":640,"AverageFrameRate":null,"RealFrameRate":90000,"Profile":"Baseline","Type":3,"AspectRatio":"16:9","Index":4,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuvj420p","Level":-99,"IsAnamorphic":null}],"MediaAttachments":[{"Codec":"mjpeg","CodecTag":"[0][0][0][0]","Comment":null,"Index":4,"FileName":"cover.jpg","MimeType":"image/jpeg","DeliveryUrl":null}],"Formats":[],"Bitrate":2392785,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}
/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -i file:"/data/Media/Anime/Yu Yu Hakusho/Season 1/Yu Yu Hakusho - S01E02 - Koenma Appears Bluray-1080p.mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libvpx-vp9 -force_key_frames "expr:gte(t,n_forced*5)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1280\,720*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1280/a\,720))/2)*2,format=yuv420p" -deadline good -cpu-used 1 -crf 31 -row-mt 1 -profile 1 -maxrate:v 4857998 -bufsize:v 9715996 -b:v 4857998 -map_metadata -1 -map_chapters -1 -threads 23 -codec:a:0 libopus -ac 2 -ab 128000 -y "/var/lib/jellyfin/transcodes/ada72b355c50361860956702f66e9aab.webm"
ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 14.1.1 (GCC) 20240522
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-chromaprint --enable-libfontconfig --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libopenmpt --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --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
[libdav1d @ 0x646b826c71c0] libdav1d 1.4.3
Input #0, matroska,webm, from 'file:/data/Media/Anime/Yu Yu Hakusho/Season 1/Yu Yu Hakusho - S01E02 - Koenma Appears Bluray-1080p.mkv':
Metadata:
title : Yu Yu Hakusho (1992) - S01E02 (002)
creation_time : 2023-12-28T14:21:58.000000Z
ENCODER : Lavf60.16.100
Duration: 00:23:41.09, start: -0.007000, bitrate: 2024 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 88.088000
Metadata:
title : Chapter 01
Chapter #0:1: start 88.088000, end 679.679000
Metadata:
title : Chapter 02
Chapter #0:2: start 679.679000, end 1305.345708
Metadata:
title : Chapter 03
Chapter #0:3: start 1305.345708, end 1335.375708
Metadata:
title : Chapter 04
Chapter #0:4: start 1335.375708, end 1421.086333
Metadata:
title : Chapter 05
Stream #0:0: Video: av1 (Main), yuv420p10le(tv, smpte170m), 1920x1080, Film Grain, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)
Metadata:
BPS : 1640083
DURATION : 00:23:41.087000000
NUMBER_OF_FRAMES: 34072
NUMBER_OF_BYTES : 291337747
_STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2023-12-28 14:21:58
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(jpn): Audio: opus, 48000 Hz, stereo, fltp
Metadata:
title : Japanese 2.0
ENCODER : Lavc60.31.102 libopus
BPS : 152394
DURATION : 00:23:41.094000000
NUMBER_OF_FRAMES: 71055
NUMBER_OF_BYTES : 27070801
SOURCE_ID : 001101
_STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2023-12-28 14:21:58
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:2(eng): Audio: opus, 48000 Hz, 5.1, fltp (default)
Metadata:
title : English 5.1
ENCODER : Lavc60.31.102 libopus
BPS : 216225
DURATION : 00:23:41.094000000
NUMBER_OF_FRAMES: 71055
NUMBER_OF_BYTES : 38409520
SOURCE_ID : 001100
_STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2023-12-28 14:21:58
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:3(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080 (default)
Metadata:
title : English
BPS : 37361
DURATION : 00:23:10.577000000
NUMBER_OF_FRAMES: 610
NUMBER_OF_BYTES : 6494277
SOURCE_ID : 001200
_STATISTICS_WRITING_APP: mkvmerge v81.0 ('Milliontown') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2023-12-28 14:21:58
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:4: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 640x360 [SAR 96:96 DAR 16:9], 90k tbr, 90k tbn (attached pic)
Metadata:
filename : cover.jpg
mimetype : image/jpeg
Please use -profile:a or -profile:v, -profile is ambiguous
[libdav1d @ 0x646b8287f480] libdav1d 1.4.3
Stream mapping:
Stream #0:0 -> #0:0 (av1 (libdav1d) -> vp9 (libvpx-vp9))
Stream #0:1 -> #0:1 (opus (native) -> opus (libopus))
Press [q] to stop, [?] for help
[libvpx-vp9 @ 0x646b8275ce80] Application has requested 23 threads. Using a thread count greater than 16 is not recommended.
[libvpx-vp9 @ 0x646b8275ce80] v1.14.0
Output #0, webm, to '/var/lib/jellyfin/transcodes/ada72b355c50361860956702f66e9aab.webm':
Metadata:
encoder : Lavf60.3.100
Stream #0:0: Video: vp9 (Profile 1), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 4857 kb/s, 23.98 fps, 1k tbn (default)
Metadata:
encoder : Lavc60.3.100 libvpx-vp9
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 9715996 vbv_delay: N/A
Stream #0:1: Audio: opus, 48000 Hz, stereo, flt, 128 kb/s
Metadata:
encoder : Lavc60.3.100 libopus
[libvpx-vp9 @ 0x646b8275ce80] Error encoding frame: Invalid parameter
[libvpx-vp9 @ 0x646b8275ce80] Additional information: 4:2:0 color format requires profile 0 or 2
[vost#0:0/libvpx-vp9 @ 0x646b827f6ac0] Error submitting video frame to the encoder
[libopus @ 0x646b8275e240] 1 frames left in the queue on closing
Conversion failed!
```
### Client / Browser logs
_No response_
### Relevant screenshots or videos
_No response_
### Additional information
Would just like to make an upfront note this is indeed a duplicate of https://github.com/jellyfin/jellyfin/issues/9318 but that issue was closed as stale, however, the bug is still present.