Jump to content

Nvidia Shield Server - Playback stops after transcoding finishes


Danlo

Recommended Posts

Hi All

 

I have a problem that I would be grateful for some help on. Anything that requires transcoding always stops before the end. There are no errors, playback just stops and goes back to the menu. This happens on Samsung Smart TV emby client and web client using Chrome. Server versions this happens on Nvidia Shield 4.5.2 and 4.6.0.5 beta. Hardware is Shield TV Pro 2019, all databases and transcoding temp files are stored in internal Shield storage (extended by 64GB usb stick). I have looked at a few other threads on this type of problem but haven't seen any definitive solutions.

When watching an affected file. I can see the transcoding progress on the admin page until it gets to 100% then the file plays normally until the playback time on the client approaches the end of the grey playback buffer marker and then the playback stops abruptly and goes back to the main menu. Depending on the speed of the transcoding, the playback can stop 10 minutes from the end of the movie or half way through.

Turned debug logs on but don't see any errors in log, just says exit:

11:19:14.783 11:19:14.783 [segment @ 0x289f865a00] Opening '/storage/emulated/0/Android/data/com.emby.embyserver/files/transcoding-temp/A49B91.m3u8.tmp' for writing
11:19:14.886 SegmentComplete=video:0 Index=2869 Start=7125.040000 End=7125.120000 Duration=0.080000 offset_pts=0 start_pts=7125040000 Frames=2 filename=A49B91_2869.ts
11:19:14.886 frame=18528 fps=343 q=-0.0 Lsize= 163482kB time=01:58:45.08 bitrate=1818.9kbits/s throttle=off speed=13.6x
11:19:14.887 video:151805kB audio:11676kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Last message repeated 1 times
11:19:14.889 EXIT
11:19:14.902
 
and
 
2020-11-08 11:19:12.693 Info Server: http/1.1 POST http://192.168.2.192:8096/emby/Sessions/Playing/Progress?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=a59ed841-e3ed-46b7-930b-0c607df38060&X-Emby-Client-Version=4.5.2.0. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
2020-11-08 11:19:12.784 Info Server: http/1.1 Response 204 to 192.168.2.172. Time: 91ms. http://192.168.2.192:8096/emby/Sessions/Playing/Progress?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=a59ed841-e3ed-46b7-930b-0c607df38060&X-Emby-Client-Version=4.5.2.0
2020-11-08 11:19:14.914 Info App: AppendExtraLogData - Read graph file: /storage/emulated/0/Android/data/com.emby.embyserver/files/logs/ffmpeg-transcode-3b122b03-14d0-4a6d-ab20-09ebf5558a33_1graph.txt
2020-11-08 11:19:14.916 Info App: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 1
2020-11-08 11:19:14.991 Info App: AppendExtraLogData - File Deleted
2020-11-08 11:19:14.992 Info App: ProcessRun 'StreamTranscode 3b122b' Process exited with code 0
 
 
Anything that does direct playback plays fine but anything that requires transcoding always fails in this way.
 
Any help is greatly appreciated. Full logs attached.
 
 
Thanks

embyserver.txt ffmpeg-transcode-3b122b03-14d0-4a6d-ab20-09ebf5558a33_1.txt

Link to comment
Share on other sites

So far, yes. The 2 files I tested so far where the playback stops prematurely are both mpeg4. Here is the video info for these 2 files:

Title    SD MPEG4
Codec    MPEG4
Codec Tag    XVID
Profile    Advanced Simple Profile
Level    5
Resolution    640x270
Aspect Ratio    64:27
Interlaced    No
Framerate    25
Bitrate    686 kbps
Bit Depth    8 bit
Pixel Format    yuv420p
Reference Frames    1

 

Title    SD MPEG4
Codec    MPEG4
Codec Tag    XVID
Profile    Advanced Simple Profile
Level    5
Resolution    640x272
Aspect Ratio    40:17
Interlaced    No
Framerate    23.976
Bitrate    885 kbps
Bit Depth    8 bit
Pixel Format    yuv420p
Reference Frames    1

Link to comment
Share on other sites

Just tried another MPEG4 file and it done exactly the same thing, once the transcoding was complete the playback stopped immediately when the playback time hit the end of the playback buffer.

Again, any help is most appreciated.

Link to comment
Share on other sites

Hi Danlo,  Have you tried the same test with another file that isn't an xvid/mpeg4 file? If not can you please?

Would like to narrow this down to make sure it doesn't happen with other file types as well.

Thanks,

Link to comment
Share on other sites

Hi Cayars,

I just tested with an HEVC file and it failed in exactly the same way. Once the transcode progress (shown by the red bar in the admin console dashboard page) reaches the end, the movie continues to play until the playback time reaches the end of the grey playback buffer on the browser playback screen and then I get thrown back to the main menu without any errors.

