Jump to content

Tizen - Transcoding when direct play is supported


gbone8106

Recommended Posts

gbone8106

Luke, not sure if you got a chance to try this as its from the locked thread just before the last update went live. I have several files that are encoded with H264 (Stereo High@4.1 / High@L4.1). I Have included a sample of  a file of this type in the link below. Also I have listed the Media Info.

 

 

Any help is appreciated.

 

 

Media Info

Video
CodecH264
AVCYes
ProfileHigh
Level41
Resolution1920x1080
Aspect ratio16:9
AnamorphicNo
InterlacedNo
Framerate23.97602
Bitrate31830 kbps
Bit depth8 bit
Pixel formatyuv420p
Ref frames1
NAL4

Audio
Languageeng
CodecDTS
ProfileDTS-HD MA
Layout7.1
Channels8 ch
Sample rate48000 Hz
Bit depth24 bit
DefaultYes
TitleEng Surround 7.1
Containermkv
 

 

https://1drv.ms/u/s!AtMbYws-QjAbzFU0DX1-NhZbGWTp

 

 

 

 

- I also have some 4k files that still transcode. which I can make samples of also, but would much rather have this type of file direct play before we go down the 4k troubleshooting route.

Link to comment
Share on other sites

@@Luke, according to MediaInfo, This is actually mpeg4 in mkv container, not h264 codec.

 

but it's being detected by the server as h264

 

It plays fine by DLNA.

 

5893972919722_Capture.png

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Stereo High@L4.1 / High@L4.1
MultiView_Count                          : 2
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 3 frames
Format settings, GOP                     : M=1, N=12
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 24s 525ms
Bit rate mode                            : Variable
Bit rate                                 : 25.3 Mbps
Maximum bit rate                         : 34.0 Mbps
Edited by SamES
Link to comment
Share on other sites

