Jump to content

My plugin stopped working after server update 4.3.1.0 => 4.4.3.0


ZR1000A1

Recommended Posts

Unfortunately I don't know enough about your plugin to answer that. Is source code available?

Link to comment
Share on other sites

ZR1000A1

Ok. Last attempt to get it fixed. Here's FFMPEG call that your core code generates when called from strm file:

c:\Users\****\AppData\Roaming\Emby-Server\system\ffmpeg.exe -loglevel +timing -y -print_graphs_file "c:\Users\****\AppData\Roaming\Emby-Server\programdata\logs\ffmpeg-directstream-117f9963-1f4f-40de-9854-7c60f328cc95_1graph.txt" -copyts -start_at_zero -f hls -noaccurate_seek -c:v:0 h264 -i "https://****/5600_complete-trimmed.m3u8" -map 0:0 -map 0:1 -sn -c:v:0 copy -c:a:0 copy -disposition:a:0 default -copypriorss:a:0 0 -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "c:\Users\****\AppData\Roaming\Emby-Server\programdata\transcoding-temp\957212.m3u8" -segment_list_type m3u8 -segment_time 6 -segment_start_number 0 -break_non_keyframes 1 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "c:\Users\****\AppData\Roaming\Emby-Server\programdata\transcoding-temp\957212_%d.ts"

I can run it from command prompt and it works fine.

This is FFMPEG call (same URL) that your core code generates when called from the plugin:

c:\Users\****\AppData\Roaming\Emby-Server\system\ffmpeg.exe -loglevel +timing -y -print_graphs_file "c:\Users\****\AppData\Roaming\Emby-Server\programdata\logs\ffmpeg-transcode-e1209f78-e41c-47be-938d-dc75b396b3fe_1graph.txt" -copyts -start_at_zero -f hls -i "https://****/5600_complete-trimmed.m3u8" -vn -an -sn -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "c:\Users\****\AppData\Roaming\Emby-Server\programdata\transcoding-temp\5ED90F.m3u8" -segment_list_type m3u8 -segment_time 3 -segment_list_entry_prefix hls/5ED90F/ -segment_start_number 0 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "c:\Users\****\AppData\Roaming\Emby-Server\programdata\transcoding-temp\5ED90F_%d.ts"

This doesn't work even in command prompt. The error is: "Output file #0 does not contain any stream". Do you see -vn -an -sn in the last command? That means disable video, audio and subtitle stream. Obviously, FFMPEG will say there are no streams!

I don't know what other information I can provide... Any more or less professional software developer should be able to fix this easily. Here's the call from the plugin that sends URL to play:

        #region IRequiresMediaInfoCallback
        public async Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken)
        {
                .....
                return new List<MediaSourceInfo>
                {
                    new MediaSourceInfo
                    {
                        Path = Feed.FullUrl(i, f),
                        Protocol = MediaProtocol.Http,
                        Name = id,
                        Id = id,
                        Bitrate = f.Bitrate

                    }
                };

               ...............
        }
        #endregion
 

Should the plugin specify some other info in MediaSourceInfo? Note, that in v4.3.1.0 this code worked perfectly

Thanks

Edited by ZR1000A1
Link to comment
Share on other sites

  • 1 month later...
ZR1000A1

Updated to 4.6.2. Still does not work. Do I get it right that nobody just cares to fix this bug???

Link to comment
Share on other sites

  • 4 weeks later...

Unpopular opinion- welcome to (coding plugins for) Emby. Expect some part of Emby itself your plugin to break frequently, often with no warning, and for an extended amount of time. The 3.x to 4.x upgrade was especially rough for me as it required a complete rewrite of my own plugin, with Github source code as the "documentation", to deal with Emby now pre-loading all remote content metadata instead of loading on-demand.

/Rant

 

I'm now running into the same issue with my own streaming plugin. Emby debug output has

-vn -an -sn

as well in its ffmpeg arguments. There's a head-shaped dent in my desk now.

 

@Luke My plugin is only broken when beginning playback from a Roku. Playback of the same video from the web UI is fine and does not result in an external call to ffmpeg.

Prior to Emby attempting playback to the Roku it logs the following after asking the Roku for it's functionality (via "Debug App: GetPostedPlaybackInfo request"). This may, or probably not, be related as the remote streaming site does not provide media bitrate info back. I'm going to build a test plugin with bogus bitrate values.

