jellyfin-androidtv icon indicating copy to clipboard operation
jellyfin-androidtv copied to clipboard

Won't direct play MPEG-TS

Open williamthrilliam opened this issue 11 months ago • 5 comments

Describe the bug

Moving from a different repo:

Live tv is using HDHomeRun FLEX 4K works pretty well, but it won't direct play to my nvidia Shield (android). Audio is a direct pass-through but it complains that the TranscodeReason=ContainerNotSupported even though Mpeg2 is supported on my device. The android client has direct stream live tv (transcoding is disabled) option under preferences > playback > live tv and bitstream for dolby digital and dts selected. I'm also using the ExoPlayer, the libvlc player just fails to direct stream and then both the video and audio are transcoded. Below are the logs when trying to play with ExoPlayer.

Logs


server logs

[2024-02-24 10:42:54.757 -06:00] [INF] Opening channel stream from "Emby", external channel Id: "hdhr_7.1" [2024-02-24 10:42:54.757 -06:00] [INF] Streaming Channel "hdhr_7.1" [2024-02-24 10:42:54.758 -06:00] [INF] GetChannelStream: channel id: "hdhr_7.1". stream id: "native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2" profile: "native" [2024-02-24 10:42:54.758 -06:00] [INF] Opening "SharedHttpStream" Live stream from "http://192.168.87.81:5004/auto/v7.1" [2024-02-24 10:42:55.023 -06:00] [INF] Beginning "SharedHttpStream" stream to "/var/lib/jellyfin/transcodes/138a6f65a18842f28bd830c4de563d2a.ts" [2024-02-24 10:42:55.023 -06:00] [INF] Live stream opened after 265.2611ms [2024-02-24 10:42:55.023 -06:00] [INF] Returning mediasource streamId "native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2", mediaSource.Id "native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2", mediaSource.LiveStreamId null [2024-02-24 10:42:55.023 -06:00] [INF] Live tv media info probe took "0.0002348" seconds [2024-02-24 10:42:55.024 -06:00] [INF] Live stream opened: MediaSourceInfo { Protocol: Http, Id: "native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2", Path: "http://192.168.87.128:8096/LiveTv/LiveStreamFiles/138a6f65a18842f28bd830c4de563d2a/stream.ts", EncoderPath: null, EncoderProtocol: null, Type: Default, Container: "mpegts", Size: null, Name: null, IsRemote: False, ETag: null, RunTimeTicks: null, ReadAtNativeFramerate: False, IgnoreDts: True, IgnoreIndex: False, GenPtsInput: False, SupportsTranscoding: True, SupportsDirectStream: True, SupportsDirectPlay: False, IsInfiniteStream: True, RequiresOpening: True, OpenToken: null, RequiresClosing: True, LiveStreamId: "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2", BufferMs: 0, RequiresLooping: False, SupportsProbing: True, VideoType: null, IsoType: null, Video3DFormat: null, MediaStreams: [MediaStream { Codec: "mpeg2video", CodecTag: null, Language: null, ColorRange: "tv", 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, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "720p MPEG2VIDEO SDR", NalLengthSize: null, IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: 8, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, Height: 720, Width: 1280, AverageFrameRate: 59.94006, RealFrameRate: 59.94006, Profile: "Main", 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: 4, IsAnamorphic: False }, MediaStream { Codec: "ac3", CodecTag: "AC-3", 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: null, VideoRangeType: null, VideoDoViTitle: null, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "Dolby Digital - 5.1", NalLengthSize: null, IsInterlaced: False, IsAVC: null, ChannelLayout: "5.1", BitRate: 384000, BitDepth: null, RefFrames: null, PacketLength: null, Channels: 6, SampleRate: 48000, IsDefault: False, IsForced: False, Height: null, Width: null, AverageFrameRate: null, RealFrameRate: null, Profile: null, 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: 8384000, Timestamp: null, RequiredHttpHeaders: [], TranscodingUrl: null, TranscodingSubProtocol: null, TranscodingContainer: null, AnalyzeDurationMs: 3000, TranscodeReasons: 0, DefaultAudioStreamIndex: null, DefaultSubtitleStreamIndex: null, VideoStream: MediaStream { Codec: "mpeg2video", CodecTag: null, Language: null, ColorRange: "tv", 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, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "720p MPEG2VIDEO SDR", NalLengthSize: null, IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: 8, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, Height: 720, Width: 1280, AverageFrameRate: 59.94006, RealFrameRate: 59.94006, Profile: "Main", 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: 4, IsAnamorphic: False } } [2024-02-24 10:42:55.024 -06:00] [INF] User policy for "williamthrilliam". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-02-24 10:42:55.024 -06:00] [INF] StreamBuilder.BuildVideoItem( Profile="AndroidTV-ExoPlayer", Path="http://192.168.87.128:8096/LiveTv/LiveStreamFiles/138a6f65a18842f28bd830c4de563d2a/stream.ts", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerNotSupported ) "media:/videos/8ceacd18-fa9b-b535-2fef-8e0fa5a71d9e/master.m3u8?MediaSourceId=native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2&VideoCodec=hevc,h264&AudioCodec=ac3&AudioStreamIndex=-1&VideoBitrate=119616000&AudioBitrate=384000&AudioSampleRate=48000&MaxFramerate=59.94006&api_key=&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2&RequireAvc=false&SegmentContainer=ts&BreakOnNonKeyFrames=False&mpeg2video-level=4&mpeg2video-videobitdepth=8&mpeg2video-profile=main&mpeg2video-audiochannels=6&aac-audiochannels=8&TranscodeReasons=ContainerNotSupported" [2024-02-24 10:42:55.125 -06:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 3000000 -fflags +igndts -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -c:v mpeg2_qsv -autorotate 0 -i "http://192.168.87.128:8096/LiveTv/LiveStreamFiles/138a6f65a18842f28bd830c4de563d2a/stream.ts" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 hevc_qsv -tag:v:0 hvc1 -low_power 1 -preset veryslow -b:v 8000000 -maxrate 8000000 -bufsize 16000000 -g:v:0 180 -keyint_min:v:0 180 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_qsv=format=nv12" -flags -global_header -codec:a:0 copy -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/4ed744727a722ec7bdc761721a7b3acb/" -hls_segment_filename "/var/lib/jellyfin/transcodes/4ed744727a722ec7bdc761721a7b3acb%d.ts" -hls_playlist_type event -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/4ed744727a722ec7bdc761721a7b3acb.m3u8"" [2024-02-24 10:43:05.680 -06:00] [WRN] Slow HTTP Response from "http://192.168.87.128:8096/videos/8ceacd18-fa9b-b535-2fef-8e0fa5a71d9e/live.m3u8?DeviceId=ffbfa6ce19bb40e377a62c7ee80e73b82faafb27&MediaSourceId=native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2&VideoCodec=hevc,h264&AudioCodec=ac3&AudioStreamIndex=-1&VideoBitrate=119616000&AudioBitrate=384000&AudioSampleRate=48000&MaxFramerate=59.94006&PlaySessionId=9412babbfa424690813b2f811d146388&api_key=b508c110a5a941b2bf69e6453db0699e&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2&RequireAvc=false&SegmentContainer=ts&BreakOnNonKeyFrames=False&mpeg2video-level=4&mpeg2video-videobitdepth=8&mpeg2video-profile=main&mpeg2video-audiochannels=6&aac-audiochannels=8&TranscodeReasons=ContainerNotSupported" to "192.168.87.49" in 0:00:10.5574749 with Status Code 200


fffmpeg logs

/videos/8ceacd18-fa9b-b535-2fef-8e0fa5a71d9e/live.m3u8

{"Protocol":1,"Id":"native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2","Path":"http://192.168.87.128:8096/LiveTv/LiveStreamFiles/138a6f65a18842f28bd830c4de563d2a/stream.ts","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mpegts","Size":null,"Name":null,"IsRemote":false,"ETag":null,"RunTimeTicks":null,"ReadAtNativeFramerate":false,"IgnoreDts":true,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":false,"IsInfiniteStream":true,"RequiresOpening":true,"OpenToken":null,"RequiresClosing":true,"LiveStreamId":"a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_9098a73d5f0a41a094a99f31435d5a51_9bd74ef4e6a5237225e66a53427f8dd2","BufferMs":0,"RequiresLooping":false,"SupportsProbing":true,"VideoType":null,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg2video","CodecTag":null,"Language":null,"ColorRange":"tv","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,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"720p MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":8000000,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":720,"Width":1280,"AverageFrameRate":59.94006,"RealFrameRate":59.94006,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":-1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":4,"IsAnamorphic":false},{"Codec":"ac3","CodecTag":"AC-3","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":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"Dolby Digital - 5.1","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":384000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":false,"IsForced":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}],"MediaAttachments":[],"Formats":[],"Bitrate":8384000,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":3000,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 3000000 -fflags +igndts -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -c:v mpeg2_qsv -autorotate 0 -i "http://192.168.87.128:8096/LiveTv/LiveStreamFiles/138a6f65a18842f28bd830c4de563d2a/stream.ts" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 hevc_qsv -tag:v:0 hvc1 -low_power 1 -preset veryslow -b:v 8000000 -maxrate 8000000 -bufsize 16000000 -g:v:0 180 -keyint_min:v:0 180 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_qsv=format=nv12" -flags -global_header -codec:a:0 copy -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/4ed744727a722ec7bdc761721a7b3acb/" -hls_segment_filename "/var/lib/jellyfin/transcodes/4ed744727a722ec7bdc761721a7b3acb%d.ts" -hls_playlist_type event -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/4ed744727a722ec7bdc761721a7b3acb.m3u8"

ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12 (Ubuntu 12.3.0-1ubuntu1~23.04) configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --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 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 libva info: VA-API version 1.20.0 libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_20 libva info: va_openDriver() returns 0 libva info: VA-API version 1.20.0 libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_20 libva info: va_openDriver() returns 0 [mpeg2video @ 0x555a09fe80c0] Invalid frame dimensions 0x0. Last message repeated 45 times Input #0, mpegts, from 'http://192.168.87.128:8096/LiveTv/LiveStreamFiles/138a6f65a18842f28bd830c4de563d2a/stream.ts': Duration: N/A, start: 35535.586867, bitrate: N/A Program 1 Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn Side data: cpb: bitrate max/min/avg: 17588800/0/0 buffer size: 7995392 vbv_delay: N/A Stream #0:1[0x34]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s Stream #0:2[0x35]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, fltp, 96 kb/s Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> hevc (hevc_qsv)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [mpeg2_qsv @ 0x555a0a337fc0] More data is required to decode header Last message repeated 45 times Output #0, hls, to '/var/lib/jellyfin/transcodes/4ed744727a722ec7bdc761721a7b3acb.m3u8': Metadata: encoder : Lavf60.3.100 Stream #0:0: Video: hevc (hvc1 / 0x31637668), qsv(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 8000 kb/s, 59.94 fps, 90k tbn Metadata: encoder : Lavc60.3.100 hevc_qsv Side data: cpb: bitrate max/min/avg: 8000000/0/8000000 buffer size: 16000000 vbv_delay: N/A Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s frame= 0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed= 0x
frame= 180 fps=0.0 q=-0.0 size=N/A time=00:00:02.88 bitrate=N/A speed=5.04x
frame= 209 fps=192 q=-0.0 size=N/A time=00:00:03.42 bitrate=N/A speed=3.14x
[hls @ 0x555a0a364f00] Opening '/var/lib/jellyfin/transcodes/4ed744727a722ec7bdc761721a7b3acb0.ts' for writing [hls @ 0x555a0a364f00] Opening '/var/lib/jellyfin/transcodes/4ed744727a722ec7bdc761721a7b3acb.m3u8.tmp' for writing

Application version

0.16.5

Where did you install the app from?

Google Play

Device information

Nvidia Shield

Android version

11

Jellyfin server version

10.8.13

williamthrilliam avatar Mar 03 '24 01:03 williamthrilliam

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

jellyfin-bot avatar Jul 02 '24 03:07 jellyfin-bot

Still a bug, please keep this open.

williamthrilliam avatar Jul 13 '24 21:07 williamthrilliam