Strange though, according to the log, this is trying to direct play (I've changed the bitrate limit) so I think it shouldn't matter that the codec detection on the server is wrong, but it still seems to crash the player.  I only tested once, I'll have to try it again tonight

2017-02-03 07:34:52.7598 Info HttpServer: HTTP POST http://e:8096/emby/Items/4c5f862c44a5bbb2e971755b0bc7c484/PlaybackInfo?UserId=38321b9b221342e8a7de027f041f3591&StartTimeTicks=0&MaxStreamingBitrate=120000000. UserAgent: Mozilla/5.0 (SMART-TV; Linux; Tizen 2.4.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/2.4.0 TV Safari/538.1
2017-02-03 07:34:52.8223 Info App: Profile: Unknown Profile, Path: \\10.55.1.2\Media\Demos\Test Files\FD.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2017-02-03 07:34:52.8379 Info App: RemoteClientBitrateLimit: 500000, RemoteIp: 192.168.1.75, IsInLocalNetwork: True
2017-02-03 07:34:52.8379 Info App: Profile: Unknown Profile, Path: \\10.55.1.2\Media\Demos\Test Files\FD.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2017-02-03 07:34:52.8379 Info App: RemoteClientBitrateLimit: 500000, RemoteIp: 192.168.1.75, IsInLocalNetwork: True
2017-02-03 07:34:52.8379 Info App: Profile: Unknown Profile, Path: \\10.55.1.2\Media\Demos\Test Files\FD.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2017-02-03 07:34:52.8535 Info HttpServer: HTTP Response 200 to 192.168.1.75. Time: 94ms. http://e:8096/emby/Items/4c5f862c44a5bbb2e971755b0bc7c484/PlaybackInfo?UserId=38321b9b221342e8a7de027f041f3591&StartTimeTicks=0&MaxStreamingBitrate=120000000
2017-02-03 07:34:54.1192 Info HttpServer: HTTP GET http://e:8096/emby/Videos/4c5f862c44a5bbb2e971755b0bc7c484/stream.mkv?Static=true&mediaSourceId=4c5f862c44a5bbb2e971755b0bc7c484&deviceId=7544163aeee60a58ea1cf73a2ba3e33de665513b&Tag=d993024b37837b693397ac17ce4ea19c. UserAgent: samsung-agent/1.1
2017-02-03 07:34:54.2910 Info HttpServer: HTTP GET http://e:8096/emby/Videos/4c5f862c44a5bbb2e971755b0bc7c484/stream.mkv?Static=true&mediaSourceId=4c5f862c44a5bbb2e971755b0bc7c484&deviceId=7544163aeee60a58ea1cf73a2ba3e33de665513b&Tag=d993024b37837b693397ac17ce4ea19c. UserAgent: samsung-agent/1.1
2017-02-03 07:34:54.2910 Info HttpServer: HTTP Response 206 to 192.168.1.75. Time: 0ms. http://e:8096/emby/Videos/4c5f862c44a5bbb2e971755b0bc7c484/stream.mkv?Static=true&mediaSourceId=4c5f862c44a5bbb2e971755b0bc7c484&deviceId=7544163aeee60a58ea1cf73a2ba3e33de665513b&Tag=d993024b37837b693397ac17ce4ea19c
2017-02-03 07:34:54.3223 Info HttpServer: HTTP GET http://e:8096/emby/Videos/4c5f862c44a5bbb2e971755b0bc7c484/stream.mkv?Static=true&mediaSourceId=4c5f862c44a5bbb2e971755b0bc7c484&deviceId=7544163aeee60a58ea1cf73a2ba3e33de665513b&Tag=d993024b37837b693397ac17ce4ea19c. UserAgent: samsung-agent/1.1

Link to comment
Share on other sites

I wish I knew what the Samsung native player was made of, I'm sure it can't be avplay as seems to have better support (like vobsub overlays) and playing files like this

Link to comment
Share on other sites

SSJ4Gokou

This happens to me a lot. I can direct play them via DLNA, but the app transcodes them when playing. I have also witnessed, rarely, that the file would transcode and after a while it'll switch over to Direct play. Wish I kept that log.

 

I would love for this to be resolved in the possible next release or at the least figure out what the issue is. Maybe even be able to configure the profile for the app of some sort.

Link to comment
Share on other sites

I'm having a similar problem in that Tizen is transcoding when direct play is supported.I am using a Samsung UN50KU6300. I have a simple custom Samsung Smart TV DLNA profile that I only changed the max streaming bit rate to 80Mbps.

 

 

The file in question is HVEC 2160p has the following media info:

 

 5899cce264102_media_info.png

 

 

I realize that DTS-HD is not going to play, but I was expecting the core DTS track to play.

http://192.168.1.149:8096/emby/videos/2e61dc8a2aa9ad9ffc6153f990772b89/hls1/main/0.ts?DeviceId=9d7a50bca27b16b7a3d0fb24398d1bcded3bf796&MediaSourceId=2e61dc8a2aa9ad9ffc6153f990772b89&VideoCodec=h264&AudioCodec=ac3,eac3,aac,mp3&AudioStreamIndex=1&VideoBitrate=55299330&AudioBitrate=192000&Level=41&Profile=high&PlaySessionId=88b01cdec18045d09c167eea00aea52e&api_key=e010a5a55d8741809abfbbfc0c720157&CopyTimestamps=false&TranscodingMaxAudioChannels=6&EnableSubtitlesInManifest=false&Tag=adde1df6633f017ec1fe41d97f8b4faa&RequireAvc=false

{"Protocol":"File","Id":"2e61dc8a2aa9ad9ffc6153f990772b89","Path":"\\\\server\\movie.mkv","Type":"Default","Container":"mkv","Name":"4K/HEVC/DTS-HD MA","IsRemote":false,"ETag":"adde1df6633f017ec1fe41d97f8b4faa","RunTimeTicks":93805860000,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"SupportsProbing":true,"VideoType":"VideoFile","MediaStreams":[{"Codec":"hevc","TimeBase":"1/1000","CodecTimeBase":"1001/24000","IsInterlaced":false,"BitRate":64602186,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":2160,"Width":3840,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"Main 10","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p10le","Level":153,"IsAnamorphic":false},{"Codec":"dca","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/48000","Title":"DTS-HD","DisplayTitle":"Eng DTS-HD","IsInterlaced":false,"ChannelLayout":"7.1","BitDepth":24,"Channels":8,"SampleRate":48000,"IsDefault":true,"IsForced":true,"Profile":"DTS-HD MA","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false},{"Codec":"srt","Language":"dut","TimeBase":"1/1000","CodecTimeBase":"1/1000","DisplayTitle":"Dut Default","IsInterlaced":false,"IsDefault":true,"IsForced":false,"Type":"Subtitle","Index":2,"IsExternal":false,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Level":0,"IsAnamorphic":false}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":64602186,"RequiredHttpHeaders":{}}

C:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20160410\ffmpeg.exe -i file:"\\server\movie.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset veryfast -crf 23 -maxrate 55299330 -bufsize 110598660 -vsync -1 -profile:v high -level 4.1 -x264opts:0 subme=0:rc_lookahead=10:me_range=4:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames "expr:gte(t,n_forced*3)" -copyts -codec:a:0 ac3 -ac 6 -ab 192000 -af "adelay=1,aresample=async=1" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "D:\emby\transcoding-temp\eb342ddc2464e94ad91b07d6927acd68.m3u8" -y "D:\emby\transcoding-temp\eb342ddc2464e94ad91b07d6927acd68%d.ts"


ffmpeg version N-79277-g0c90b2e Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 20.100 / 55. 20.100
  libavcodec     57. 34.100 / 57. 34.100
  libavformat    57. 32.100 / 57. 32.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 41.100 /  6. 41.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'file:\\server\movie.mkv':
  Metadata:
    encoder         : libebml v1.3.4 + libmatroska v1.4.5
    creation_time   : 2017-01-31 03:02:04
  Duration: 02:36:20.59, start: 0.000000, bitrate: 64602 kb/s
    Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 60011430
      BPS-eng         : 60011430
      DURATION        : 02:36:18.160000000
      DURATION-eng    : 02:36:18.160000000
      NUMBER_OF_FRAMES: 224852
      NUMBER_OF_FRAMES-eng: 224852
      NUMBER_OF_BYTES : 70349599965
      NUMBER_OF_BYTES-eng: 70349599965
      _STATISTICS_WRITING_APP: mkvmerge v9.7.1 ('Pandemonium') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.7.1 ('Pandemonium') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-01-31 03:02:04
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-01-31 03:02:04
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 7.1, s32p (24 bit) (default) (forced)
    Metadata:
      title           : DTS-HD
      BPS             : 4602403
      BPS-eng         : 4602403
      DURATION        : 02:36:20.576000000
      DURATION-eng    : 02:36:20.576000000
      NUMBER_OF_FRAMES: 879348
      NUMBER_OF_FRAMES-eng: 879348
      NUMBER_OF_BYTES : 5396649388
      NUMBER_OF_BYTES-eng: 5396649388
      _STATISTICS_WRITING_APP: mkvmerge v9.7.1 ('Pandemonium') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.7.1 ('Pandemonium') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-01-31 03:02:04
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-01-31 03:02:04
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(dut): Subtitle: subrip (default)
    Metadata:
      BPS             : 22
      BPS-eng         : 22
      DURATION        : 02:20:59.044000000
      DURATION-eng    : 02:20:59.044000000
      NUMBER_OF_FRAMES: 818
      NUMBER_OF_FRAMES-eng: 818
      NUMBER_OF_BYTES : 24113
      NUMBER_OF_BYTES-eng: 24113
      _STATISTICS_WRITING_APP: mkvmerge v9.7.1 ('Pandemonium') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.7.1 ('Pandemonium') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-01-31 03:02:04
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-01-31 03:02:04
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[libx264 @ 00000000025c6e40] using SAR=1/1
[libx264 @ 00000000025c6e40] frame MB size (240x135) > level limit (8192)
[libx264 @ 00000000025c6e40] DPB size (4 frames, 129600 mbs) > level limit (1 frames, 32768 mbs)
[libx264 @ 00000000025c6e40] VBV bitrate (55299) > level limit (50000)
[libx264 @ 00000000025c6e40] VBV buffer (110598) > level limit (62500)
[libx264 @ 00000000025c6e40] MB rate (776823) > level limit (245760)
[libx264 @ 00000000025c6e40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 00000000025c6e40] profile Main, level 4.1
[libx264 @ 00000000025c6e40] 264 - core 148 r2665 a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=4 chroma_me=0 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=55299 vbv_bufsize=110598 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, segment, to 'D:\emby\transcoding-temp\eb342ddc2464e94ad91b07d6927acd68%d.ts':
  Metadata:
    encoder         : Lavf57.32.100
    Stream #0:0: Video: h264 (libx264), yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], q=-1--1, max. 55299 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc57.34.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 55299000/0/0 buffer size: 110598000 vbv_delay: -1
    Stream #0:1: Audio: ac3, 48000 Hz, 5.1, fltp (24 bit), 192 kb/s (default) (forced)
    Metadata:
      encoder         : Lavc57.34.100 ac3
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (dts (dca) -> ac3 (native))
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.19 bitrate=N/A speed=0.355x    
frame=    5 fps=4.5 q=0.0 size=N/A time=00:00:00.45 bitrate=N/A speed=0.411x    
frame=   12 fps=7.5 q=0.0 size=N/A time=00:00:00.74 bitrate=N/A speed=0.462x    
frame=   16 fps=7.5 q=0.0 size=N/A time=00:00:00.90 bitrate=N/A speed=0.422x    
frame=   20 fps=7.6 q=0.0 size=N/A time=00:00:01.06 bitrate=N/A speed=0.401x    
frame=   23 fps=7.0 q=28.0 size=N/A time=00:00:01.15 bitrate=N/A speed=0.352x    
frame=   28 fps=6.9 q=28.0 size=N/A time=00:00:01.44 bitrate=N/A speed=0.358x    
frame=   32 fps=6.8 q=28.0 size=N/A time=00:00:01.63 bitrate=N/A speed=0.35x    
frame=   35 fps=6.6 q=28.0 size=N/A time=00:00:01.73 bitrate=N/A speed=0.328x    
frame=   39 fps=6.7 q=28.0 size=N/A time=00:00:01.89 bitrate=N/A speed=0.324x    
frame=   43 fps=6.7 q=28.0 size=N/A time=00:00:02.08 bitrate=N/A speed=0.327x    
frame=   45 fps=6.5 q=28.0 size=N/A time=00:00:02.08 bitrate=N/A speed=0.303x    
Edited by joutlaw
Link to comment
Share on other sites

FrostByte

Did you switch your tv to DTS?  For some reason Tizen tvs don't auto switch from DD to DTS like the older Orsay sets so you have to change your tv settings before hitting play.

Link to comment
Share on other sites

Did you switch your tv to DTS?  For some reason Tizen tvs don't auto switch from DD to DTS like the older Orsay sets so you have to change your tv settings before hitting play.

I am using the optical out from the TV to my A/V receiver. I am not certain of the sound setting, but I get DTS from other sources. 

 

On this particular file, the video would play for 2-3 seconds and then buffer/spin for 10-15. It was unwatchable. My expectation is if only the audio was transcoding, the video would be direct playing from the original source.

Link to comment
Share on other sites

Disable transcoding. It works perfectly then. With or without subs DTS/AC3 whatever. All great with zero cpu on the server.

 

I think there is something wrong with the device profile. I dont know how to fix it though. 

 

2016 ks9500

  • Like 1
Link to comment
Share on other sites

FrostByte

Disable transcoding. It works perfectly then. With or without subs DTS/AC3 whatever. All great with zero cpu on the server.

 

I think there is something wrong with the device profile. I dont know how to fix it though. 

 

2016 ks9500

 

Device profile?  Are you talking DLNA?

Link to comment
Share on other sites

In your user profile, it looks like this.

 

Disable the middle two. I think the bottom one is needed for some subs.

 

 post-118132-0-43240500-1486580369_thumb.png

Edited by Jadel
  • Like 2
Link to comment
Share on other sites

That's only necessary if you need immediate workaround. We will obviously improve this in the app for future updates. Thanks !

  • Like 1
Link to comment
Share on other sites

Does it still transcode with subtitles turned off

 

  Stream #0:2(dut): Subtitle: subrip (default)

Yes, I confirmed it still transcodes with subtitles off and selecting the non DTS-HD track.

Link to comment
Share on other sites

I disabled transcoding for my user account and the file in question showed "Direct Streaming" when I attempted to play it. It seemed to start faster, but buffered pretty quickly. It was still unwatchable. Further analysis showed that it was transcoding the DTS-HD track to AAC. Even when I forced the DTS 5.1 and DD 5.1 tracks, it would still show it was transcoding the audio.

 

The HVEC file had a total bit rate of 66Mbps. My Samsung TV is connected via ethernet cable to a gigabit switch. Not sure if the TV itself is gigabit, but according to the 2016 UHD TV specs, my model should support 80Mbps HVEC videos. 

 

For testing purposes, I installed Plex and noticed similar behavior. I didn't have to tweak the transcoding options in Plex, but it was direct streaming the video and transcoding the audio. It also would play, show buffering, then play a bit more and then show buffering.

 

I'm wondering if 60+ Mbps are too much for my TV. I have another HVEC file with 2 channel audio that is around 30-40Mbps that plays just fine. 

Edited by joutlaw
Link to comment
Share on other sites

Yes I am guessing it is probably just too much. We are going to remove the bitrate limits so in the next update to the app you will see that same out of box behavior - direct stream video, convert audio (if needed). Thanks !

  • Like 3
Link to comment
Share on other sites

Yes I am guessing it is probably just too much. We are going to remove the bitrate limits so in the next update to the app you will see that same out of box behavior - direct stream video, convert audio (if needed). Thanks !

 

That's what I'm thinking too. I have an Apollo Lake NUC coming today and will see if it fairs better with this content. 

Link to comment
Share on other sites

Yes I am guessing it is probably just too much. We are going to remove the bitrate limits so in the next update to the app you will see that same out of box behavior - direct stream video, convert audio (if needed). Thanks !

 

Well done Luke!

 

I wonder why this apply from the start.

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