2021-06-23 22:21:39.165 Info App: Bitrate exceeds DirectPlay limit: media bitrate: 40000000, max bitrate: 35000000
2021-06-23 22:21:39.165 Info App: Bitrate exceeds DirectStream limit: media bitrate: 40000000, max bitrate: 35000000
2021-06-23 22:21:39.165 Info App: Bitrate exceeds DirectPlay limit: media bitrate: 40000000, max bitrate: 35000000
2021-06-23 22:21:39.165 Info App: Bitrate exceeds DirectStream limit: media bitrate: 40000000, max bitrate: 35000000

 

Logs from Emby when beginning playback. It will attempt to start playback several times, log output is the same as below, before giving up.

2021-06-23 22:21:40.110 Debug App: Starting transcoding because currentTranscodingIndex=null
2021-06-23 22:21:40.170 Info App: >> ThrottleBySegmentRequest: Initialize - TargetBufferSize: 120s
2021-06-23 22:21:40.171 Info App: ProcessRun 'StreamTranscode f2d4c0' Execute: /bin/ffmpeg -loglevel +timing -y -print_graphs_file "/config/logs/ffmpeg-transcode-f2d4c010-b52c-4121-bf82-90ed14cf1f9f_1graph.txt" -copyts -start_at_zero -f mov,mp4,m4a,3gp,3g2,mj2 -i "https://www.foo.bar/foobar/foobar.mp4?api=MYKEY" -vn -an -sn -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "/config/transcoding-temp/36AAA1.m3u8" -segment_list_type m3u8 -segment_time 3 -segment_start_number 0 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "/config/transcoding-temp/36AAA1_%d.ts"
2021-06-23 22:21:40.178 Debug App: ProcessRun 'StreamTranscode f2d4c0' Started.
2021-06-23 22:21:40.785 Info App: AppendExtraLogData - Read graph file: /config/logs/ffmpeg-transcode-f2d4c010-b52c-4121-bf82-90ed14cf1f9f_1graph.txt
2021-06-23 22:21:40.788 Info App: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 0
2021-06-23 22:21:40.789 Info App: AppendExtraLogData - File Deleted
2021-06-23 22:21:40.790 Info App: ProcessRun 'StreamTranscode f2d4c0' Process exited with code 1
2021-06-23 22:21:40.837 Error Server: Error processing request
        *** Error Report ***
        Version: 4.6.3.0
        Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
        Operating system: Linux version 3.10.0-1160.31.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Thu Jun 1
        Framework: .NET Core 3.1.13
        OS/Process: x64/x64
        Runtime: system/System.Private.CoreLib.dll
        Processor count: 8
        Data path: /config
        Application path: /system
        System.Exception: System.Exception: Error starting ffmpeg
           at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationTokenSource cancellationTokenSource, Boolean acquireResources)
           at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetDynamicSegment(StreamRequest request, String playlistId, String segmentId, Int32 subtitleStreamIndex)
           at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
           at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
           at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
        Source: Emby.Server.MediaEncoding
        TargetSite: Void MoveNext()
        
2021-06-23 22:21:40.838 Info Server: http/1.1 Response 500 to 172.29.110.69. Time: 734ms.

 

The plugin's channel item code (I removed all code within the block comment):

public async Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaInfo(string queryURL, CancellationToken cancellationToken)
{
  Plugin.DebugLogger("GetChannelItemMediaInfo");

  /*
  Code goes here to build playback URL
  */

  Plugin.DebugLogger("Playback URL is: " + vidPlaybackURL);

  return new List<MediaSourceInfo>
  {
    new ChannelMediaInfo
    {
      Path = vidPlaybackURL,
    }.ToMediaSource(),
  };
}

 

Link to comment
Share on other sites

billg

I've updated my own plugin to use the following in the returned MediaSourceInfo; the rest of the function remained identical. The remote side does not provide media bitrate or width/height.

return new List<MediaSourceInfo>
{
  new ChannelMediaInfo
  {
    Path = vidPlaybackURL,
    VideoBitrate = 300000,
    Protocol = Model.MediaInfo.MediaProtocol.Http,
    Width = 800,
    Height = 600,
    SupportsDirectPlay = false,
  }.ToMediaSource(),
};

 

