Jump to content

Unable to Direct Play via Chrome Web Client - "Unknown Profile"


Douglas_D

Recommended Posts

Douglas_D

Hi All.  I've recently transitioned my Emby Server from my Windows box to a Docker within UnRaid 6.1.6 on a Dell T20 Xeon e3-1225v3. The Server is running Version 3.0.5781.5

 

I'm trying to direct play from my main system running Windows 7 x64 Chrome 47.0.2526.80, but every video I've tried has transcoded instead of direct playing.  Some are due to bitrate (I'd be interested in how to adjust this limit), but most are reporting back the following in the server log:

2015-12-09 09:03:53.9325 Info App: Profile: Unknown Profile, Path: \\Galaxy\TV Shows\The League\Season 1\The League - S01E01 - The Draft.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2015-12-09 09:03:53.9325 Info App: Profile: Unknown Profile, No direct play profiles found for Path: \\Galaxy\TV Shows\The League\Season 1\The League - S01E01 - The Draft.mkv

(server-63585219811.txt, transcode-05c5fd09-a231-4e3a-ad55-83d6fc9b7231.txt)

The League S01E01

Video
CodecH264
ProfileHigh
Level31
Resolution1280x720
Aspect ratio16:9
AnamorphicNo
InterlacedNo
Framerate23.97602
Bitrate5287 kbps
Bit depth8 bit
Pixel formatyuv420p
Ref frames5
CABACNo
Audio
Languageeng
CodecDCA
ProfileDTS
Layout5.1
Channels6 ch
Bitrate1500 kbps
Sample rate48000 khz
DefaultYes

transcode-05c5fd09-a231-4e3a-ad55-83d6fc9b7231.txt

server-63585219811.txt

Edited by Douglas_D
Link to comment
Share on other sites

You can't direct play an mkv with dts in any browser at the moment. You're limited to formats the browser can play natively.

Link to comment
Share on other sites

Douglas_D

Thanks for your quick response Luke.

 

Here's a fresh test with a file that does not use DTS.

 

 

Video
CodecH264
ProfileHigh
Level31
Resolution1280x720
Aspect ratio16:9
AnamorphicNo
InterlacedNo
Framerate23.976
Bitrate4326 kbps
Bit depth8 bit
Pixel formatyuv420p
Ref frames2
CABACNo
Audio
Languageeng
CodecAC3
Layout5.1
Channels6 ch
Bitrate375 kbps
Sample rate48000 khz
DefaultYes
Containermkv
Path\\Galaxy\TV Shows\Castle (2009)\Season 2\Castle (2009) - S02E12 - A Rose For Everafter.mkv

server-63585249519.txt

transcode-022d3695-a976-4544-9c09-63f43827ffa5.txt

Link to comment
Share on other sites

You're limited to formats the browser can play natively.

This also includes ac3. MS Edge is the only browser that supports ac3 but not in an mkv container.

Link to comment
Share on other sites

Douglas_D

Sorry about that.  I've tried poking around looking for supported formats, but all of my search results keep coming back with Chromecast and Chromebook results for supported formats.  

 

Do you know if there is a list of browsers and supported formats floating around?

Link to comment
Share on other sites

the best rule of thumb is mp4 or m4v with aac or mp3 audio. with those same codecs chrome can also direct play mkv.

Link to comment
Share on other sites

Douglas_D

Maybe this one will be of some interest.

 

I direct played this file by copying the path into Chrome.  Audio and Video work.

 

When I go through Emby Web client it transcodes.  I saw that the profile it uses sets directplay = false, but don't know why it does.

 

 

Audio
Languageeng
CodecAAC
ProfileLC
Layoutstereo
Channels2 ch
Sample rate48000 khz
DefaultYes
Video
CodecH264
ProfileHigh
Level31
Resolution1280x720
Aspect ratio16:9
AnamorphicNo
InterlacedNo
Framerate23.976
Bitrate3672 kbps
Bit depth8 bit
Pixel formatyuv420p
Ref frames2
CABACNo
Containermkv
Path\\Galaxy\TV Shows\South Park\Season 14\South Park - S14E01 - Sexual Healing.mkv

 

transcode-dadc3fc0-7249-41a2-bb5b-e3321c96a63c.txt

server-63585249519.txt

Link to comment
Share on other sites

I have the same problem. Here is my MKV details:

Video
CodecH264
ProfileHigh
Level31
Resolution800x336
Aspect ratio2.40:1
AnamorphicNo
InterlacedNo
Framerate23.97602
Bitrate887 kbps
Bit depth8 bit
Pixel formatyuv420p
Ref frames10
CABACNo
Audio
CodecAAC
ProfileLC
Layoutstereo
Channels2 ch
Sample rate48000 khz
DefaultYes
Subtitle
CodecSRT
DefaultYes
ForcedNo
ExternalNo
Subtitle
CodecSRT
DefaultNo
ForcedNo
ExternalNo
Subtitle
CodecSRT
DefaultNo
ForcedNo
ExternalNo
Containermkv
Path/media/life.mkv


Logs are:

2015-12-11 21:19:38.6189 Info HttpServer: HTTP POST http://192.168.25.4:8096/emby/Items/167f9d5b91b26b414e347d5b36bf2ba2/PlaybackInfo?UserId=96d4f498ffef4dc68ef9bc01c5fcbed4&StartTimeTicks=0. UserAgent: Mozilla/5.0 (X11; CrOS x86_64 7520.55.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.74 Safari/537.36
2015-12-11 21:19:38.6588 Info App: Profile: Unknown Profile, Path: /media/life.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2015-12-11 21:19:38.6588 Info App: Profile: VideoAudioCodecProfile, DirectPlay=false. Reason=Unknown Profile.AudioProfile Condition: NotEquals. ConditionValue: LC. IsRequired: True. Path: /media/life.mkv
2015-12-11 21:19:38.6600 Info App: Profile: Unknown Profile, Path: /media/life.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2015-12-11 21:19:38.6600 Info App: Profile: VideoAudioCodecProfile, DirectPlay=false. Reason=Unknown Profile.AudioProfile Condition: NotEquals. ConditionValue: LC. IsRequired: True. Path: /media/life.mkv
2015-12-11 21:19:38.6729 Info HttpServer: HTTP Response 200 to 192.168.25.192. Time: 51ms. http://192.168.25.4:8096/emby/Items/167f9d5b91b26b414e347d5b36bf2ba2/PlaybackInfo?UserId=96d4f498ffef4dc68ef9bc01c5fcbed4&StartTimeTicks=0
Edited by kayrus
Link to comment
Share on other sites

Excellent. I already found the reason of this problem: https://github.com/MediaBrowser/Emby/blob/master/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js#L302

 

I've removed whole vlc condition and AAC started to work well.

 

And I have another two questions:

1) Why don't you use something like ffmpeg -i video.mkv -vcodec copy -acodec copy stream.ts for browsers which don't support mkv or mov?

