vdatanet 1647 Posted yesterday at 10:47 AM Posted yesterday at 10:47 AM On Emby 4.9.5.0, requesting an audio HLS stream with fMP4 segments produces a correct playlist whose segments cannot be fetched. Every segment request — and the init segment — returns: HTTP 500 "Object reference not set to an instance of an object." The same request with TranscodingContainer=ts works. Same code, same token, same track; the only thing that changes is the container. GET /Audio/{itemId}/universal ?UserId={userId}&DeviceId={deviceId} &MaxStreamingBitrate=192000 &Container=mp3,aac,m4a,flac &AudioCodec=aac &TranscodingProtocol=hls &TranscodingContainer=mp4 <-- ts works, mp4 does not &MaxSampleRate=48000 &PlaySessionId={uuid} &api_key={token} Follow the master playlist to main.m3u8, then request either the #EXT-X-MAP init segment or any hls1/main/N.mp4, carrying the auth query params through as usual. Retried over several seconds in case it was a transcoder warm-up: it is not, the 500 is immediate and consistent. Worth saying plainly: the playlist itself is authored correctly — version 7, an EXT-X-MAP pointing at init.mp4, segment durations, the lot. Whatever is missing looks like it sits between the playlist writer and the segment handler. Two small things that might narrow it down, or might be irrelevant — you'll know which: The ts and mp4 playlists are generated from the same request and differ exactly as you'd expect (version 3 vs 7, EXT-X-MAP present only on the second), so playlist generation looks complete. The 500 is identical for init.mp4 and for every media segment, which suggests it's one path rather than a per-segment condition. That's the whole report. I'm not asking for a feature here — just flagging that a route the server advertises can't be followed. 1
vdatanet 1647 Posted 1 hour ago Author Posted 1 hour ago (edited) The 500 is not a transcoding failure — ffmpeg is never launched. The server log shows FfRunException wrapping a NullReferenceException from Emby.Server.MediaEncoding.Unified.Ffmpeg, with no ffmpeg log entry at all. So the null is dereferenced while assembling the run for fmp4 segments, before any process starts. And it looks specific to audio-only output. The same server, same version, same fMP4 container, but a movie instead of a track: Playlist Init First segment Video v7 + EXT-X-MAP 1,317 B 234,856 B Audio v7 + EXT-X-MAP 500 500 So fMP4 segments are served fine here — just not for an audio-only stream. Edited 1 hour ago by vdatanet
Luke 42840 Posted 1 hour ago Posted 1 hour ago Hi there, please attach the Emby server log from when the problem occurred: How to Report a Problem Thanks!
vdatanet 1647 Posted 1 hour ago Author Posted 1 hour ago 5 minutes ago, Luke said: Hi there, please attach the Emby server log from when the problem occurred: 2026-08-05 17:33:16.177 Info DynamicHlsService-0HNNIK2IOFT82:00000001: http/1.1 GET http://SERVER/Audio/2902/hls1/main/init.mp4?PlaySessionId=REDACTED&api_key=REDACTED. Source Ip: CLIENT,, Connection=close, Host=SERVER, User-Agent=REDACTED, Accept-Encoding=identity 2026-08-05 17:33:16.178 Info DynamicHlsService-0HNNIK2IOFT82:00000001: Starting transcoding because currentTranscodingIndex=null 2026-08-05 17:33:16.218 Error DynamicHlsService-0HNNIK2IOFT82:00000001: Error processing request *** Error Report *** Version: 4.9.5.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Linux version 6.8.0-137-generic (buildd@lcy02-amd64-064) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0, GNU ld (GNU Binutils for Ub OS/Process: x64/x64 Framework: .NET 8.0.25 Runtime: opt/emby-server/system/System.Private.CoreLib.dll Processor count: 6 Data path: /var/lib/emby Application path: /opt/emby-server/system Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunException: Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Emby.Server.MediaEncoding.Encoder.TranscodingCommandBuilder.HlsGetCommandLineArguments(String outputPath, StreamState state, Int32 startNumber, hls_playlist_typeEnum playlistType, String segmentListEntryPrefix, String segmentFileExtension) at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetCommandLineArguments(String outputPath, StreamState state) at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationToken cancellationToken, Boolean acquireResources) --- End of inner exception stack trace --- at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationToken cancellationToken, Boolean acquireResources) at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetDynamicSegment(StreamRequest request, String manifestAbsoluteUri, String playlistId, String segmentId, Int32 subtitleStreamIndex, AuthorizationInfo authorizationInfo) at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IServerApplicationHost appHost, IRequest httpReq, IResponse httpRes, IStreamHelper streamHelper, RestPath restPath, String responseContentType, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, RestPath restPath, String urlString, String localPath, String contentTypeInPath, CancellationToken cancellationToken) Source: Emby.Server.MediaEncoding TargetSite: Void MoveNext() InnerException: System.NullReferenceException: Object reference not set to an instance of an object. Source: Emby.Server.MediaEncoding TargetSite: Emby.Ffmpeg.Model.FfmpegCommand HlsGetCommandLineArguments(System.String, Emby.Server.MediaEncoding.Api.StreamState, Int32, hls_playlist_typeEnum, System.String, System.String) at Emby.Server.MediaEncoding.Encoder.TranscodingCommandBuilder.HlsGetCommandLineArguments(String outputPath, StreamState state, Int32 startNumber, hls_playlist_typeEnum playlistType, String segmentListEntryPrefix, String segmentFileExtension) at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetCommandLineArguments(String outputPath, StreamState state) at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationToken cancellationToken, Boolean acquireResources) 2026-08-05 17:33:16.218 Info DynamicHlsService-0HNNIK2IOFT82:00000001: http/1.1 Response 500 to CLIENT. Time: 41ms. GET http://SERVER/Audio/2902/hls1/main/init.mp4?PlaySessionId=REDACTED&api_key=REDACTED. Headers: Connection=close, Content-Type=text/plain, Date=Wed, 05 Aug 2026 17:33:15 GMT, Server=UPnP/1.0 DLNADOC/1.50, Content-Length=57, Cross-Origin-Resource-Policy=cross-origin, Private-Network-Access-Name=REDACTED, Private-Network-Access-Id=REDACTED
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now