This code continues to work in the web UI. This code continues to fail on the Rokus. I've tried with both a HLS and mp4 URL.

Emby server logs using a mp4 URL:

2021-06-30 20:44:15.914 Debug App: GetPostedPlaybackInfo request: {"Id":"879468","UserId":"2cd3e8c81a0a4278b11b2e619e359667","MaxStreamingBitrate":35000000,"StartTimeTicks":0,"DeviceProfile":{"Name":"Roku SG","SupportedMediaTypes":"Audio,Photo,Video","MaxStreamingBitrate":110000000,"MusicStreamingTranscodingBitrate":320000,"DirectPlayProfiles":[{"Container":"raw,wav,mp4,mka,m4a,mp2,mp3,wma,asf,flac,mka,m4a,ogg,mka,webm","Type":"Audio"},{"Container":"mp4,mov,m4v","AudioCodec":"lpcm,aac,mp2,mp3,wma,wmav2,alac,vorbis,ac3,eac3","VideoCodec":"h264,mpeg4,hevc,h265,mpeg2,mpeg2video","Type":"Video"},{"Container":"mkv,webm","AudioCodec":"lpcm,aac,mp2,mp3,wma,wmav2,flac,alac,vorbis,ac3,eac3","VideoCodec":"h264,mpeg4,hevc,h265,vp9,mpeg2,mpeg2video","Type":"Video"}],"TranscodingProfiles":[{"Container":"mp3","Type":"Audio","AudioCodec":"mp3","Protocol":"Http","EstimateContentLength":false,"EnableMpegtsM2TsMode":false,"TranscodeSeekInfo":"Auto","CopyTimestamps":false,"Context":"Streaming","MinSegments":0,"SegmentLength":0,"BreakOnNonKeyFrames":false,"AllowInterlacedVideoStreamCopy":false},{"Container":"ts","Type":"Video","VideoCodec":"h264,hevc,mpeg2video","AudioCodec":"ac3,aac,mp2,mp3,eac3,flac,vorbis,lpcm","Protocol":"Hls","EstimateContentLength":false,"EnableMpegtsM2TsMode":false,"TranscodeSeekInfo":"Auto","CopyTimestamps":false,"Context":"Streaming","MaxAudioChannels":"6","MinSegments":1,"SegmentLength":3,"BreakOnNonKeyFrames":true,"AllowInterlacedVideoStreamCopy":false,"ManifestSubtitles":"vtt"}],"ContainerProfiles":[{"Type":"Video","Conditions":[{"Condition":"Equals","Property":"NumVideoStreams","Value":"1","IsRequired":false}]}],"CodecProfiles":[{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"RefFrames","Value":"16","IsRequired":false},{"Condition":"LessThanEqual","Property":"VideoBitDepth","Value":"8","IsRequired":false},{"Condition":"LessThanEqual","Property":"Width","Value":"3840","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"2160","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"60","IsRequired":false},{"Condition":"EqualsAny","Property":"VideoProfile","Value":"high|main|baseline|constrained baseline","IsRequired":false},{"Condition":"LessThanEqual","Property":"VideoLevel","Value":"51","IsRequired":false}],"ApplyConditions":[],"Codec":"h264"},{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"Width","Value":"3840","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"2160","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"60","IsRequired":false}],"ApplyConditions":[],"Codec":"mpeg2"},{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"Width","Value":"3840","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"2160","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"60","IsRequired":false}],"ApplyConditions":[],"Codec":"mpeg2video"},{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"RefFrames","Value":"16","IsRequired":false},{"Condition":"LessThanEqual","Property":"VideoBitDepth","Value":"8","IsRequired":false},{"Condition":"LessThanEqual","Property":"Width","Value":"3840","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"2160","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"60","IsRequired":false},{"Condition":"NotEquals","Property":"VideoCodecTag","Value":"DX50","IsRequired":true},{"Condition":"NotEquals","Property":"VideoCodecTag","Value":"DIVX","IsRequired":true},{"Condition":"NotEquals","Property":"VideoCodecTag","Value":"XVID","IsRequired":true}],"ApplyConditions":[],"Codec":"mpeg4"},{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"Width","Value":"3840","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"2160","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"60","IsRequired":false}],"ApplyConditions":[],"Codec":"hevc"},{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"Width","Value":"3840","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"2160","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"30","IsRequired":false}],"ApplyConditions":[],"Codec":"vp9"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"aac"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"8","IsRequired":true}],"ApplyConditions":[],"Codec":"eac3"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"ac3"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"flac"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"alac"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"lpcm"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"wma"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"2","IsRequired":true}],"ApplyConditions":[],"Codec":"mp3"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"2","IsRequired":true}],"ApplyConditions":[],"Codec":"mp2"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"vorbis"}],"ResponseProfiles":[],"SubtitleProfiles":[{"Format":"vtt","Method":"Hls"},{"Format":"srt","Method":"External"},{"Format":"srt","Method":"Embed","Container":"MKV"},{"Format":"subrip","Method":"External"},{"Format":"subrip","Method":"Embed","Container":"MKV"},{"Format":"ass","Method":"External"},{"Format":"ass","Method":"Embed","Container":"MKV"},{"Format":"ssa","Method":"External"},{"Format":"ssa","Method":"Embed","Container":"MKV"}]},"EnableDirectPlay":true,"EnableDirectStream":true,"EnableTranscoding":true,"AllowInterlacedVideoStreamCopy":false,"AllowVideoStreamCopy":true,"AllowAudioStreamCopy":true,"IsPlayback":true,"AutoOpenLiveStream":false,"DirectPlayProtocols":["Http"]}
2021-06-30 20:44:16.879 Debug Plugin: [PLUGIN] : Playback URL is: https://REMOTE_SITE/videos/mp4/video.mp4?e=API_KEY
2021-06-30 20:44:16.901 Info App: User policy for USER. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
2021-06-30 20:44:16.929 Info App: Bitrate exceeds DirectPlay limit: media bitrate: 40000000, max bitrate: 35000000
2021-06-30 20:44:16.929 Info App: Bitrate exceeds DirectStream limit: media bitrate: 40000000, max bitrate: 35000000
2021-06-30 20:44:17.014 Info Server: http/1.1 Response 200 to LOCAL_IP. Time: 2141ms. http://LOCAL_EMBY_URL/emby/Items/879468/PlaybackInfo?UserId=2cd3e8c81a0a4278b11b2e619e359667&isplayback=true&maxstreamingbitrate=35000000&starttimeticks=00000000
2021-06-30 20:44:17.226 Info Server: http/1.1 GET http://LOCAL_EMBY_URL/emby/Items/879468/Images/Primary?maxHeight=350&tag=b3ad9b56738ea96d0e63669d3b62ffbf&EnableImageEnhancers=false. UserAgent: Roku/DVP-10.0 (10.0.0.4209-29)
2021-06-30 20:44:17.235 Info Server: http/1.1 Response 200 to LOCAL_IP. Time: 9ms. http://LOCAL_EMBY_URL/emby/Items/879468/Images/Primary?maxHeight=350&tag=b3ad9b56738ea96d0e63669d3b62ffbf&EnableImageEnhancers=false
2021-06-30 20:44:17.658 Info Server: http/1.1 GET http://LOCAL_EMBY_URL/emby/videos/879468/master.m3u8?DeviceId=3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4&MediaSourceId=5c4546580aadd5cd8e111bea74b7628e&PlaySessionId=9b07b3d901d94665ab36c234b4cc5788&VideoCodec=h264,hevc,mpeg2video&VideoBitrate=35000000&MaxFramerate=60&MaxWidth=3840&MaxHeight=2160&TranscodingMaxAudioChannels=6&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&eac3-audiochannels=6&ac3-audiochannels=6&flac-audiochannels=6&lpcm-audiochannels=6&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit. Connection=close, Accept=*/*, Accept-Encoding=deflate, gzip, Host=LOCAL_EMBY_URL, User-Agent=Roku/DVP-10.0 (10.0.0.4209-29), x-forwarded-port=443, x-forwarded-proto=https, x-forwarded-for=LOCAL_IP
2021-06-30 20:44:17.730 Debug App: Master playlist: 
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=42000000,AVERAGE-BANDWIDTH=35000000,VIDEO-RANGE=SDR,FRAME-RATE=60.000
main.m3u8?DeviceId=3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4&MediaSourceId=5c4546580aadd5cd8e111bea74b7628e&PlaySessionId=9b07b3d901d94665ab36c234b4cc5788&api_key=56bec8c2f0984637b776d9a310ca253f&VideoCodec=h264,hevc,mpeg2video&VideoBitrate=35000000&MaxFramerate=60&MaxWidth=3840&MaxHeight=2160&TranscodingMaxAudioChannels=6&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&eac3-audiochannels=6&ac3-audiochannels=6&flac-audiochannels=6&lpcm-audiochannels=6&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit

