Jump to content

Version 4.4.3.0 - bad streaming


chudak
Go to solution Solved by Luke,

Recommended Posts

Okay. I duplicated it last night because it's easy to do. @Luke, I have attached the logs from the start of the episode. The reason there are multiple logs is because when it freezes, it "restarts" from the beginning of the last chunk of transcoded material it was playing. So basically, it will rewind a couple seconds and then carry on forward until it happens again. It usually does this twice before it kicks it over to full Nvidia hardware transcoding. I can reproduce it 100% of the time with DTS 5.1. This is Direct Streaming, which is apparently supposed to be the easiest form of transcoding according to the info the server provides. 4.4.3 and 4.4.2 both do it, which makes me wonder if there were any changes to ffmpeg or anything like that. I have also tried transcoding on my SSD just for the sake of trying it, but not only has that never been an issue in the past, it didn't resolve it anyway.

If debug logs are needed from my Roku, let me know and I can do this again with that enabled.

edit - and the only solution so far that I have found is to disable throttling so that the entire file is transcoded all at once. At that time, anything will play through in its entirity.

23-50-11.txt 23-51-54.txt 23-51-54b.txt 23-51-54c.txt 23-52-02.txt

Edited by 10479
Link to comment
Share on other sites

It's not a function of the client, but rather how the media was encoded. So you can see how it was encoded pretty easily just from the emby interface. If you go to an episode or movie and then scroll to the bottom, you will see a Media Info section. In that will be an Audio subsection and will look something like this -

Audio

TitleEnglish DTS 5.1 (Default)
LanguageEnglish
CodecDTS
ProfileDTS
Layout5.1
Channels6 ch
Bitrate1,536 kbps
Sample Rate48,000 Hz
DefaultYes
 
Or, for example, one that is not in DTS
 

Audio

TitleAAC stereo (Default)
CodecAAC
ProfileHE-AACv2
Layoutstereo
Channels2 ch
Bitrate192 kbps
Sample Rate48,000 Hz
DefaultYes
Link to comment
Share on other sites

chudak

Hello all

 

I can't become emby user and maybe it can cause some issues.

sudo su -s /bin/bash emby
[sudo] password for emby:

Wonder what is the proper way to fix this.  Maybe reinstall emby ?

Thx in advance!

Edited by chudak
Link to comment
Share on other sites

chudak

@10479 @Luke

I tried nearly everything: new samba server, new emby server, new firewall rules, permission on folder and yet streaming is not usable at all !

Any ETA on new point version?

I've been using emby for years and have prime membership and considering to drop it 

I did see this is ffmpeg-remux log:

12:28:39.093 12:28:39.093 [segment @ 0x2199380] Opening '/var/lib/emby/transcoding-temp/516E63.m3u8.tmp' for writing
12:28:39.107 SegmentComplete=video:0 Index=140 Start=0.000000 End=739.279000 Duration=739.279000 offset_pts=0 start_pts=0 Frames=85 filename=516E63_140.ts
12:28:39.108 [segment @ 0x2256980] Opening '/var/lib/emby/transcoding-temp/516E63_s2.m3u8.tmp' for writing

and this dir shows :

drwxr-xr-x  2 emby emby 12288 Jul  8 12:28 transcoding-temp/

????

Edited by chudak
Link to comment
Share on other sites

chudak

@Luke

Maybe this is useful? (on freshly setup emby server)

 

