Jellyfin Forum
Purpose of Force Transcode in user settings - 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: Purpose of Force Transcode in user settings (/t-purpose-of-force-transcode-in-user-settings)



Purpose of Force Transcode in user settings - jellybro - 2024-06-12

Hi -

What is the purpose of 'Force transcoding of remote media sources such as Live TV' option in the Admin dashboard -> Users (pick user) context menu?

I notice that in the code, the comment related to this permission item seems to differ in nature a bit. They seems to point at location of the user vs location of the content.

https://github.com/jellyfin/jellyfin/blob/master/Jellyfin.Data/Enums/PermissionKind.cs

Code:
        /// <summary>
        /// Whether the server should force transcoding on remote connections for the user.
        /// </summary>
        ForceRemoteSourceTranscoding = 20,

For context, I am having issues and trying to force transcode for live tv streams.

This option does not seem to work as I understand it should work. Details on the stream I'm using in attached issue.

https://github.com/jellyfin/jellyfin-tizen/issues/268


RE: Purpose of Force Transcode in user settings - TheDreadPirate - 2024-06-12

There is both a setting to force transcoding per user, but there is also code that was added in 10.9 to force transcoding if the input stream is greater than 20Mbps. I forget the reason this was added (probably compatibility).

What are your server specs? Can you share the ffmpeg log associated with the failed live TV session?


RE: Purpose of Force Transcode in user settings - jellybro - 2024-06-12

Thanks for the reply. I am sure that there is no transcode being attempted as the logs for Jellyfin do not show an attempt to transcode. This is the entire block from Jellyfin 10.9.6 logs. No corresponding transcode logs. I should also mention that the user 'frametv' policy has the transcode remote media ticked on to true.
From what I can tell, it is still trying to direct play.