I decided to see if I could force the behaviour by taking files that would normally not require transcoding and direct play by lowering the playback quality in the browser to below the original bitrate for the file. When forcing the transcoding like this, the playback fails in the same way as before. So, it seems like this problem is manifesting itself on anything that requires transcoding. All direct play and direct streaming files I have tried so far work fine.

To avoid having to sit though a large chunk of a movie to demonstrate this behaviour, I usually move the playback time in the movie to about 15 minutes before the end. This gives the transcoding a chance to complete before the movie finishes and I then only have to wait a few minutes for the playback time to reach the end of the playback buffer before the move quite prematurely.

 

Thanks for any help.

Link to comment
Share on other sites

OK so for you this doesn't appear to be codec related if it's happening with both hevc and divx files.
Do you have any AVC/h.264 content you could try for us as well?  Really curious if this one works or not.
 

Are you transcoding to the internal drive or a different drive?  How much free space is available on that drive?

Link to comment
Share on other sites

Yes, this happens with h.264 files as well if I force transcoding buy selecting a low playback bitrate.

The internal storage on the Shield was extended using a 64GB usb3 memory stick formatted as internal storage. The Emby transcoding temp directory is located here. There's 50GB+ free on the internal storage.

Link to comment
Share on other sites

I can't help but wonder if this is hardware related in some fashion?

Do you by any chance have another drive attached that you could put the transcode directory on so that it's not an internal/external hybrid drive?

Link to comment
Share on other sites

When I first got the Shield, I didn't use any external memory, Emby was installed on the Shield internal memory and the transcoding temp directory was also located on the internal memory. I was having this problem just with the internal memory so I decided to try extending the memory to see if it was space related. I installed the 64GB usb stick as Shield internal memory and all the installed apps and directories were moved over to the stick as part of the process.

The only thing I could try now is adding another usb hard drive (and not make it internal storage) then move the transcoding temp directory to the new usb hard drive. I'm not convinced this is a hardware problem because that would imply both the Shield internal storage and my 64GB usb memory stick are both bad. But, this is a problem for me since a lot of my media is MPEG4 xvid/divx and needs to be transcoded, so I'm willing to try anything to fix this. I'll see if I can find another usb hdd or memory stick and try moving the transcoding temp directory to that drive.

Thanks for your help.

Link to comment
Share on other sites

41 minutes ago, Danlo said:

The only thing I could try now is adding another usb hard drive (and not make it internal storage) then move the transcoding temp directory to the new usb hard drive. I'm not convinced this is a hardware problem because that would imply both the Shield internal storage and my 64GB usb memory stick are both bad. But, this is a problem for me since a lot of my media is MPEG4 xvid/divx and needs to be transcoded, so I'm willing to try anything to fix this. I'll see if I can find another usb hdd or memory stick and try moving the transcoding temp directory to that drive.

I would give this a try if possible.

Link to comment
Share on other sites

OK, I attached a usb 3 hdd to the shield and created a temporary folder to use as a transcoding temp folder but as soon as I tried to configure Emby to point to that hdd and folder, it complained about not having write access. I was able to create a folder on that hdd from the Shield so it's definitely writable.

Anyway, I then decided to try using a folder on my NAS box which is SMB mounted on the Shield. I was successfully able to configure Emby to use a transcoding temp folder on the NAS box. Testing the same files I had before still resulted in the same problem even with the transcoding temp folder pointed somewhere else.

So this doesn't appear to be related to the storage used to locate the transcoding temp folder.

Link to comment
Share on other sites

No it doesn't and thank you for doing that which helps to focus where the problem might be.

Link to comment
Share on other sites

  • 2 weeks later...

Done some more testing. All my media is located on a NAS device which is SMB mounted on the Shield TV, all the Emby libraries are pointed to folders on the SMB shares. To rule out any problems with the network or NAS device itself, I copied a few sample files direly onto the Shield TV internal storage and created a new test library. The problem still persisted after doing this.

To test if there was something up with the Shield TV itself, I enabled the PLEX TV media server on the Shield TV and pointed a library at the same files on the NAS device that failed with Emby and all these played perfectly with PLEX. 

Link to comment
Share on other sites

I did actually but it was not intentional. The USB stick I was using to extend the Shield internal storage went bad and the Emby files and database were on that stick. I attached a new USB drive as Shield extended storage and installed the latest 4.6.0.6 beta from scratch and reconfigured all my libraries. 

Link to comment
Share on other sites

  • 2 weeks later...

Yes, the transcoding finishes quicker when throttling is disabled and the playback fails quicker than it would with throttling enabled. So, it still fails in the same way as before just more quickly.

Link to comment
Share on other sites

OK, thanks. That's what I wanted to find out - whether playback stop always coincides exactly with the end of transcoding.

The downside: I don't have many ideas about what might be happening here.

But one: Could you check the main Emby Server logs for whether it could be that a new log is started each time when transcoding (and playback) has ended?

What I want to find out is: could it be that Emby Server crashes each time when transcoding stops? (and just be auto-restarted immediately after)
An indication for this would be that a new server log file is created each time when this happens.

 

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