2020-07-08 13:24:25.133 Info DynamicHlsService: ProcessRun 'StreamTranscode f2c3b4' Execute: /opt/emby-server/bin/ffmpeg -y -copyts -start_at_zero -f matroska,webm -ss 00:28:18.000 -noaccurate_seek -c:v:0 h264 -i "/home/yuriw/Downloads/XYZ, The (1996)/XYZ.mkv" -map 0:0 -map 0:1 -sn -c:v:0 copy -bsf:v:0 h264_mp4toannexb -c:a:0 aac -ab:a:0 192000 -ac:a:0 2 -metadata:s:a:0 language=eng -filter:a:0 "volume=2" -disposition:a:0 default -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list /var/lib/emby/transcoding-temp/0A5DFD.m3u8 -segment_list_type m3u8 -segment_time 6 -segment_time_delta -00:28:18.000 -segment_start_number 283 -break_non_keyframes 1 -individual_header_trailer 0 -write_header_trailer 0 "/var/lib/emby/transcoding-temp/0A5DFD_%d.ts" -map 0:2 -vn -an -c:s:0 webvtt -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format webvtt -segment_list /var/lib/emby/transcoding-temp/0A5DFD_s2.m3u8 -segment_list_type m3u8 -segment_time 6 -segment_time_delta -00:28:18.000 -segment_start_number 283 -break_non_keyframes 1 -individual_header_trailer 1 -write_header_trailer 0 -write_empty_segments 1 "/var/lib/emby/transcoding-temp/0A5DFD_s2_%d.vtt"
2020-07-08 13:24:25.134 Debug DynamicHlsService: ProcessRun 'StreamTranscode f2c3b4' Started.
2020-07-08 13:24:25.884 Info DynamicHlsService: ProcessRun 'StreamTranscode f2c3b4' Process exited with code 0
2020-07-08 13:24:25.887 Error HttpServer: Error processing request
*** Error Report ***
Version: 4.4.3.0
Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
Operating system: Unix 5.4.0.40
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///opt/emby-server/system/System.Private.CoreLib.dll
System.Environment.Version: 3.1.2
Processor count: 4
Program data path: /var/lib/emby
Application directory: /opt/emby-server/system
System.Exception: System.Exception: Error starting ffmpeg
at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationTokenSource cancellationTokenSource, Boolean acquireResources)
at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetDynamicSegment(StreamRequest request, String playlistId, String segmentId, Int32 subtitleStreamIndex)
at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
Source: Emby.Server.MediaEncoding
TargetSite: Void MoveNext()

 

and this: https://hastebin.com/oyulalefih

Edited by chudak
Link to comment
Share on other sites

chudak

@Luke same issue ever since late update can't get emby to stream normally :(

so looking everywhere

Question - I mount my USB drive as:

UUID=42C26E5675E8FF72  /media/backup ntfs defaults    0    0

Anything emby may not like ^ ?

Link to comment
Share on other sites

I just meant what happened to the emby system user that caused this?

Link to comment
Share on other sites

chudak

@Luke as I said in this thread as well as in "Bad streaming" still trying to figure out why it's not working?

Does the mount point looks OK to you ?

Link to comment
Share on other sites

Are we talking about a problem with the emby system user or the same discussion as your other thread?

Link to comment
Share on other sites

chudak

@Luke

i don’t think I’m having issues with Emby user.

I am having streaming issues with Emby like we discussed in other thread and I am shooting in the dark.

i can’t tell what’s going on.  But streaming seems working fine sometimes and sometimes just gets stuck and stops forever.

so I’m looking everywhere

i never heard back from you if you found anything useful in the logs I provided.  If you would say that there are some known issues that can be what I am observing and that they will be addressed in the next restless, you would help my sleep a lot

Link to comment
Share on other sites

chudak
On 7/8/2020 at 8:15 PM, Luke said:

Are we talking about a problem with the emby system user or the same discussion as your other thread?