2021-06-30 20:44:17.734 Info Server: http/1.1 Response 200 to LOCAL_IP. Time: 73ms. http://LOCAL_EMBY_URL/emby/videos/879468/master.m3u8?DeviceId=3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4&MediaSourceId=5c4546580aadd5cd8e111bea74b7628e&PlaySessionId=9b07b3d901d94665ab36c234b4cc5788&VideoCodec=h264,hevc,mpeg2video&VideoBitrate=35000000&MaxFramerate=60&MaxWidth=3840&MaxHeight=2160&TranscodingMaxAudioChannels=6&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&eac3-audiochannels=6&ac3-audiochannels=6&flac-audiochannels=6&lpcm-audiochannels=6&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit
2021-06-30 20:44:17.747 Info Server: http/1.1 GET http://LOCAL_EMBY_URL/emby/videos/879468/main.m3u8?DeviceId=3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4&MediaSourceId=5c4546580aadd5cd8e111bea74b7628e&PlaySessionId=9b07b3d901d94665ab36c234b4cc5788&VideoCodec=h264,hevc,mpeg2video&VideoBitrate=35000000&MaxFramerate=60&MaxWidth=3840&MaxHeight=2160&TranscodingMaxAudioChannels=6&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&eac3-audiochannels=6&ac3-audiochannels=6&flac-audiochannels=6&lpcm-audiochannels=6&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit. Connection=close, Accept=*/*, Accept-Encoding=deflate, gzip, Host=LOCAL_EMBY_URL, User-Agent=Roku/DVP-10.0 (10.0.0.4209-29), x-forwarded-port=443, x-forwarded-proto=https, x-forwarded-for=LOCAL_IP
2021-06-30 20:44:17.763 Info Server: http/1.1 Response 200 to LOCAL_IP. Time: 17ms. http://LOCAL_EMBY_URL/emby/videos/879468/main.m3u8?DeviceId=3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4&MediaSourceId=5c4546580aadd5cd8e111bea74b7628e&PlaySessionId=9b07b3d901d94665ab36c234b4cc5788&VideoCodec=h264,hevc,mpeg2video&VideoBitrate=35000000&MaxFramerate=60&MaxWidth=3840&MaxHeight=2160&TranscodingMaxAudioChannels=6&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&eac3-audiochannels=6&ac3-audiochannels=6&flac-audiochannels=6&lpcm-audiochannels=6&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit
2021-06-30 20:44:17.783 Info Server: http/1.1 POST http://LOCAL_EMBY_URL/emby/Sessions/Playing. UserAgent: Roku/DVP-10.0 (10.0.0.4209-29)
2021-06-30 20:44:17.834 Info Server: http/1.1 GET http://LOCAL_EMBY_URL/emby/videos/879468/hls1/main/0.ts?DeviceId=3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4&MediaSourceId=5c4546580aadd5cd8e111bea74b7628e&PlaySessionId=9b07b3d901d94665ab36c234b4cc5788&VideoCodec=h264,hevc,mpeg2video&VideoBitrate=35000000&MaxFramerate=60&MaxWidth=3840&MaxHeight=2160&TranscodingMaxAudioChannels=6&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&eac3-audiochannels=6&ac3-audiochannels=6&flac-audiochannels=6&lpcm-audiochannels=6&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit. Connection=close, Accept=*/*, Host=LOCAL_EMBY_URL, User-Agent=Roku/DVP-10.0 (10.0.0.4209-29), x-forwarded-port=443, x-forwarded-proto=https, x-forwarded-for=LOCAL_IP
2021-06-30 20:44:17.844 Debug SqliteItemRepository: Public GetItemLinks
2021-06-30 20:44:17.847 Debug App: Starting transcoding because currentTranscodingIndex=null
2021-06-30 20:44:17.849 Info SessionManager: Playback start reported by app Roku SG 4.0.31 playing MEDIA_TITLE. Started at 0 ms
2021-06-30 20:44:17.859 Info Server: http/1.1 Response 204 to LOCAL_IP. Time: 76ms. http://LOCAL_EMBY_URL/emby/Sessions/Playing
2021-06-30 20:44:17.866 Info PlaybackReporting - EventMonitorEntryPoint: _sessionManager_PlaybackStart : Entered
2021-06-30 20:44:17.867 Info PlaybackReporting - EventMonitorEntryPoint: Adding PlaybackInfo to playback_trackers : 3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4-2cd3e8c81a0a4278b11b2e619e359667-879468
2021-06-30 20:44:17.870 Info PlaybackReporting - EventMonitorEntryPoint: Saving PlaybackInfo to DB
2021-06-30 20:44:17.896 Debug XmlSerializer: Deserializing file /config/config/webhooks.xml
2021-06-30 20:44:17.909 Debug XmlSerializer: Deserializing file /config/config/notifications.xml
2021-06-30 20:44:18.072 Info App: >> ThrottleBySegmentRequest: Initialize - TargetBufferSize: 120s
2021-06-30 20:44:18.096 Info App: ProcessRun 'StreamTranscode 10485b' Execute: /bin/ffmpeg -loglevel +timing -y -print_graphs_file "/config/logs/ffmpeg-transcode-10485b2a-3afb-4de5-a702-853509ce0191_1graph.txt" -copyts -start_at_zero -f mov,mp4,m4a,3gp,3g2,mj2 -i "https://REMOTE_SITE/videos/mp4/video.mp4?e=API_KEY" -vn -an -sn -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "/config/transcoding-temp/F66D5B.m3u8" -segment_list_type m3u8 -segment_time 3 -segment_start_number 0 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "/config/transcoding-temp/F66D5B_%d.ts"
2021-06-30 20:44:18.125 Debug App: ProcessRun 'StreamTranscode 10485b' Started.
2021-06-30 20:44:18.854 Info App: AppendExtraLogData - Read graph file: /config/logs/ffmpeg-transcode-10485b2a-3afb-4de5-a702-853509ce0191_1graph.txt
2021-06-30 20:44:18.879 Info App: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 0
2021-06-30 20:44:18.880 Info App: AppendExtraLogData - File Deleted
2021-06-30 20:44:18.893 Error Server: Error processing request
	*** Error Report ***
	Version: 4.6.3.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Linux version 3.10.0-1160.31.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Thu Jun 1
	Framework: .NET Core 3.1.13
	OS/Process: x64/x64
	Runtime: system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /config
	Application path: /system
	System.Exception: System.Exception: Error starting ffmpeg
	   at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationTokenSource cancellationTokenSource, Boolean acquireResources)
	   at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetDynamicSegment(StreamRequest request, String playlistId, String segmentId, Int32 subtitleStreamIndex)
	   at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: Emby.Server.MediaEncoding
	TargetSite: Void MoveNext()
	
