Jump to content

Log/Report of what codecs were used for transcoding?


Recommended Posts

HawkXP71
Posted

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



 

 

Posted

Hi, just the server ffmpeg log from when it happened.

HawkXP71
Posted
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
Posted

You can see it in 

 

Under playback you can see what client and playback method.

  • Like 1
Neminem
Posted

It can also do custom query's but dont know how to do that.

GrimReaper
Posted (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 by GrimReaper
Snippet
HawkXP71
Posted
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
Posted
2 minutes ago, GrimReaper said:

There is always 

&TranscodeReasons

noted in Playsession info section of the ffmpeg log, together with client capabilities.

Thanks!

GrimReaper
Posted
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)

 

  • Like 1
HawkXP71
Posted
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
Posted
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
Posted (edited)

use the diagnostics plugin and you'll get it graphically in User Sessions ...

image.thumb.png.982cd38965249dbda5f90df840897eb7.png

image.png.ad3de7f998d05edf4f38e81317e8f4a5.png

Edited by rbjtech
HawkXP71
Posted
1 minute ago, rbjtech said:

use the diagnostics plugin and you'll get it graphically ...

image.thumb.png.982cd38965249dbda5f90df840897eb7.png

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
Posted
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
Posted
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
Posted (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 ..)

image.png.f4af31740c046129c2e85a3037de9455.png

The 'source' info is not held though - so this is only good for the output/playback method I'm afraid.

Edited by rbjtech
HawkXP71
Posted
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 ..)

image.png.f4af31740c046129c2e85a3037de9455.png

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
Posted

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)
rbjtech
Posted (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 by rbjtech
GrimReaper
Posted (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 by GrimReaper
  • Agree 1
rbjtech
Posted
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.

  • Agree 1
HawkXP71
Posted
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?

Posted
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

  • Like 1
HawkXP71
Posted
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...

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...