2) How can I enable only audio track transcoding? For example I have mkv (h264+ac3) and I would like to directly stream h264 and transcode only audio track ac3->mp3. How can I achieve that?

 

For the history:

 

There are no playback profiles which are defined for web clients. There are only configurable DLNA profiles which are absolutely don't relate to web browser. Web browsers generate their own playback profiles dynamically using this javascript (https://github.com/MediaBrowser/Emby/blob/master/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js). And I don't have an idea how it is possible to modify this JS and allow transcode only audio track.

Edited by kayrus
  • Like 1
Link to comment
Share on other sites

the browsers don't accept the .ts container. your question is frequently asked but we would already be doing it if it were possible.

Link to comment
Share on other sites

That was an example. Anyway, transcoding only of the audio track works! I've hardcoded "copy" codec inside mediaplayer.js and now firefox/chrome can play videos which were not available before! Now it is necessary to write down proper code which can determine original codec, compare it with x264 (or whatever browser can play) and force "copy" for video. If browser doesn't support some container - force copy for video+audio and use valid container.

 

Probably it is better to put these options into settings page... I guess enough for today.

Link to comment
Share on other sites

You're going to run into problems and then you'll see why it's not so simple. What is the transcoding container? if it is mp4, then try pausing the video in chrome and then unpausing. the video player will fail. this is not an issue in the web client code as it can be reproduced directly by putting the video url into the browser address bar.

 

