Jump to content

Streaming direct from SMB


jleckenby

Recommended Posts

jleckenby

Hi,

 

I'm talking about the Fire TV version is my case, but this probably applies to all android versions. Is it possible to add support for direct streaming using SMB, i.e. no transcoding?

Link to comment
Share on other sites

SMB isnt' really the issue. If your device supports the content then we can already avoid transcoding over http.

Link to comment
Share on other sites

Deathsquirrel

It will stream when playing content the device can natively play.  If it isn't then that would be looked at as a potential bug.

Link to comment
Share on other sites

jleckenby

Wow, that was quick!

 

Hmm, this means its transcoding right?

 

/usr/local/bin/ffmpeg -fflags +genpts -i file:"/mnt/media/tvshows/Breaking Bad/Season 4/S04E02 - Thirty-Eight Snub.mkv" -map_metadata -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset superfast -crf 23 -maxrate 10206274 -bufsize 20412548 -vsync vfr -profile:v high -level 40 -force_key_frames expr:gte(t,n_forced*3) -vf "scale=trunc(min(iw\,1920)/2)*2:trunc(min((iw/dar)\,1080)/2)*2" -flags -global_header -copyts -sc_threshold 0 -codec:a:0 aac -strict experimental -ac 2 -ab 128000 -af "adelay=1,aresample=async=1,volume=2" -hls_time 3 -start_number 0 -hls_list_size 0 -y "/var/db/emby-server/transcoding-temp/5816329067f62ff3b618eb5c915cb3ac.m3u8"

 

It's not a major issue, but I'm running emby on a low powered device. Sometimes when I load the dashboard the actual stream freezes until the images are loading.

 

For reference, I was using Kodi (new plugin) with SMB. Trying to see whether I could get away with an android TV experience. Liking it so far :)

Link to comment
Share on other sites

yea post the media info from the web client as well as the transcoding log, and also, indicate your client bitrate setting

Link to comment
Share on other sites

jleckenby
Video
CodecH264
ProfileHigh
Level41
Resolution1920x1080
Aspect ratio16:9
AnamorphicNo
InterlacedNo
Framerate23.97599
Bitrate9967 kbps
Bit depth8 bit
Pixel formatyuv420p
Audio
Languageeng
CodecDCA
ProfileDTS
Layout5.1
Bitrate1500 kbps
Sample rate48000 khz
DefaultYes
Subtitle
Languageeng
CodecSUBRIP
DefaultNo
ForcedNo
ExternalNo
Subtitle
Languageeng
CodecSUBRIP
DefaultNo
ForcedNo
ExternalNo
Containermkv
Pathsmb://CORSAIR/TV Shows/Breaking Bad/Season 4/S04E02 - Thirty-Eight Snub.mkv
Size3358 MB

Max streaming bitrate is 30 Mbits/sec. Hope that helps!

log.txt

Link to comment
Share on other sites

As long as you aren't using the subs, it is probably the level 41 which will no longer be an issue with the new version just released.

 

If you are including subtitles though it will have to transcode at this point in time.

Link to comment
Share on other sites

jleckenby

I have no idea what you mean by level 41 :), but hopefully that is the fix! I'm running a freshports version, what's the version number for the latest one? Currently running 3.0.5588.1.

Link to comment
Share on other sites

I meant the new version of the Fire TV app that was just announced today.  It is still in the approval process at Amazon so it isn't available for update quite yet.

Link to comment
Share on other sites

jleckenby

ahh, gotcha! will keep my fingers crossed and report back. Sure you hear this all the time, but keep up the good work. Couldn't live without emby now!

Link to comment
Share on other sites

jleckenby

Nice update, like the new info panel on videos!

 

Don't think its solved my issue though, although the video does start quicker. If I'm reading the logs right, it looks like its only transcoding video now? Not sure why though, doesn't the fire TV support h264? At least we are getting there!

 

On a sort of related note, what's happening behind the scenes when I load the dashboard? It stops my video while processing images. The resulting images don't seem to cache though, which means it happens every time I refresh the dashboard.

log.txt

Link to comment
Share on other sites

Are you using subtitles?

 

Can you get the line feeds back into that transcode log?  Very hard to read :).

Link to comment
Share on other sites

CBers

Looks like it's transcoding both:

 

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Link to comment
Share on other sites

jleckenby

No subtitles. I get linebreaks, opening using Sublime Text if that helps. Anyway, I've posted the top part below:

http://10.0.0.130:8096/mediabrowser/videos/d6cd9f649d04550447935283634221d4/hlsdynamic/main/0.ts?DeviceId=68107f8d3042ed85&MediaSourceId=d6cd9f649d04550447935283634221d4&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&VideoBitrate=29872000&AudioBitrate=128000&MaxAudioChannels=2&MaxWidth=1920&MaxHeight=1080&Level=40&ClientTime=1430846858553&MaxVideoBitDepth=8&Profile=high&PlaySessionId=9d61136bc224495f9ba6ba1e2472f953&api_key=542ea04925ca494f9c0cb20bdd394c27

/usr/local/bin/ffmpeg -fflags +genpts -i file:"/mnt/media/tvshows/2 Broke Girls/Season 4/S04E20 - And the Minor Problem.mkv" -map_metadata -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset superfast -crf 23 -maxrate 4015798 -bufsize 8031596 -vsync vfr -profile:v high -level 40 -force_key_frames expr:gte(t,n_forced*3) -vf "scale=trunc(min(iw\,1920)/2)*2:trunc(min((iw/dar)\,1080)/2)*2" -flags -global_header -copyts -sc_threshold 0 -codec:a:0 aac -strict experimental -ac 2 -ab 128000 -af "adelay=1,aresample=async=1,volume=2" -hls_time 3 -start_number 0 -hls_list_size 0 -y "/var/db/emby-server/transcoding-temp/0b558dc5e56e509cbb61a70f88786c1f.m3u8"