2021-06-30 20:44:18.893 Info Server: http/1.1 Response 500 to LOCAL_IP. Time: 1059ms. http://LOCAL_EMBY_URL/emby/videos/879468/hls1/main/0.ts?DeviceId=3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4&MediaSourceId=5c4546580aadd5cd8e111bea74b7628e&PlaySessionId=9b07b3d901d94665ab36c234b4cc5788&VideoCodec=h264,hevc,mpeg2video&VideoBitrate=35000000&MaxFramerate=60&MaxWidth=3840&MaxHeight=2160&TranscodingMaxAudioChannels=6&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&eac3-audiochannels=6&ac3-audiochannels=6&flac-audiochannels=6&lpcm-audiochannels=6&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit

 

Here are the transcode logs from ffmpeg for that mp4 URL:

>> ThrottleBySegmentRequest: Initialize - TargetBufferSize: 120s
2021-06-30 20:44:18.077
Operating System: Linux version 3.10.0-1160.31.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Thu Jun 1
OS/Process: x64/x64
Emby Server version: 4.6.3.0
Operating system: Unix 3.10.0.1160
Command Line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3

App: Roku SG 4.0.31
MyRoku

http://LOCAL_EMBY_URL/emby/videos/879468/hls1/main/0.ts?DeviceId=3a3e2a6c-7647-5f9c-8bd7-a8dfd3b3cda4&MediaSourceId=5c4546580aadd5cd8e111bea74b7628e&PlaySessionId=9b07b3d901d94665ab36c234b4cc5788&api_key=56bec8c2f0984637b776d9a310ca253f&VideoCodec=h264,hevc,mpeg2video&VideoBitrate=35000000&MaxFramerate=60&MaxWidth=3840&MaxHeight=2160&TranscodingMaxAudioChannels=6&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&ManifestSubtitles=vtt&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&eac3-audiochannels=6&ac3-audiochannels=6&flac-audiochannels=6&lpcm-audiochannels=6&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=6&TranscodeReasons=ContainerBitrateExceedsLimit

