Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.17.x fire TV 1st gen HEVC support claimed but unsupported? #3842

Closed
PriceChild opened this issue Aug 5, 2024 · 12 comments · Fixed by #3875
Closed

0.17.x fire TV 1st gen HEVC support claimed but unsupported? #3842

PriceChild opened this issue Aug 5, 2024 · 12 comments · Fixed by #3875
Labels
bug Something isn't working playback Issue related to media playback

Comments

@PriceChild
Copy link
Contributor

Describe the bug

After updating to 0.17.0 I initially found the player refusing to start.
I noticed that my server was still configured to VAAPI and updated it to QSV. After that change, the 5.1 audio is passed through perfectly to my AVR but the screen is simply black with the usual playback controls. Modifying the Mbit/s makes no difference.

Transcoding works perfectly for my other clients.

Logs

NA

FFmpeg logs

{"Protocol":0,"Id":"6a6e1da37efc08046bb981ce264848c8","Path":"/media/media-library/TV/A TV Series/Season 1/A TV Series - S01E11 - An Episode Name Bluray-1080p.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":622407360,"Name":"A TV Series - S01E11 - An Episode Name Bluray-1080p","IsRemote":false,"ETag":"5d7c99ea7a2c3ef826622d0fabf30ab4","RunTimeTicks":25115199488,"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":"hevc","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/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 HEVC SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":1982567,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":1080,"Width":1920,"AverageFrameRate":23.809525,"RealFrameRate":23.809525,"Profile":"Main 10","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":120,"IsAnamorphic":null},{"Codec":"eac3","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":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":"Default","LocalizedForced":null,"LocalizedExternal":"External","LocalizedHearingImpaired":null,"DisplayTitle":"English - Dolby Digital\u002B - 5.1","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"5.1","BitRate":640000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"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":"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":"","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":2,"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":2622567,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -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 hevc_qsv -noautorotate -i file:"/media/media-library/TV/A TV Series/Season 1/A TV Series - S01E11 - An Episode Name Bluray-1080p.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:0 -codec:v:0 hevc_qsv -tag:v:0 hvc1 -low_power 1 -preset veryfast -b:v 4956418 -maxrate 4956418 -bufsize 9912836 -profile:v:0 none -level 40 -g:v:0 72 -keyint_min:v:0 72 -filter_complex "[0:2]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,format=bgra,hwupload=derive_device=qsv:extra_hw_frames=64[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_qsv=format=nv12[main];[main][sub]overlay_qsv=eof_action=pass:repeatlast=0:w=1920:h=1080" -start_at_zero -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_segment_filename "/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b.m3u8"


ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.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-libxml2 --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.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
Input #0, matroska,webm, from 'file:/media/media-library/TV/A TV Series/Season 1/A TV Series - S01E11 - An Episode Name Bluray-1080p.mkv':
  Metadata:
    encoder         : libebml v1.4.2 + libmatroska v1.6.4
    creation_time   : 2022-12-17T11:33:52.000000Z
  Duration: 00:41:51.52, start: 0.000000, bitrate: 1982 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 39.539000
      Metadata:
        title           : 00:00:00.000
    Chapter #0:1: start 39.539000, end 169.920000
      Metadata:
        title           : 00:00:39.539
    Chapter #0:2: start 169.920000, end 520.687000
      Metadata:
        title           : 00:02:49.920
    Chapter #0:3: start 520.687000, end 784.117000
      Metadata:
        title           : 00:08:40.687
    Chapter #0:4: start 784.117000, end 1082.790000
      Metadata:
        title           : 00:13:04.117
    Chapter #0:5: start 1082.790000, end 1216.841000
      Metadata:
        title           : 00:18:02.790
    Chapter #0:6: start 1216.841000, end 1463.253000
      Metadata:
        title           : 00:20:16.841
    Chapter #0:7: start 1463.253000, end 1687.060000
      Metadata:
        title           : 00:24:23.253
    Chapter #0:8: start 1687.060000, end 1926.341000
      Metadata:
        title           : 00:28:07.060
    Chapter #0:9: start 1926.341000, end 2133.923000
      Metadata:
        title           : 00:32:06.341
    Chapter #0:10: start 2133.923000, end 2284.616000
      Metadata:
        title           : 00:35:33.923
    Chapter #0:11: start 2284.616000, end 2511.520000
      Metadata:
        title           : 00:38:04.616
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 1920x1080, SAR 1:1 DAR 16:9, 23.81 fps, 23.81 tbr, 1k tbn (default)
  Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
  Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080 (default)
    Metadata:
      title           : 
Stream mapping:
  Stream #0:0 (hevc_qsv) -> setparams:default
  Stream #0:2 (pgssub) -> scale:default
  overlay_qsv:default -> Stream #0:0 (hevc_qsv)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska,webm @ 0x55b31483d1c0] sub2video: using 1920x1080 canvas
Output #0, hls, to '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b.m3u8':
  Metadata:
    encoder         : Lavf60.3.100
  Stream #0:0: Video: hevc (hvc1 / 0x31637668), qsv(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 4956 kb/s, 23.81 fps, 90k tbn
    Metadata:
      encoder         : Lavc60.3.100 hevc_qsv
    Side data:
      cpb: bitrate max/min/avg: 4956418/0/4956418 buffer size: 9912836 vbv_delay: N/A
  Stream #0:1: Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b0.ts' for writing
frame=  104 fps=0.0 q=-0.0 size=N/A time=00:00:04.64 bitrate=N/A speed=8.11x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b1.ts' for writing
frame=  211 fps=196 q=-0.0 size=N/A time=00:00:09.21 bitrate=N/A speed=8.58x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b2.ts' for writing
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b3.ts' for writing
frame=  326 fps=207 q=-0.0 size=N/A time=00:00:13.85 bitrate=N/A speed=8.79x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b4.ts' for writing
frame=  431 fps=207 q=-0.0 size=N/A time=00:00:18.36 bitrate=N/A dup=0 drop=1 speed=8.83x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b5.ts' for writing
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b6.ts' for writing
frame=  546 fps=211 q=-0.0 size=N/A time=00:00:23.13 bitrate=N/A dup=0 drop=2 speed=8.96x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b7.ts' for writing
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b8.ts' for writing
frame=  653 fps=212 q=-0.0 size=N/A time=00:00:27.77 bitrate=N/A dup=0 drop=3 speed=9.01x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b9.ts' for writing
frame=  760 fps=212 q=-0.0 size=N/A time=00:00:32.03 bitrate=N/A dup=0 drop=3 speed=8.93x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b10.ts' for writing
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b11.ts' for writing
frame=  877 fps=214 q=-0.0 size=N/A time=00:00:36.92 bitrate=N/A dup=0 drop=4 speed=9.03x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b12.ts' for writing
frame=  992 fps=216 q=-0.0 size=N/A time=00:00:41.95 bitrate=N/A dup=0 drop=5 speed=9.14x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b13.ts' for writing
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b14.ts' for writing
frame= 1095 fps=215 q=-0.0 size=N/A time=00:00:46.20 bitrate=N/A dup=0 drop=6 speed=9.07x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b15.ts' for writing
frame= 1204 fps=215 q=-0.0 size=N/A time=00:00:50.78 bitrate=N/A dup=0 drop=6 speed=9.07x    
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b16.ts' for writing
[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b17.ts' for writing
frame= 1314 fps=215 q=-0.0 size=N/A time=00:00:55.42 bitrate=N/A dup=0 drop=7 speed=9.08x    

[q] command received. Exiting.

[hls @ 0x55b315173600] Opening '/var/lib/jellyfin/transcodes/9843cb74a2b3f01688c64083535a5a4b18.ts' for writing
frame= 1336 fps=216 q=-0.0 Lsize=N/A time=00:00:55.93 bitrate=N/A dup=0 drop=7 speed=9.02x    
video:33644kB audio:4410kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Media info of the file

Video
Title: 1080p HEVC SDR
Codec: HEVC
Profile: Main 10
Level: 120
Resolution: 1920x1080
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.809525
Bitrate: 1982 kbps
Bit depth: 10 bit
Video range: SDR
Video range type: SDR
Pixel format: yuv420p10le
Ref frames: 1


Subtitle
Title: English - Default - PGSSUB
Language: eng
Codec: PGSSUB
Default: Yes
Forced: No
External: No


Audio
Title: English - Dolby Digital+ - 5.1
Language: eng
Codec: EAC3
Layout: 5.1
Channels: 6 ch
Bitrate: 640 kbps
Sample rate: 48000 Hz
Default: No
Forced: No
External: No

Application version

0.17.0

Device information

1st-Gen Fire TV (CL1130)

Android version

Fire OS 5.2.7.4 (656639420)

Jellyfin server version

10.9.8

@PriceChild PriceChild added bug Something isn't working playback Issue related to media playback labels Aug 5, 2024
@PriceChild
Copy link
Contributor Author

PriceChild commented Aug 5, 2024

(I noticed on #1057 under "🔄 Restoring features" that " Support transcoding/remuxing" is not ticked... is transcoding simply not supported on 0.17.0?)

Edit: My mistake... that 0.17.0 doesn't include that rewrite,

@PriceChild
Copy link
Contributor Author

I've also noticed the timestamp skips (despite the audio being perfect) incase that's a useful clue...

It reliably goes 00:00, 00:02, 00:05, 00:08, 00:11 ...

@PriceChild
Copy link
Contributor Author

I just found some other media which direct plays but skips... 1 frame every few seconds...

I believe this media worked correctly on the previous fire tv 0.16 release:

Video
Title: 1080p H264 SDR
Codec: H264
AVC: Yes
Profile: Main
Level: 40
Resolution: 1920x1080
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.976025
Bitrate: 5450 kbps
Bit depth: 8 bit
Video range: SDR
Video range type: SDR
Pixel format: yuv420p
Ref frames: 1
NAL: 4

@PriceChild
Copy link
Contributor Author

Going back to the original video... unchecking "Allow encoding in HEVC format" & "Allow encoding in AV1 format" on the server (and so defaulting to h264?) slightly changes the result:

The audio still works fine, but after ~5 seconds I see a single image frame which then skips to a new frame each few seconds...

@molotch
Copy link

molotch commented Aug 6, 2024

Direct play media have the same issue, ffmpg just quits ([q] command received. Exiting.). Works fine from other clients. Updated to latest server version just to make sure, still same behaviour.

@PriceChild
Copy link
Contributor Author

Updated to 0.17.1 and see the same issues.

@PriceChild
Copy link
Contributor Author

PriceChild commented Aug 9, 2024

Seems something to do with HEVC.

The following media shows the same black screen symptoms while being transcoded
..

Video
Title: 1080p HEVC SDR
Codec: HEVC
AVC: No
Profile: Main 10
Level: 120
Resolution: 1920x1080
Aspect ratio: 16:9
Anamorphic: No
Interlaced: No
Framerate: 23.976025
Bitrate: 1916 kbps
Bit depth: 10 bit
Video range: SDR
Video range type: SDR
Pixel format: yuv420p10le
Ref frames: 1

... Until I deselect "Allow encoding in HEVC format" on the server after which the playback performs flawlessly.

(The media from my original post plays back with ~3s between frames with this configuration)

@PriceChild
Copy link
Contributor Author

https://developer.amazon.com/docs/fire-tv/device-specifications-comparison-table.html then points out that my fire TV 1st gen doesn't support HEVC/h265... which starts to explain the issue!

I'm guessing jellyfin is claiming HEVC support and the server obliges, leading to the failure scenarios above.

@PriceChild PriceChild changed the title 0.17.0 transcoded media black screen (Intel QSV server) 0.17.x fire TV 1st gen HEVC support claimed but unsupported? Aug 9, 2024
@PriceChild
Copy link
Contributor Author

PriceChild commented Aug 9, 2024

Curiouser and curiouser... I was playing around with my own build and forced supportsHevc() & supportsHevcMain10() to false. Noted *** Does NOT support HEVC logged and yet HEVC transcodes were still started. Noticed grepping logcat for "Video path set to" the parameter VideoCodec=hevc,h264,hevc in the .m38u request to the server.

I swapped back to the fire tv store build and noticed that *** Does NOT support HEVC is still logged by it when starting a stream... so the problem isn't with detection of whether HEVC is supported by the device - it looks to me like jellyfin-androidtv is still requesting a transcode to it even though it's detected correctly that it's not supported?!

Commenting out this line sees everything work correctly, with only h264 requested:
https://github.com/jellyfin/jellyfin-androidtv/blob/master/app/src/main/java/org/jellyfin/androidtv/util/profile/ExoPlayerProfile.kt#L79

if (deviceHevcCodecProfile.ContainsCodec(Codec.Video.HEVC, Codec.Container.TS)) add(Codec.Video.HEVC)

@PriceChild
Copy link
Contributor Author

PriceChild commented Aug 9, 2024

@nielsvanvelzen I'm struggling to follow the code at this point. It looks like the transcode url is created by the api client library?

I think this is a pretty solid lead though from my latest comment - that jellyfin-androidtv is correctly seeing the lack of HEVC support and logging as such. And yet a HEVC transcode is still requested of the server?

Please is there any chance you could give me a pointer to support debugging this further?

@PriceChild
Copy link
Contributor Author

Timber.i("joeTest1: ${deviceHevcCodecProfile.GetCodecs()} ${deviceHevcCodecProfile.GetContainers()}") in ExoPlayerProfile.kt shows hevc+ts is set, so there's nothing wrong with .ContainsCodec().

So now looking at ExoPlayerProfile.deviceHevcCodecProfile to understand why that's there, despite I/ProfileHelper(15256): *** Does NOT support HEVC being logged.

@PriceChild
Copy link
Contributor Author

PriceChild commented Aug 10, 2024

https://github.com/jellyfin/jellyfin-androidtv/compare/release-0.17.z...PriceChild:jellyfin-androidtv:fire-tv-1-disable-hevc?expand=1 implements a naughty disabling of hevc transcoding specifically for the 1st Gen Fire TV which isn't ideal...

Weirdly, although video is now transcoded perfectly with "downmix to stereo" checked, when asking for direct pass through of eac3, the audio is perfect 5.1 but video stutters.


Audio
Title: English - Dolby Digital+ - 5.1
Language: eng
Codec: EAC3
Layout: 5.1
Channels: 6 ch
Bitrate: 640 kbps
Sample rate: 48000 Hz
Default: No
Forced: No
External: No

On the contrary, AAC files are always being downmixed to stereo:


Audio
Title: AAC - 5.1 - Default
Codec: AAC
AVC: No
Profile: HE-AAC
Layout: 5.1
Channels: 6 ch
Bitrate: 193 kbps
Sample rate: 48000 Hz
Default: Yes
Forced: No
External: No

Given that this at least provides a path on 0.17.x to working picture+audio (Even if it's not the right way to fix it, and doesn't fix 5.1) I'll open a MR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working playback Issue related to media playback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants