AppleTV4: "Error writing media: 10054 - An existing connection was forcibly closed by the remote"

Thank you - passed on. Have not checked but did you set logging level to be verbose on the plex for Apple TV app

yes I did :slight_smile:

Hi any findings/news?

@ricardo_duron said:
Hi any findings/news?

Nothing yet - Devs trying to reproduce the problem but not succeeding so far. Still looking into it

@ricardo_duron sorry for the delay. I have been looking into this but am yet to be able to reproduce. I have a very similar network setup here and playback via Direct Play (720p movie with AC3 surround audio) plays from start to finish without buffering or pausing.

Is the behaviour you are seeing consistent with particular files? or does it occur with all videos you have tested that support direct play (MP4).

If you have a USB-C cable you could try to grab the Apple TV console logs that will contain much more detail about what might be going on. There is some helpful information on grabbing the console logs here in our support article: https://support.plex.tv/hc/en-us/articles/212639598-Apple-TV-Logs

If you can narrow down the issue to a few files that cause the issue, would you be able to PM me a link to download the files so that I might test them here to see if I can reproduce the issue?

@chrisallen Hi and thanks for your support.

I posted both server and apple TV logs in a private message to you previously and sa2000. Did you not receive those, or did I not capture incorrect logs?

Should I take new apple TV logs?

I will try to upload one video file and send you a link through a PM

in the mean time, merry Christmas :slight_smile:

@ricardo_duron said:
I posted both server and apple TV logs in a private message to you previously and sa2000. Did you not receive those, or did I not capture incorrect logs?

Should I take new apple TV logs?

Was that Apple TV IOS Console Log or Plex App log?
Apple TV IOS Console Log section ( https://support.plex.tv/hc/en-us/articles/212639598-Apple-TV-Logs )

I followed the link you have pointed out for apple tv console logs. I can share again. you should have a PM shortly.

Hi,

I have tested further, and I am a bit puzzled. This issue appear when trying to play Mp4 files, created using NoteBurner M4V Converter Plus. As stated in your guides I have used the “Same as source for mp4” setting. When I use PavTuve Video converter Ultimate to convert to an M4v files, the issue cannot be reproduced. Direct Play seems to be used since I can see rendered images when fast forwarding in the apple TV4.

This seems more and more like a container issue?

As soon as I use transcoding or rely on Direct Stream this issue cannot be reproduced. This is only an issue when using direct play.

Did you receive the Apple TV console logs in the PM I sent you? Or are those wrong logs?

Regards
Ricardo

@ricardo_duron said:
Hi,

I have tested further, and I am a bit puzzled. This issue appear when trying to play Mp4 files, created using NoteBurner M4V Converter Plus. As stated in your guides I have used the “Same as source for mp4” setting. When I use PavTuve Video converter Ultimate to convert to an M4v files, the issue cannot be reproduced. Direct Play seems to be used since I can see rendered images when fast forwarding in the apple TV4.

This seems more and more like a container issue?

As soon as I use transcoding or rely on Direct Stream this issue cannot be reproduced. This is only an issue when using direct play.

Did you receive the Apple TV console logs in the PM I sent you? Or are those wrong logs?

Regards
Ricardo

Thanks - got the ATV log. Is this the right log ? The timestamps are November 30. Also the file was created 30th November - a lot has happened since then in terms of new versions of Plex Media Server

Could you provide the devs the file used on this test or perhaps a sample file that you know would cause the problem
See Generating Sample Files from Media

thanks for your reply. I captured the logs in november, attached them back then. However, I understood from chrisallen’s comment on 22nd of december he had not received the logs? That is why I re-sent them to you and him as PM.

I will try to upload a sample file, based on your guide.

I am very uncomfortable that you are providing evidence that is a month old

There was a Plex for Apple TV release on 17th December (version 1.0.4) and 3 server releases since november 30th. It is always best to provide evidence using latest versions

Also please when providing logs say exactly what time the error arose and to get a full picture of what is happening it is better to also include the plex media server.log with debug logging enabled

Alright, I will get you some logs again.

I have tried to record a sample using your guide:
“C:\Program Files (x86)\Plex\Plex Media Server\PlexNewTranscoder.exe” -i “C:\downloads\file.mp4” -t 120 -map 0 -c copy “output.mp4”

I tried to make a sample but get error message “Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument” on some files and cannot create the output file.

After trying on several files, I succeeded in creating the sample file However, I cannot reproduce the issue I am having on the sample file.

What is consistent is that I get the below message on all tested files.

How do you think I should proceed?

Should I focus on getting new logs, as you stated above? Or should I continue to try to create a sample where the issue is reproducible?

Regards
Ricardo

Message from command prompt:
[mp4 @ 05c0b020] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 1 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 2 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 3 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 4 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 5 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 6 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 7 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 8 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 9 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 10 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 11 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 12 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 13 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 14 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 15 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 16 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 17 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 18 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 19 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 20 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 21 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 22 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 23 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] Codec for stream 24 does not use global headers but container format requires global headers
[mp4 @ 05c0b020] track 1: codec frame size is not set

May be the issue with getting the sample is the same issue that is causing the problem.

See if you can get the problem with a small media file so would use the original file as the sample if it is not massive - you would need to upload to Dropbox or similar service

Hi, sorry for the late response. I have been testing ALOT. It appears to be something in the container of the encoded files I have tested. Something that the apple TV4 app does not like. I tried to re-encode the same video file using another encoder and suddenly it works on the apple TV4.

What bugs me is that the same file, that will not play on AppleTV4, works on the Plex app on iphone, android and WebApp(PC Windows) using direct play. So it should be related to the Apple TV4 specific app.

I have tried to create a sample, but apparently the tool changes the container and I cannot reproduce the problem from the samples.

Any ideas on how to proceed?

Thanks for feedback. I have passed this on

what is the smallest size media file that shows the problem? Is it possible to upload one somewhere and share link?

I have now uploaded a sample. I will send you a link as a PM.

Done. Please reply once you have downloaded the sample, so that I can remove it.

@ricardo_duron said:
Done. Please reply once you have downloaded the sample, so that I can remove it.

Passed to the Devs - will let you know once it has been downloaded by the development team. How big is the rar file?