{"Protocol":"Http","Id":"5c4546580aadd5cd8e111bea74b7628e","Path":"https://REMOTE_SITE/videos/mp4/video.mp4?e=API_KEY","Type":"Default","Name":"5c4546580aadd5cd8e111bea74b7628e","IsRemote":true,"RunTimeTicks":5400000000,"SupportsTranscoding":true,"SupportsDirectStream":false,"SupportsDirectPlay":false,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"RequiresLooping":false,"SupportsProbing":false,"MediaStreams":[],"Formats":[],"RequiredHttpHeaders":{},"ReadAtNativeFramerate":false}

>>>>>>  User policy for USER
        EnablePlaybackRemuxing: True
        EnableVideoPlaybackTranscoding: True
        EnableAudioPlaybackTranscoding: True

/bin/ffmpeg -loglevel +timing -y -print_graphs_file "/config/logs/ffmpeg-transcode-10485b2a-3afb-4de5-a702-853509ce0191_1graph.txt" -copyts -start_at_zero -f mov,mp4,m4a,3gp,3g2,mj2 -i "https://REMOTE_SITE/videos/mp4/video.mp4?e=API_KEY" -vn -an -sn -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "/config/transcoding-temp/F66D5B.m3u8" -segment_list_type m3u8 -segment_time 3 -segment_start_number 0 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "/config/transcoding-temp/F66D5B_%d.ts"