Code:
[2024-06-12 11:44:13.044 -07:00] [INF] [137] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.1.1" request
[2024-06-12 11:44:46.038 -07:00] [INF] [115] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.1.1" request
[2024-06-12 11:45:16.381 -07:00] [INF] [137] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "frametv". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-06-12 11:45:16.381 -07:00] [INF] [137] Jellyfin.LiveTv.LiveTvMediaSourceProvider: Opening channel stream from "Emby", external channel Id: "m3u_572cf8a816c63a90c014852893d69943747e289f53c84f499e2dfea1a60fb84f"
[2024-06-12 11:45:16.381 -07:00] [INF] [137] Jellyfin.LiveTv.DefaultLiveTvService: Streaming Channel "m3u_572cf8a816c63a90c014852893d69943747e289f53c84f499e2dfea1a60fb84f"
[2024-06-12 11:45:16.381 -07:00] [INF] [137] Jellyfin.LiveTv.DefaultLiveTvService: Live stream "747e289f53c84f499e2dfea1a60fb84f" consumer count is now 4
[2024-06-12 11:45:16.406 -07:00] [INF] [94] Emby.Server.Implementations.Library.MediaSourceManager: Live tv media info probe took "0.0247583" seconds
[2024-06-12 11:45:16.407 -07:00] [INF] [94] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: MediaSourceInfo { Protocol: Http, Id: "747e289f53c84f499e2dfea1a60fb84f", Path: "https://cbcrclinear-tor.akamaized.net/hls/live/2042768/CBCRCLINEAR_TOR_14/master5.m3u8", EncoderPath: null, EncoderProtocol: null, Type: Default, Container: "hls", Size: 1227, Name: null, IsRemote: True, ETag: null, RunTimeTicks: null, ReadAtNativeFramerate: False, IgnoreDts: True, IgnoreIndex: False, GenPtsInput: False, SupportsTranscoding: True, SupportsDirectStream: False, SupportsDirectPlay: True, IsInfiniteStream: True, RequiresOpening: True, OpenToken: null, RequiresClosing: True, LiveStreamId: "e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_747e289f53c84f499e2dfea1a60fb84f", BufferMs: null, RequiresLooping: False, SupportsProbing: True, VideoType: null, IsoType: null, Video3DFormat: null, MediaStreams: [MediaStream { Codec: "h264", CodecTag: null, Language: null, 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/90000", CodecTimeBase: null, Title: null, VideoRange: SDR, VideoRangeType: SDR, VideoDoViTitle: null, AudioSpatialFormat: None, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, LocalizedHearingImpaired: null, DisplayTitle: "720p H264 SDR", NalLengthSize: "0", IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: 8, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, IsHearingImpaired: False, Height: 720, Width: 1280, AverageFrameRate: 30, RealFrameRate: 30, Profile: "High", Type: Video, AspectRatio: "16:9", Index: -1, Score: null, IsExternal: False, DeliveryMethod: null, DeliveryUrl: null, IsExternalUrl: null, IsTextSubtitleStream: False, SupportsExternalStream: False, Path: null, PixelFormat: "yuv420p", Level: 41, IsAnamorphic: False }, MediaStream { Codec: "aac", CodecTag: null, Language: null, 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/90000", CodecTimeBase: null, Title: null, VideoRange: Unknown, VideoRangeType: Unknown, VideoDoViTitle: null, AudioSpatialFormat: None, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, LocalizedHearingImpaired: null, DisplayTitle: "AAC - Stereo", NalLengthSize: null, IsInterlaced: False, IsAVC: False, ChannelLayout: "stereo", BitRate: 192000, 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: "LC", Type: Audio, 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 }], MediaAttachments: [], Formats: [], Bitrate: 8192000, Timestamp: null, RequiredHttpHeaders: [("User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36")], TranscodingUrl: null, TranscodingSubProtocol: http, TranscodingContainer: null, AnalyzeDurationMs: 3000, TranscodeReasons: 0, DefaultAudioStreamIndex: null, DefaultSubtitleStreamIndex: null, VideoStream: MediaStream { Codec: "h264", CodecTag: null, Language: null, 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/90000", CodecTimeBase: null, Title: null, VideoRange: SDR, VideoRangeType: SDR, VideoDoViTitle: null, AudioSpatialFormat: None, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, LocalizedHearingImpaired: null, DisplayTitle: "720p H264 SDR", NalLengthSize: "0", IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: 8, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, IsHearingImpaired: False, Height: 720, Width: 1280, AverageFrameRate: 30, RealFrameRate: 30, Profile: "High", Type: Video, AspectRatio: "16:9", Index: -1, Score: null, IsExternal: False, DeliveryMethod: null, DeliveryUrl: null, IsExternalUrl: null, IsTextSubtitleStream: False, SupportsExternalStream: False, Path: null, PixelFormat: "yuv420p", Level: 41, IsAnamorphic: False } }
[2024-06-12 11:45:16.407 -07:00] [INF] [94] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "frametv". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True


Server specs - Intel N95 (Alder lake) with 16GB ram


RE: Purpose of Force Transcode in user settings - TheDreadPirate - 2024-06-12

Does Tizen have a built-in web browser? Does this problem happen when you use Jellyfin in the TV's browser instead of our Tizen app?


RE: Purpose of Force Transcode in user settings - jellybro - 2024-06-12

No built in browser on the TV.

As a test, I can get the live tv streams to work if I go to the user profile on the client and set the Max Allowed Video Transcoding Resolution to something like 360p. This seems to force the transcode on the video and the streams work.

It may do what I'd expect the 'Force transcoding of remote media sources such as Live TV' option to do. The transcode is great because it essentially proxies all data to your server and lets the server sort out the details.

Code:
[2024-06-12 12:27:22.950 -07:00] [INF] [62] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "frametv". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-06-12 12:27:22.951 -07:00] [INF] [62] Jellyfin.LiveTv.LiveTvMediaSourceProvider: Opening channel stream from "Emby", external channel Id: "m3u_572cf8a816c63a90c014852893d69943747e289f53c84f499e2dfea1a60fb84f"
[2024-06-12 12:27:22.951 -07:00] [INF] [62] Jellyfin.LiveTv.DefaultLiveTvService: Streaming Channel "m3u_572cf8a816c63a90c014852893d69943747e289f53c84f499e2dfea1a60fb84f"
[2024-06-12 12:27:22.951 -07:00] [INF] [62] Jellyfin.LiveTv.DefaultLiveTvService: Live stream "747e289f53c84f499e2dfea1a60fb84f" consumer count is now 3
[2024-06-12 12:27:22.951 -07:00] [INF] [54] Emby.Server.Implementations.Library.MediaSourceManager: Live tv media info probe took "0.0002239" seconds
[2024-06-12 12:27:22.951 -07:00] [INF] [54] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: MediaSourceInfo { Protocol: Http, Id: "747e289f53c84f499e2dfea1a60fb84f", Path: "https://cbcrclinear-tor.akamaized.net/hls/live/2042768/CBCRCLINEAR_TOR_14/master5.m3u8", EncoderPath: null, EncoderProtocol: null, Type: Default, Container: "hls", Size: 1227, Name: null, IsRemote: True, ETag: null, RunTimeTicks: null, ReadAtNativeFramerate: False, IgnoreDts: True, IgnoreIndex: False, GenPtsInput: False, SupportsTranscoding: True, SupportsDirectStream: False, SupportsDirectPlay: True, IsInfiniteStream: True, RequiresOpening: True, OpenToken: null, RequiresClosing: True, LiveStreamId: "e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_747e289f53c84f499e2dfea1a60fb84f", BufferMs: null, RequiresLooping: False, SupportsProbing: True, VideoType: null, IsoType: null, Video3DFormat: null, MediaStreams: [MediaStream { Codec: "h264", CodecTag: null, Language: null, 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/90000", CodecTimeBase: null, Title: null, VideoRange: SDR, VideoRangeType: SDR, VideoDoViTitle: null, AudioSpatialFormat: None, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, LocalizedHearingImpaired: null, DisplayTitle: "720p H264 SDR", NalLengthSize: "0", IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: 8, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, IsHearingImpaired: False, Height: 720, Width: 1280, AverageFrameRate: 30, RealFrameRate: 30, Profile: "High", Type: Video, AspectRatio: "16:9", Index: -1, Score: null, IsExternal: False, DeliveryMethod: null, DeliveryUrl: null, IsExternalUrl: null, IsTextSubtitleStream: False, SupportsExternalStream: False, Path: null, PixelFormat: "yuv420p", Level: 41, IsAnamorphic: False }, MediaStream { Codec: "aac", CodecTag: null, Language: null, 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/90000", CodecTimeBase: null, Title: null, VideoRange: Unknown, VideoRangeType: Unknown, VideoDoViTitle: null, AudioSpatialFormat: None, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, LocalizedHearingImpaired: null, DisplayTitle: "AAC - Stereo", NalLengthSize: null, IsInterlaced: False, IsAVC: False, ChannelLayout: "stereo", BitRate: 192000, 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: "LC", Type: Audio, 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 }], MediaAttachments: [], Formats: [], Bitrate: 8192000, Timestamp: null, RequiredHttpHeaders: [("User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36")], TranscodingUrl: null, TranscodingSubProtocol: http, TranscodingContainer: null, AnalyzeDurationMs: 3000, TranscodeReasons: 0, DefaultAudioStreamIndex: null, DefaultSubtitleStreamIndex: null, VideoStream: MediaStream { Codec: "h264", CodecTag: null, Language: null, 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/90000", CodecTimeBase: null, Title: null, VideoRange: SDR, VideoRangeType: SDR, VideoDoViTitle: null, AudioSpatialFormat: None, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, LocalizedHearingImpaired: null, DisplayTitle: "720p H264 SDR", NalLengthSize: "0", IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: 8, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, IsHearingImpaired: False, Height: 720, Width: 1280, AverageFrameRate: 30, RealFrameRate: 30, Profile: "High", Type: Video, AspectRatio: "16:9", Index: -1, Score: null, IsExternal: False, DeliveryMethod: null, DeliveryUrl: null, IsExternalUrl: null, IsTextSubtitleStream: False, SupportsExternalStream: False, Path: null, PixelFormat: "yuv420p", Level: 41, IsAnamorphic: False } }
[2024-06-12 12:27:22.952 -07:00] [INF] [54] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "frametv". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-06-12 12:27:23.462 -07:00] [INF] [68] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 3000000 -probesize 1G -user_agent \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36\" -fflags +igndts -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i \"https://cbcrclinear-tor.akamaized.net/hls/live/2042768/CBCRCLINEAR_TOR_14/master5.m3u8\" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 h264_qsv -preset veryfast -look_ahead 0 -b:v 8000000 -maxrate 8000000 -bufsize 16000000 -profile:v:0 high -level 41 -g:v:0 90 -keyint_min:v:0 90 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=w=640:h=360:format=nv12:extra_hw_frames=24,hwmap=derive_device=qsv,format=qsv\" -flags -global_header -codec:a:0 libfdk_aac -ac 2 -ab 192000 -ar 48000 -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_base_url \"hls/728fca97e41e41e2ed8c082347bf3d05/\" -hls_segment_filename \"/config/data/transcodes/728fca97e41e41e2ed8c082347bf3d05%d.ts\" -hls_playlist_type event -hls_list_size 0 -y \"/config/data/transcodes/728fca97e41e41e2ed8c082347bf3d05.m3u8\""
[2024-06-12 12:27:28.612 -07:00] [INF] [62] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Adding playback tracker : TW96aWxsYS81LjAgKFNNQVJULVRWOyBMSU5VWDsgVGl6ZW4gNi41KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSA4NS4wLjQxODMuOTMvNi41IFRWIFNhZmFyaS81MzcuMzZ8MTcxNzc4NTEzOTkwMA11-5d075d5dbfe94e88b6913c707c3aea72-1b0f5e0ab4663aeabaf2b38e4d4c88bc
[2024-06-12 12:27:28.612 -07:00] [INF] [62] Jellyfin.Plugin.PlaybackReporting.Data.PlaybackTracker: PlaybackTracker : Adding Start Event : 06/12/2024 12:27:28
[2024-06-12 12:27:28.612 -07:00] [INF] [62] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Creating StartPlaybackTimer Task
[2024-06-12 12:27:28.612 -07:00] [INF] [68] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : Entered
[2024-06-12 12:27:28.714 -07:00] [INF] [54] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "TW96aWxsYS81LjAgKFNNQVJULVRWOyBMSU5VWDsgVGl6ZW4gNi41KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSA4NS4wLjQxODMuOTMvNi41IFRWIFNhZmFyaS81MzcuMzZ8MTcxNzc4NTEzOTkwMA11-5d075d5dbfe94e88b6913c707c3aea72-1b0f5e0ab4663aeabaf2b38e4d4c88bc"