Still waiting for your reply :(

Meanwhile I've installed a new emby server on R Pi and it's performing normal.  I suspect ffmpeg misconfiguration or maybe something else, but don't know for sure.  Attaching log files.

I did also remove completely and reinstall emby without any improvements.

@Luke what woudl be your steps to troubleshoot/fix problems like that ?  Maybe you have a troubleshooting steps ?

Thx

 

ffmpeg-remux-bc30d935-ef64-463d-9af9-c0c0a56c5c9d_1.txt embyserver.txt

Link to comment
Share on other sites

chudak

I am experiencing weird problems  when on my ubuntu 18.04 server emby's performance is very slow and practically unusable.

Suspecting that some s/w conflict or else made it this way, maybe ffmpeg problems.

Wonder if anybody here has done such troubleshooting and found solutions/recomendations.

Thx in advance!

Link to comment
Share on other sites

  • Solution
On 6/7/2020 at 10:25 PM, 10479 said:

So for me, disabling throttling on transcoding fixes it. Not really sure why. 

@chudak can you try this as a test? Thanks.

Link to comment
Share on other sites

On 6/7/2020 at 1:14 PM, 10479 said:

Out of curiosity, is it a specific client app that does this, or all emby streaming? I only use Roku for it, so I can't really test other options to see if it's the server or a client app update that's causing it.

 

As for downgrading, I used a package from the AUR called downgrade. It makes it pretty easy to downgrade things by providing all versions to choose from. The only issue is that if you are on Arch Linux, the recent changes make it a bit more complicated because emby symlinks from /var/lib/emby > /var/lib/private/emby, so just downgrading won't work. Emby wouldn't start by default because of permission errors. I can't say for certain on other versions of linux. This was a recent change in the Arch Linux package at version 4.4.0.40-4 I believe.

@10479 since you can reproduce and test multiple versions, would you mind working your way up from 4.4.0.40 to find the first version that exhibits this behavior? For example, 4.4.1. thanks.

Link to comment
Share on other sites

chudak
39 minutes ago, Luke said:

@chudak can you try this as a test? Thanks.

@Luke

If I tell what I have tired and how much time spent looking into this problem - you would not believe me !

I tried disabling  throttling and can't tell it helped or otherwise.

I think that that problem(s) can manifest and be triggered by different events. 

One more or less reproducible is as in  https://github.com/MediaBrowser/Emby/issues/3625  It feels that after it takes place the emby server stars misbehaving.

In addition I feel that clients are at fault as well.  For example it seems that Android TV does not always respond to click event and when user clinks again it starts a new session and that messes up the server again.  The indirect reason I say this is I saw streaming started much later and also kept going even after other action was selected, for example changed  the library and sometimes even after switching from emby app (suspect runaway process on a TV).  I also indirectly test "sound" connectivity by sending a message from the server to a client and when server is in bad state messages won't go thru. 

Anyway I can talk long time about frustration and issues.  I kinda worked around by installing a new server on R Pi but on high quality streaming (1080HD) saw its CPU pegging at 100% ! 

What do you see ?

Link to comment
Share on other sites

21 hours ago, Luke said:

@10479 since you can reproduce and test multiple versions, would you mind working your way up from 4.4.0.40 to find the first version that exhibits this behavior? For example, 4.4.1. thanks.

Sorry it took so long to do this. Downgrading to 4.4.0 wasn't providing any hardware transcoding support. It took a little while to figure out what was going on. I had to downgrade `aom` as well, which I only found out by just trying to execute `ffmpeg-emby` on its own and getting the error `ffmpeg-emby: error while loading shared libraries: libaom.so: cannot open shared object file: No such file or directory`

After downgrading aom, I was able to use hardware again on version 4.4.0 and still had the same issue. So it's a bit of a runaround because the older aom package isn't compatible with the latest versions of emby, but the newer version of aom isn't compatible with the older versions of emby, however, the issue persisted for me on all of them.

Link to comment
Share on other sites

chudak
17 minutes ago, 10479 said:

... trying to execute `ffmpeg-emby` on its own and getting the error `ffmpeg-emby: ...

How did you do that ?  Conmand line pls

Link to comment
Share on other sites

10 minutes ago, chudak said:

How did you do that ?  Conmand line pls

literally just `ffmpeg-emby` will provide a response. But that was just a side note related to the hardware transcoding not even showing up for me on older versions of emby and the process I used to end up at the same buffering issues via Roku on older versions of emby.

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