20:44:18.133 ffmpeg version 4.3.0-emby_2021_02_27 Copyright (c) 2000-2021 the FFmpeg developers and softworkz for Emby LLC
20:44:18.133   built with gcc 8.3.0 (crosstool-NG 1.24.0)
20:44:18.133 Execution Date: 2021-06-30 20:44:18
20:44:18.837 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://REMOTE_SITE/videos/mp4/video.mp4?e=API_KEY':
20:44:18.837   Metadata:
20:44:18.837     major_brand     : isom
20:44:18.837     minor_version   : 1
20:44:18.837     compatible_brands: isom
20:44:18.837     creation_time   : 2020-12-13T08:47:44.000000Z
20:44:18.837   Duration: 00:09:03.77, start: 0.000000, bitrate: 440 kb/s
20:44:18.837     Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 371 kb/s, Level 30, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc, Start-Time 0.023s (default)
20:44:18.837     Metadata:
20:44:18.837       handler_name    : VideoHandler
20:44:18.837     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 61 kb/s (default)
20:44:18.837     Metadata:
20:44:18.837       handler_name    : SoundHandler
20:44:18.838 Output #0, segment, to '/config/transcoding-temp/F66D5B_%d.ts':
20:44:18.838 Output file #0 does not contain any stream
20:44:18.841 

