HawkXP71 112 Posted April 14, 2023 Posted April 14, 2023 Is there anywhere, where it is stored for analysis, a list of videos where the server transcoded them, and why? Meaning something along the lines of: XXX.mp4, eac7.1,aac5.1, audio codec not supported XXX.mkv, hevc, hevc, bitrate too high YYY.mkv, hevc, h264, video codec not supported, YYY.mkv, eac7.1, aac5.1, audio, codec not supported, The reason I ask, if I saw a pattern, where my clients were not supporting a particular audio or video format (im not talking in general, Im talking in specific to the clients who use my server) I could pre-transcode to supported formats. TIA Scott
Luke 42077 Posted April 14, 2023 Posted April 14, 2023 Hi, just the server ffmpeg log from when it happened.
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 15 minutes ago, Luke said: Hi, just the server ffmpeg log from when it happened. Is there any information in the ffmpeg log as to "why" its happening (I havent seen it, but I could easily be missing it.
Neminem 1518 Posted April 14, 2023 Posted April 14, 2023 You can see it in Under playback you can see what client and playback method. 1
Neminem 1518 Posted April 14, 2023 Posted April 14, 2023 It can also do custom query's but dont know how to do that.
GrimReaper 4739 Posted April 14, 2023 Posted April 14, 2023 (edited) 7 minutes ago, HawkXP71 said: Is there any information in the ffmpeg log as to "why" its happening (I havent seen it, but I could easily be missing it. There is always &TranscodeReasons noted in Playsession info section of the ffmpeg log, together with client capabilities. Edit: As in: App: Emby for Android 3.2.92 Abz Note 10+ http://10.0.0.10:8096/emby/videos/76307/stream.mkv?DeviceId=chromecast_1676542200512&MediaSourceId=1ed933f6dddb26d4303537175d079b6b&PlaySessionId=cdfded519da347b6b48fca73d376fb7a&api_key=ba71722b57fc4e829fdae4bd9fa1dd0e&VideoCodec=h264,h265,hevc,vp8,vp9&AudioCodec=ac3,aac,mp3,opus,flac,vorbis&VideoBitrate=139936097&AudioBitrate=63903&MaxWidth=1920&AudioStreamIndex=1&TranscodingMaxAudioChannels=6&CopyTimestamps=true&h264-profile=high,main,baseline,constrainedbaseline&h264-level=62&hevc-codectag=hvc1,hev1,dvh1&aac-audiochannels=2&TranscodeReasons=AudioChannelsNotSupported,DirectPlayError&allowVideoStreamCopy=false&allowAudioStreamCopy=false Edited April 14, 2023 by GrimReaper Snippet
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 4 minutes ago, jaycedk said: You can see it in Under playback you can see what client and playback method. Thansk. Ihave had it installed for a while, but didnt think to search through it for the transcoding. Its great when it says DirectStream, (Im looking in the query area), but is there anyway to show the From->To codec information?
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 2 minutes ago, GrimReaper said: There is always &TranscodeReasons noted in Playsession info section of the ffmpeg log, together with client capabilities. Thanks!
GrimReaper 4739 Posted April 14, 2023 Posted April 14, 2023 3 minutes ago, HawkXP71 said: Its great when it says DirectStream, (Im looking in the query area), but is there anyway to show the From->To codec information? ffmpeg log will also show you that, Stream mapping, as in: 14:18:30.570 Stream mapping: 14:18:30.570 Stream #0:0 (hevc) -> scale_vaapi:default (graph 0) 14:18:30.570 hwmap:default (graph 0) -> Stream #0:0 (h264_vaapi) 14:18:30.570 Stream #0:1 -> #0:1 (truehd (native) -> ac3 (native)) 14:18:30.570 Stream #0:3 -> #1:0 (subrip (srt) -> webvtt (native)) 14:18:30.570 Stream #0:0 -> #1:1 (copy) 1
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 8 minutes ago, GrimReaper said: There is always &TranscodeReasons noted in Playsession info section of the ffmpeg log, together with client capabilities. Edit: As in: App: Emby for Android 3.2.92 Abz Note 10+ http://10.0.0.10:8096/emby/videos/76307/stream.mkv?DeviceId=chromecast_1676542200512&MediaSourceId=1ed933f6dddb26d4303537175d079b6b&PlaySessionId=cdfded519da347b6b48fca73d376fb7a&api_key=ba71722b57fc4e829fdae4bd9fa1dd0e&VideoCodec=h264,h265,hevc,vp8,vp9&AudioCodec=ac3,aac,mp3,opus,flac,vorbis&VideoBitrate=139936097&AudioBitrate=63903&MaxWidth=1920&AudioStreamIndex=1&TranscodingMaxAudioChannels=6&CopyTimestamps=true&h264-profile=high,main,baseline,constrainedbaseline&h264-level=62&hevc-codectag=hvc1,hev1,dvh1&aac-audiochannels=2&TranscodeReasons=AudioChannelsNotSupported,DirectPlayError&allowVideoStreamCopy=false&allowAudioStreamCopy=false Thanks! That is exactly what Im looking for. Is that url when processed on the server, stored anywhere? ie, the trnascode reasons field stored in a db somewhere?
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 Just now, GrimReaper said: ffmpeg log will also show you that, Stream mapping, as in: 14:18:30.570 Stream mapping: 14:18:30.570 Stream #0:0 (hevc) -> scale_vaapi:default (graph 0) 14:18:30.570 hwmap:default (graph 0) -> Stream #0:0 (h264_vaapi) 14:18:30.570 Stream #0:1 -> #0:1 (truehd (native) -> ac3 (native)) 14:18:30.570 Stream #0:3 -> #1:0 (subrip (srt) -> webvtt (native)) 14:18:30.570 Stream #0:0 -> #1:1 (copy) Even better!
rbjtech 5284 Posted April 14, 2023 Posted April 14, 2023 (edited) use the diagnostics plugin and you'll get it graphically in User Sessions ... Edited April 14, 2023 by rbjtech
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 1 minute ago, rbjtech said: use the diagnostics plugin and you'll get it graphically ... Thats great for when Im monitoring the current media. But Im looking for historical data. As in 95% of the time, it transcodes hevc/h265 to h264, so I might a well pretranscode the video to h264 so I dontr have to burden my server during playback
rbjtech 5284 Posted April 14, 2023 Posted April 14, 2023 1 minute ago, HawkXP71 said: Thats great for when Im monitoring the current media. But Im looking for historical data. As in 95% of the time, it transcodes hevc/h265 to h264, so I might a well pretranscode the video to h264 so I dontr have to burden my server during playback Right with you - then ffmpeg logs as described above.
GrimReaper 4739 Posted April 14, 2023 Posted April 14, 2023 14 minutes ago, HawkXP71 said: That is exactly what Im looking for. Is that url when processed on the server, stored anywhere? ie, the trnascode reasons field stored in a db somewhere? Not that I know of; and IMHO that'd just be garbage data bloating the db.
rbjtech 5284 Posted April 14, 2023 Posted April 14, 2023 (edited) 51 minutes ago, jaycedk said: It can also do custom query's but dont know how to do that. SELECT UserId, COUNT(PlaybackMethod), PlaybackMethod FROM PlaybackActivity WHERE ItemType = 'Movie' GROUP BY UserId, PlaybackMethod Easy enough - this gives you the count of each type of playback method per user for movies. output (short extract for me only ..) The 'source' info is not held though - so this is only good for the output/playback method I'm afraid. Edited April 14, 2023 by rbjtech
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 3 minutes ago, rbjtech said: SELECT UserId, COUNT(PlaybackMethod), PlaybackMethod FROM PlaybackActivity WHERE ItemType = 'Movie' GROUP BY UserId, PlaybackMethod Easy enough - this gives you the count of each type of playback method per user for movies. output (short extract for me only ..) The 'source' info is not held though - so this is only good for the output/playback method I'm afraid. Whats the difference between directplay and directstream?
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 The results for my query (I didnt bother with user id) COUNT(PlaybackMethod) PlaybackMethod 54 DirectPlay 669 DirectStream 16 Transcode 2 Transcode (v:direct a:ac3) 5 Transcode (v:direct a:direct) 27 Transcode (v:direct a:mp3) 1 Transcode (v:h264 a:ac3) 9 Transcode (v:h264 a:direct) 12 Transcode (v:h264 a:mp3)
GrimReaper 4739 Posted April 14, 2023 Posted April 14, 2023 3 minutes ago, HawkXP71 said: Whats the difference between directplay and directstream? https://support.emby.media/support/solutions/articles/44001920144-direct-play-vs-direct-streaming-vs-transcoding
rbjtech 5284 Posted April 14, 2023 Posted April 14, 2023 (edited) 6 minutes ago, HawkXP71 said: Whats the difference between directplay and directstream? So this has always been a question that has multiple answers lol. But as far as I'm concerned - DirectPlay means NO transformation of Audio or Video has taken place - only ET via SMB or AndroidTV via SMB can do this. All other playback methods (as they go via the Emby Server and use HTTP) - are all DirectStream. Edited April 14, 2023 by rbjtech
GrimReaper 4739 Posted April 14, 2023 Posted April 14, 2023 (edited) 4 minutes ago, rbjtech said: But as far as I'm concerned - DirectPlay means NO transformation of Audio or Video has taken place - only ET via SMB or AndroidTV via SMB can do this. All other playback methods (as they go via the Emby Server and use HTTP - are all DirectStream. That's not exactly how Emby interprets/considers it. I remember heated discussions about delivery methods and terminology that should be used. In any case, DFA or http is not taken into account with current terms. Above link is what's currently applicable. Edited April 14, 2023 by GrimReaper 1
rbjtech 5284 Posted April 14, 2023 Posted April 14, 2023 Just now, GrimReaper said: That's not exactly how Emby interprets/considers it. I remember heated discussions about delivery methods and terminology that should be used. In any case, above link is what's currently applicable. hence the 'as far as I'm concerned' .. I don't see how you can refer to something as DirectPlay if you are changing the data stream into HTTP lol Anyway - yes, you are of course correct - for the actual 'emby' and thus Playback Reporting references, the wiki link describes it well. 1
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 10 minutes ago, rbjtech said: So this has always been a question that has multiple answers lol. But as far as I'm concerned - DirectPlay means NO transformation of Audio or Video has taken place - only ET via SMB or AndroidTV via SMB can do this. All other playback methods (as they go via the Emby Server and use HTTP) - are all DirectStream. 3 minutes ago, rbjtech said: hence the 'as far as I'm concerned' .. I don't see how you can refer to something as DirectPlay if you are changing the data stream into HTTP lol Anyway - yes, you are of course correct - for the actual 'emby' and thus Playback Reporting references, the wiki link describes it well. 3 minutes ago, rbjtech said: hence the 'as far as I'm concerned' .. I don't see how you can refer to something as DirectPlay if you are changing the data stream into HTTP lol Anyway - yes, you are of course correct - for the actual 'emby' and thus Playback Reporting references, the wiki link describes it well. Then here is a a simple (dumbass) question... from my report I have Transcode (v:direct a:ac3) That implies to me, it should be direct stream. Since the video was played direct, but the audio had to be transcoded to (or from? not sure) ac3. Yet its listed as ac3. I dont know if I agree with the wiki page when it comes to transmuxing however, if you are modifying the video, audio, or subtitle data then there is some form of transcoding going on. If you are only changing the container (mp4 -> mkv or vice versa) then its transmuxing. Though I could be wrong in my understanding. The reason I say this, I store all my media in MKV, I transmux it independent of how it came into MKV (mainly because media tagging is much faster once its MKV). I also mux all subtitle files into the MKV for easier local transport (ie thumbdrive or whatnot). On my LAN, ffmpeg can transmux from one container to another (when all streams are just using the "copy" codec), at a rate of about 400-500x, no GPU usage of course, straight network IO + CPU. However, same computer at the same location (ie no change) when having to do an audio only transcode, it drops to 30x, if its video it drops again to 14x or so. I dont have any data on transcoding non-supported subtitle files into the SRT/ASS format. The exact numbers will of course change depending on the exact media file. My point is transcoding at all does have significant CPU costs, transmuxing is "free", in the Wiki it claims otherwise (that transcoding only audio is free). Just my two bits, but Im more "concerned" as to why transcode (v:direct a:ac3) isnt called directstream?
TeamB 2438 Posted April 14, 2023 Posted April 14, 2023 2 hours ago, HawkXP71 said: Just my two bits, but Im more "concerned" as to why transcode (v:direct a:ac3) isnt called directstream? the audio was transcoded to ac3 here is the code that extracts the playback method from the session in the playback reporting plugin, as you can see this is all directly from the server play session object, no logic is applied, it is reported as is https://github.com/faush01/playback_reporting/blob/c7b8a77ec45cb55efeb54f511fd655f66558473a/playback_reporting/EventMonitorEntryPoint.cs#L260 1
HawkXP71 112 Posted April 14, 2023 Author Posted April 14, 2023 1 hour ago, TeamB said: the audio was transcoded to ac3 here is the code that extracts the playback method from the session in the playback reporting plugin, as you can see this is all directly from the server play session object, no logic is applied, it is reported as is https://github.com/faush01/playback_reporting/blob/c7b8a77ec45cb55efeb54f511fd655f66558473a/playback_reporting/EventMonitorEntryPoint.cs#L260 Interesting, just wondering why the system reports it as such. Not the reporting plugin...
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