airforceixi 0 Posted March 5, 2019 Share Posted March 5, 2019 (edited) Like the title says, I have some recordings that fail to play on the Roku. I'm not sure if this is Roku specific but the issue only exists for me when using my Roku Ultra. They play fine on Web or Android but Roku just sits at "Retrieving" endlessly. Fast forwarding/rewinding does nothing. What's strange is that they are recordings of the same show, Dr. Phil (for the wife, don't judge). One day's recording is fine, the next day it fails. Reviewing the logs I can see that ffmpeg is throwing an error during processing. All episodes are recorded using Emby's DVR feature with an HDHomeRun Connect Quatro. Channel has 8vsb lock and 100% strength and quality. Server is running Centos 7.6 with Emby 4.1.0.10 BETA. I have not yet tried 4.1.0.12, however I have been experiencing this issue since before 4.1. Attached is a tarball with a part of the embyserver log, ffmpeg logs of a bad (S17E113) and a good (S17E114) playback, as well as 30 second snippets of each from the beginning. If anyone could assist with this, I would appreciate it! EDIT: The forum didn't let me attach the tar.gz file. Here's a google drive link: https://drive.google.com/open?id=1FfkQqn98wB9oOVGZF0rujYUAuiYOmeAO Edited March 5, 2019 by airforceixi Link to comment Share on other sites More sharing options...
Luke 36881 Posted March 6, 2019 Share Posted March 6, 2019 Thanks. @@speechles can try this file. Link to comment Share on other sites More sharing options...
speechles 1911 Posted March 6, 2019 Share Posted March 6, 2019 (edited) Those 30 second snippets work just fine for me on the Roku ultra both 4640 and 4660. I can see they are 1080p mpeg2 in TS. We cannot direct play TS on the Roku and allow a user to resume/seek so we use directstream/remux. The app has built-in video player fallback recovery so if there is an error in directstream on your Roku ultra this should pick right back up transcoding the video stream and you may notice a weird buffering while it does this. This is us restarting the video player back up after the error closed our video player. If the file is actually corrupted this would cause your Roku to hang until the timeout of the player session happens. After the timeout it may try to change playmethod and start the video player again. The app is told to try 3x to fallback through errors and then to give up and let the users resume. Do you keep a resume point when this happens? Can you resume when this happens? Edited March 6, 2019 by speechles Link to comment Share on other sites More sharing options...
airforceixi 0 Posted March 7, 2019 Author Share Posted March 7, 2019 Those 30 second snippets work just fine for me on the Roku ultra both 4640 and 4660. I can see they are 1080p mpeg2 in TS. We cannot direct play TS on the Roku and allow a user to resume/seek so we use directstream/remux. The app has built-in video player fallback recovery so if there is an error in directstream on your Roku ultra this should pick right back up transcoding the video stream and you may notice a weird buffering while it does this. This is us restarting the video player back up after the error closed our video player. If the file is actually corrupted this would cause your Roku to hang until the timeout of the player session happens. After the timeout it may try to change playmethod and start the video player again. The app is told to try 3x to fallback through errors and then to give up and let the users resume. Do you keep a resume point when this happens? Can you resume when this happens? When this happens I can't get playback, at all, so I don't have any resume points. My wife said she let Roku sit at "retrieving" for a while but I don't know what a while is. It seems ffmpeg itself bombs starting the remux. I should try to see if these 30 second snippets work on my system. I'm wondering if me cutting the file down with ffmpeg somehow fixed an issue with the TS file. Link to comment Share on other sites More sharing options...
rouq 23 Posted March 7, 2019 Share Posted March 7, 2019 If it's like I see on my Roku, the retrieve progress bar goes to 1/3 for a second and then, go back to 0% and sit there to infinit. No timeout, no message, nothing. It happens on 50% of my recordings now. It started doing this arround the time I installed server 4.1.0.8 beta. All my recordings need to direct steam since the tv doesn't support Dolby Digital. I didn't have time to go in the logs. However, I suspect there is sometime in the TS header that is missing because if I pass the recording in the quick fix tool in Videoredo software, then the Roku can play it properly, even thought VideoRedo doesn't report eny error in the stream. Link to comment Share on other sites More sharing options...
airforceixi 0 Posted March 7, 2019 Author Share Posted March 7, 2019 (edited) If it's like I see on my Roku, the retrieve progress bar goes to 1/3 for a second and then, go back to 0% and sit there to infinit. No timeout, no message, nothing. It happens on 50% of my recordings now. It started doing this arround the time I installed server 4.1.0.8 beta. All my recordings need to direct steam since the tv doesn't support Dolby Digital. I didn't have time to go in the logs. However, I suspect there is sometime in the TS header that is missing because if I pass the recording in the quick fix tool in Videoredo software, then the Roku can play it properly, even thought VideoRedo doesn't report eny error in the stream. This is exactly what I see. Edited March 7, 2019 by airforceixi Link to comment Share on other sites More sharing options...
rouq 23 Posted March 7, 2019 Share Posted March 7, 2019 I checked the ffmpeg logs, there is a several errors. But I've been using the roku for a while now to watch recordings. It just started doing this. Also, it's not happening only on 1 channel. I see this on recordings from multiple channels. Here what I see: [mpeg2video @ 0x1edb4c0] Invalid frame dimensions 0x0.Last message repeated 12 times[mpegts @ 0x1ebbf00] decoding for stream 0 failed[mpegts @ 0x1ebbf00] PES packet size mismatch[mpegts @ 0x1ebbf00] Could not find codec parameters for stream 0 (Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, top first)): unspecified sizeConsider increasing the value for the 'analyzeduration' and 'probesize' options[mpegts @ 0x1ebbf00] Could not find codec parameters for stream 3 (Unknown: none ([241][0][0][0] / 0x00F1)): unknown codecConsider increasing the value for the 'analyzeduration' and 'probesize' optionsInput #0, mpegts, from 'file:/volume1/dvr/EmbyDefaultMedia/La Voix extra/Season 1/La Voix extra S01E04.ts':Duration: 00:30:58.39, start: 81865.754700, bitrate: 18446 kb/sProgram 1Stream #0:0[0x31]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, top first), 29.97 fps, 29.97 tbr, 90k tbn, 90k tbcStream #0:1[0x34](fre): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/sStream #0:2[0x35](frm): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired)Stream #0:3[0x105]: Unknown: none ([241][0][0][0] / 0x00F1)Stream mapping:Stream #0:0 -> #0:0 (copy)Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))Press [q] to stop, [?] for help[ac3 @ 0x1f0e280] frame sync errorError while decoding stream #0:1: Invalid data found when processing input[segment @ 0x1ee7ac0] dimensions not setCould not write header for output file #0 (incorrect codec parameters ?): Invalid argumentError initializing output stream 0:1 --[aac @ 0x1f879c0] Qavg: -nanConversion failed! Link to comment Share on other sites More sharing options...
airforceixi 0 Posted March 7, 2019 Author Share Posted March 7, 2019 Very similar error here. [mpeg2video @ 0x994200] Invalid frame dimensions 0x0. Last message repeated 17 times [mpegts @ 0x975380] decoding for stream 0 failed [mpegts @ 0x975380] PES packet size mismatch Last message repeated 1 times [mpegts @ 0x975380] Could not find codec parameters for stream 0 (Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, top first)): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, mpegts, from 'file:/mnt/Media/TV Shows/Dr. Phil (2002)/Season 17/Dr. Phil S17E113 The Most Enabling Mother in America.ts': Duration: 01:03:57.66, start: 9946.153544, bitrate: 15797 kb/s Program 1 Stream #0:0[0x31]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, top first), 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc Stream #0:1[0x34](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s Stream #0:2[0x35](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s [segment @ 0x99a9c0] dimensions not set Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Last message repeated 1 times Link to comment Share on other sites More sharing options...
speechles 1911 Posted March 7, 2019 Share Posted March 7, 2019 It would seem either the TS header is broken/misaligned/corrupt or... something in the ffmpeg used is not properly reading the header. The Roku app would think there is just congestion and the data will get here someday. It will wait on the stalled ffmpeg. This is where the issue lies. The app calls the videoplayer and expects its logic to timeout and give us back control. Then we fallback rinse + repeat a few times. After that all is said and done pop an error and tell the user the error that was received. The problem is something in Roku firmware video logic on some firmwares isn't giving us back control. In fact some RokuTV when this happens will stall until the runtime pointer falls into garbage and just reboot/restart. When in this condition it becomes impossible to close the video node so even if we ran a timer to get control back it would already be too late. Were these existing TS files you have had for some time? Or are these new rather recently created? Do they play just fine in other Emby apps that use transcoding? Link to comment Share on other sites More sharing options...
airforceixi 0 Posted March 7, 2019 Author Share Posted March 7, 2019 These recordings were done recently, as of the past week or two. It's very possible that the header is corrupt somehow because ffmpeg always shows "PES packet size mismatch" on the videos that cause the failure to occur. The only other devices I have tested are web and the Android app which seem to play all of them just fine. Link to comment Share on other sites More sharing options...
rouq 23 Posted March 7, 2019 Share Posted March 7, 2019 @speechless Those are newly created recordings. Yes, they play fine in the web app. I set the biterate so transcoding is needed and they play fine. Link to comment Share on other sites More sharing options...
speechles 1911 Posted March 7, 2019 Share Posted March 7, 2019 (edited) If you use MKVToolNix GUI and just drag 'n drop the file onto the GUI window you can Remux these into MKV. Takes literally a few seconds to do. As MKV you can avoid the issue entirely. MKV has much better support on Roku than TS. If these are recordings this is "advice for life" to use with Roku. TS is just fine for live streams, but for everything else MKV is where the sweet spot lies. Edited March 7, 2019 by speechles Link to comment Share on other sites More sharing options...
airforceixi 0 Posted March 7, 2019 Author Share Posted March 7, 2019 If you use MKVToolNix GUI and just drag 'n drop the file onto the GUI window you can Remux these into MKV. Takes literally a few seconds to do. As MKV you can avoid the issue entirely. MKV has much better support on Roku than TS. If these are recordings this is "advice for life" to use with Roku. TS is just fine for live streams, but for everything else MKV is where the sweet spot lies. These recordings are generated by Emby. Is there a way to have Emby write them as MKV instead of TS? Link to comment Share on other sites More sharing options...
ebr 14858 Posted March 7, 2019 Share Posted March 7, 2019 These recordings are generated by Emby. Is there a way to have Emby write them as MKV instead of TS? You can convert them using our Convert feature. Link to comment Share on other sites More sharing options...
airforceixi 0 Posted March 8, 2019 Author Share Posted March 8, 2019 The convert feature seems to work, however I feel that this is simply a workaround for a couple issues. It appears that Emby is inconsistently recording these files occasionally causing the errors in the header; ffmpeg, during playback to a Roku device, is unable to properly handle these header issues and simply bombs; and the failure of the ffmpeg process is not being properly relayed to the user. The workaround, although it works, results in a delay of the availability of the recording for playback. If the only solution to this issue is, in fact, converting the recording, would it be possible to have the option to convert the recording as it's recording rather than afterwards? Link to comment Share on other sites More sharing options...
Spaceboy 2484 Posted March 8, 2019 Share Posted March 8, 2019 The convert feature seems to work, however I feel that this is simply a workaround for a couple issues. It appears that Emby is inconsistently recording these files occasionally causing the errors in the header; ffmpeg, during playback to a Roku device, is unable to properly handle these header issues and simply bombs; and the failure of the ffmpeg process is not being properly relayed to the user. The workaround, although it works, results in a delay of the availability of the recording for playback. If the only solution to this issue is, in fact, converting the recording, would it be possible to have the option to convert the recording as it's recording rather than afterwards? we used to have this. It’s still not clear why it was removed or if it’s ever coming back Link to comment Share on other sites More sharing options...
ebr 14858 Posted March 8, 2019 Share Posted March 8, 2019 we used to have this. It’s still not clear why it was removed I'm sorry, but please don't post mis-information. We made it very clear why it was removed. It was very unreliable and created un-playable recordings. Link to comment Share on other sites More sharing options...
Spaceboy 2484 Posted March 8, 2019 Share Posted March 8, 2019 I'm sorry, but please don't post mis-information. We made it very clear why it was removed. It was very unreliable and created un-playable recordings.so you say. Worked fine for me and everyone I talk to about it Link to comment Share on other sites More sharing options...
Spaceboy 2484 Posted March 8, 2019 Share Posted March 8, 2019 I'm sorry, but please don't post mis-information. We made it very clear why it was removed. It was very unreliable and created un-playable recordings.also it’s quite interesting to note the contrasting approach to this and the removal of the delete function. Link to comment Share on other sites More sharing options...
mchallis 9 Posted March 10, 2019 Share Posted March 10, 2019 (edited) I'm having the same problem. 4.1.0.11 beta, Roku Ulra, HDHomeRun Connect Quatro. It started happening with the emby 4 series. Each week now I have a few new DVR recordings that I cannot watch on the roku. I can watch on Google chrome. I hope this can be resolved. I will keep watching this thread. Edited March 10, 2019 by mchallis Link to comment Share on other sites More sharing options...
mchallis 9 Posted March 10, 2019 Share Posted March 10, 2019 Can I have some step by step instructions on how to convert? thanks Link to comment Share on other sites More sharing options...
ebr 14858 Posted March 10, 2019 Share Posted March 10, 2019 Can I have some step by step instructions on how to convert? thanks Hi. In the web app, right click on an item and select "Convert..." Please let us know if this answers your question. Link to comment Share on other sites More sharing options...
mchallis 9 Posted March 10, 2019 Share Posted March 10, 2019 (edited) I looked at the convert options. What should I select ? TV Profile? Thanks Edited March 10, 2019 by mchallis Link to comment Share on other sites More sharing options...
speechles 1911 Posted March 10, 2019 Share Posted March 10, 2019 (edited) The best way is to just change the container. Use MKVToolNix GUI. Open the program and then drag your video onto the top left panel. It will show all the streams inside and list in the panel below. Make sure all are selected to copy and use. Select all. Now click start remux. It should be done pretty quickly. Now you have an MKV with copied streams for all. No quality loss. MKV is directly playable on Roku. Edited March 10, 2019 by speechles Link to comment Share on other sites More sharing options...
Luke 36881 Posted March 12, 2019 Share Posted March 12, 2019 TV profile will work for Roku. The mobile one will as well. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now