ffmpeg version 2.3.6 Copyright (c) 2000-2014 the FFmpeg developers
  built on May  4 2015 14:20:57 with gcc 4.2.1 (GCC) 20070831 patched [FreeBSD]
  configuration: --disable-libaacplus --disable-indev=alsa --disable-outdev=alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --enable-libass --disable-libcdio --disable-libcelt --disable-libfaac --disable-libfdk-aac --enable-ffserver --enable-fontconfig --enable-libfreetype --enable-frei0r --enable-gnutls --disable-libgsm --enable-iconv --disable-indev=jack --enable-libmp3lame --disable-libbluray --disable-libv4l2 --disable-indev=v4l2 --disable-outdev=v4l2 --disable-libmodplug --disable-openal --disable-indev=openal --enable-libopencv --disable-libopenjpeg --disable-openssl --disable-libopus --disable-libpulse --disable-indev=pulse --disable-outdev=pulse --disable-librtmp --enable-libschroedinger --disable-libspeex --enable-libtheora --disable-vaapi --disable-vdpau --enable-libvorbis --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libvpx --enable-libx264 --disable-libx265 --enable-libxvid --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --enable-memalign-hack --disable-libstagefright-h264 --disable-libutvideo --disable-libsoxr --cc=cc --extra-cflags='-msse -I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --extra-libs=-lpthread --disable-debug --disable-ffplay --disable-outdev=sdl
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 48.100 / 55. 48.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.100 /  4. 11.100
  libavresample   1.  3.  0 /  1.  3.  0
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from 'file:/mnt/media/tvshows/2 Broke Girls/Season 4/S04E20 - And the Minor Problem.mkv':
  Metadata:
    encoder         : libebml v0.7.9 + libmatroska v0.8.1
    creation_time   : 2015-05-04 23:45:34
  Duration: 00:21:49.75, start: 0.000000, bitrate: 4015 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
[libx264 @ 0x809c22920] using SAR=1/1
[libx264 @ 0x809c22920] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x809c22920] profile High, level 4.0
[mpegts @ 0x80abc3a20] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
[adts @ 0x80abc4020] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Output #0, hls, to '/var/db/emby-server/transcoding-temp/0b558dc5e56e509cbb61a70f88786c1f.m3u8':
  Metadata:
    encoder         : Lavf55.48.100
    Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, max. 4015 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc
    Metadata:
      encoder         : Lavc55.69.100 libx264
    Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc55.69.100 aac
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
frame=   68 fps=0.0 q=22.0 size=N/A time=00:00:03.24 bitrate=N/A   

P.S. If you want to add me to any beta etc, I'm happy to provide feedback. :)

Link to comment
Share on other sites

Here is why it is transcoding:

Level=40

The question is why is that what is being requested?  Luke - I put 41 into my profile.  Is something else usurping that based on some information provided by the device maybe?

Link to comment
Share on other sites

the setting i gave you is  a default that gets overwritten if the device reports it's own value. i'll have to add another property to force it in anyway.

Link to comment
Share on other sites

the setting i gave you is  a default that gets overwritten if the device reports it's own value. i'll have to add another property to force it in anyway.

 

Wouldn't it be safer to take Paul's approach and, instead, examine the bitrate at the server and adjust the profile to be correct (moving it down to 40 if bitrate is within that spec)?

 

If we simply force 41 and we encounter a video that actually is 41 with the high bitrate, then playback will fail.  But, if we, instead, adjust the profile correctly, it should work in all instances.

Link to comment
Share on other sites

let's start with the app because i bet the device can handle 41. two year old rokus can handle 41. doing it at the server takes longer, will need more research/proof of that and also can't guarantee it won't be pulled out if a problem comes up in another app.

Link to comment
Share on other sites

  • 2 weeks later...
jleckenby

Hi guys,

 

Getting better! So the same files as above seem to be just transcoding audio now. Not sure why still as I can stream direct using Kodi perfectly fine, but heyho.

 

Not sure whether this is a tv plugin issue or emby issue, but live tv seems to be transcoding everything (log attached). I know everything can play direct, I can test it using Kodi.

log.txt

Link to comment
Share on other sites

  • 2 weeks later...
jleckenby

Hi all,

 

Can anyone confirm the reason it's transcoding is because I'm not using Kodi? I've attached a log from Live TV as an example. If it is indeed Kodi transcoding the FTV is doing some impressive work!

 

This issue is pretty much the only thing stopping me exclusively using the emby app, everything else is awesome! I'm running an Octacore Intel C2750 which does manage to transcode most of the time, but would be much better if it only did it when absolutely necessary.

log.txt

Edited by jleckenby
Link to comment
Share on other sites

Yes.  Kodi has its own internal player with codecs beyond what the native player on the device can handle.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
scutty

Did the level 41/40 thing ever get sorted?

I'm running into what seems to be the same transocde issue, where everything I play thats an mkv is transcoded and my poor little media server box is struggling. Subtitles are off and the only thing (to me at least!) is the level 40/41 issue.

My setup is the current Emby app on the FireTV stick plus the latest EMby server on windows.

Edited by scutty
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...