On the other hand, if the transcoding container is HLS, then you'll run into this issue here:

 

http://emby.media/community/index.php?/topic/21719-unnecessary-video-transcode/?p=212333

 

If you can live with those issues then fine but we can't put them into the released software.

Link to comment
Share on other sites

Didn't you try to analyze how does Plex work? Or at least use Plex transcoder. Here are the command lines of both plex and emby for the same file:

#reencode
/usr/bin/ffmpeg -i file:/media/man.mkv -map_metadata -1 -threads 0 -map 0:0 -map 0:3 -map -0:s -codec:v:0
libx264 -pix_fmt yuv420p -preset superfast -crf 23 -b:v 3455640 -maxrate 3455640 -bufsize 6911280 -vsync vfr -profile:v high -level 41 -force_key_frames expr:gte(t,n_forced*3) -vf scale=trunc(oh*a/2)*2:min(ih\,1080) -flags -global_header -sc_threshold 0 -codec:a:0 aac -strict experimental -ac 6 -ab 320000 -af adelay=1,aresample=async=1 -hls_time 3 -start_number 0 -hls_list_size 0 -y /var/lib/emby-server/transcoding-temp/55c689d6814a16d267597c86c3b3c7e2.m3u8

#copy
ffmpeg -fflags +genpts -i file:/media/man.mkv -map 0:0 -map 0:3 -map -0:s -codec:v:0 copy -map_metadata -1 -threads 1 -codec:a:0 libmp3lame -ab 320000 -af aresample=async=1 -f mp4 -movflags frag_keyframe+empty_moov -y /var/lib/emby-server/transcoding-temp/d52a39e93afb6a804d89a4c821361681.mp4

#position+copy
/usr/bin/ffmpeg -ss 00:55:53.687 -fflags +genpts -i file:/media/man.mkv -map 0:0 -map 0:3 -map -0:s -codec:v:0 copy -map_metadata -1 -threads 1 -codec:a:0 libmp3lame -ab 320000 -af aresample=async=1 -f mp4 -movflags frag_keyframe+empty_moov -y /var/lib/emby-server/transcoding-temp/f34e00bb323032e886e1414ce2d3d330.mp4

#plex
/opt/plex/Application/Resources/Plex New Transcoder -noaccurate_seek -i /media/man.mkv -map 0:0 -codec:0 copy -bsf:0 h264_mp4toannexb,h264_plex -map 0:1 -metadata:s:1 language=eng -codec:1 aac -strict:1 experimental -cutoff:1 15000 -channel_layout:1 stereo -b:1 256k -f matroska -avoid_negative_ts disabled -map_metadata -1 - -start_at_zero -copyts -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/uab6dx27bcqjv2t9/progress

#plex+position
/opt/plex/Application/Resources/Plex New Transcoder -ss 1925.07495 -noaccurate_seek -i /media/man.mkv -map 0:0 -codec:0 copy -bsf:0 h264_mp4toannexb,h264_plex -map 0:1 -metadata:s:1 language=eng -codec:1 aac -strict:1 experimental -cutoff:1 15000 -channel_layout:1 stereo -b:1 256k -f matroska -avoid_negative_ts disabled -map_metadata -1 - -start_at_zero -copyts -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/gup8g9q8h5d8to6r/progress
 

 

 

 

Both work on my armhf pc. Plex works flawlessly out-of-the-box, but Emby has already spent a lot of my time and I hope not in vain.

Edited by kayrus
  • Like 2
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...