Support BDMV file playback from Emby/Jellyfin

For BDMV folders on Jellyfin 10.8.5, it plays fine on Jellyfin web, but on Infuse it will show a file not found error.

I have done some research on this problem and here’s what I found, hopefully this can help fix the problem from Infuse’s side.

My BDMV movie folder structure

- source
  - blurays
    - MyBlurayMovie
        - BDMV
          - STREAM
            - 0000.m2ts
            - .....m2ts
          - ...
          - ...
          - index.bdmv
       - disc.inf

(1) When playing on jellyfin web, the logs are the following:

[20:59:57] [INF] [54] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for XX. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[20:59:57] [INF] [54] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/source/blurays/MyBlurayMovie, AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=Transcode, TranscodeReason=AudioCodecNotSupported ) media:/videos/313527e1-413d-03e4-6499-5baa56c528c1/master.m3u8?MediaSourceId=313527e1413d03e464995baa56c528c1&VideoCodec=h264,h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=139616000&AudioBitrate=384000&MaxFramerate=23.976025&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=543b6ca4c9f21c87d81daf7a932499c0&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&h264-level=41&h264-videobitdepth=8&h264-profile=high&h264-rangetype=SDR&h264-deinterlace=true&TranscodeReasons=AudioCodecNotSupported
[20:59:57] [INF] [3] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[20:59:57] [INF] [3] Jellyfin.Api.Helpers.TranscodingJobHelper: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -fflags +genpts  -i bluray:"/source/blurays/MyBlurayMovie" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 384000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 6 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/transcode/ec3ba1be9622f5b5b8823fc1184941d2%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/transcode/ec3ba1be9622f5b5b8823fc1184941d2.m3u8"

As expected, it is being transcoded. ffmpeg supports a bluray protocol, so jellyfin is giving ffmpeg the root folder path -i bluray:"/source/blurays/MyBlurayMovie".

(2) When playing the same movie on infuse (via the Jellyfin source):

[21:07:42] [ERR] [59] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Could not find file '/source/blurays/MyBlurayMovie'. URL GET /Videos/313527e1413d03e464995baa56c528c1/stream.

Although it seems like a jellyfin problem, I’m wondering if it could in fact be an Infuse problem, since from jellyfin API documentation, there is a enableMpegtsM2TsMode flag specially designed for m2ts mode. Not sure if Infuse is correctly setting this mode to true for bluray movies when doing the API call.

Let me know what I can do to further help debug this, or if you think this is indeed a problem on Jellyfin. :smiley:

我也遇到这个问题

Mod Edit Translation:

I also have this problem

As far as I know, Infuse does not support anything transcoding related atm.

Ah, sorry for the confusion. I used Jellyfin Web simply as an example to show how Jellyfin Web handles the bluray folder. I don’t think it using transcoding affects the problem.

Infuse can handle (1) normal videos (e.g., mkv files, or even bluray iso files) from Jellyfin, and (2) bluray folder from samba mount, both without transcoding. It’s just the bluray folder from Jellyfin that’s causing issues for Infuse, and I suspect it’s because Infuse is not making the right API calls to Jellyfin.

Thought I would try a movie using BDMV (I’m connected through Emby server). When added, it shows up correctly in the Infuse library but when I try to play the movie, it starts to load, then get the message “An error occurred. An error occurred loading this content.”

Any idea why? Thanks again!

BDMV file support from Emby/Jellyfin requires special handling.

Moving to suggestions for the moment.