======= ExtraData
H4sIAAAAAAAAA61WWWvjSBD+L4LJk2QdtmQ7EJbMZDOYIcnCzvEwDKKkLsk924dQtxJlQ/77dutI7MjGszAGg1T9fXV1HXpyPkjOQRDn/Mm5pkxjrfYev/94dp2PTGbA7ipNpeiO+8evwBq0mCfnFjg6586j4zqd9G9dU1Eaia4bdJ7dF0Rl5Dota6i2Ki0owwnDz6UoaOkzWSq/KHiFpadrECqXBL0wWKziLAJvDkXmLQjGHiyDyFvF8zhY5xiE6zANO/0z3epd07msHrU66aHSUOsUdPov1vII2iZlI6pG99FfIW9arLvEIeimxkEXl/curxYuX4A7Lyvzj1z+MzJaB9znx8riRgWuczzJP55HoxtBsHXOg+H1r1pqmUs2Nb/VuprY2uectPgLt15MsnQs7i5xBoXAew0bddloeYX2bk3+CmAKXecGCYVP1Fal85USlCfcdHtUr9giPhh1+eDdl9tPt3ffbp0B1B1ZsfhHyAdhxBu1EabYGeRIXlx4zXGvdUje6M1GXWEBDdOvBHUt610Nl4x9hrJz0J7+2RobAthw/mwr7k30trb2g79sCD0dfIc6FXwHOhD84ThHw78hTiP9UrOhGtW579/bHHrbh1kr2tbLiZjlkvdS5Zuq8SM/88Fve4k9TKMMigAhhMJ0eQZxlCznJFiuljAPICfxzND+wIswieIwXCRxclbTizCIFme1uljFZ9uLIFovV0VQkCxOwgUU0TLGIp+vE1hDmJPEsX7eNfqlp28Od7TCkqPQk666Odm/rwOmV5EWsuagp71jBp7xYXciDQRG1RQ+jstxRBqpp5FX/nWSXMXvZ3zerI4pS7V1fuLAEYamfAqeH0L2I1Q0POtyss8IdhmmzKm55wZYukUwXZCaOMxWmNK6atqlPtRU4/9mjS72bJuooyP+14YfhzYlyGC6+uKg++1ah3tJSSqwBE3vjfnpNiJUQcZMe+2wpvN1rMIdEIcq5aiBgIYJ3gvfQvMtVN2GP

 

Are any other logs needed? Is there a change that needs to be implemented on the plugin side?

Link to comment
Share on other sites

  • 5 weeks later...
ZR1000A1

This company is a joke! I reported the bug over a year already! And nobody cares to look at it. How do they dare to ask people to pay for their product???

I lost my hopes with Emby few months ago and went for Plex. Glad I didn't waste any more time with this peace of junk...

  • Agree 1
Link to comment
Share on other sites

  • 5 months later...
ZR1000A1

If anyone's still interested, I gave it one more shot and the following changes made it work:

        #region IRequiresMediaInfoCallback
        public async Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken)
        {
                .....
                return new List<MediaSourceInfo>
                {
                    new MediaSourceInfo
                    {
                        Path = Feed.FullUrl(i, f),
                        Protocol = MediaProtocol.Http,
                        Name = id,
                        Id = id,
                        Bitrate = f.Bitrate,

                        MediaStreams = new List<MediaStream>() {
                            new MediaStream() {
                                Protocol = MediaProtocol.Http,
                                Index = 0,
                                Type = MediaStreamType.Video
                            },
                            new MediaStream() {
                                Protocol = MediaProtocol.Http,
                                Index = 1,
                                Type = MediaStreamType.Audio
                            }
                        }


                    }
                };

               ...............
        }
        #endregion

 

I wonder, if it was so hard for you Emby admins/devs/moderators to let us know that you modified the core and made MediaStreams property REQUIRED?????????? So much time wasted.....

Link to comment
Share on other sites

BillOatman
10 hours ago, ZR1000A1 said:

If anyone's still interested, I gave it one more shot and the following changes made it work:

        #region IRequiresMediaInfoCallback
        public async Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken)
        {
                .....
                return new List<MediaSourceInfo>
                {
                    new MediaSourceInfo
                    {
                        Path = Feed.FullUrl(i, f),
                        Protocol = MediaProtocol.Http,
                        Name = id,
                        Id = id,
                        Bitrate = f.Bitrate,

                        MediaStreams = new List<MediaStream>() {
                            new MediaStream() {
                                Protocol = MediaProtocol.Http,
                                Index = 0,
                                Type = MediaStreamType.Video
                            },
                            new MediaStream() {
                                Protocol = MediaProtocol.Http,
                                Index = 1,
                                Type = MediaStreamType.Audio
                            }
                        }


                    }
                };

               ...............
        }
        #endregion

 

I wonder, if it was so hard for you Emby admins/devs/moderators to let us know that you modified the core and made MediaStreams property REQUIRED?????????? So much time wasted.....

Thanks for posting back, I'm sure others in the same situation will benefit.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...