NextPVR Forums

Full Version: Malformed data -5 On HDHomerun
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I just set up NextPVR on a Raspberry Pi 4B, HDHomerun Duo and Roku TV. I am so impressed by how much nicer the NextPVR interface is than the HDHomerRun app. However. When I'm watching a channel with marginal reception (a little pixelated but totally viewable) The Stream stops and displays the error: "-5 malformed data" then goes back to the NextPVR menu. I think this might be just with the Roku App. But it could be more general. 

Here is the NextPVR log:
<pre>
2022-02-08 18:47:28.607 [DEBUG][16] checking: HDHomeRun 10909745-1
2022-02-08 18:47:28.607 [DEBUG][16] enabled and present
2022-02-08 18:47:28.607 [DEBUG][16] has channel
2022-02-08 18:47:28.607 [DEBUG][16] live tv is possible
2022-02-08 18:47:28.607 [DEBUG][16] HDHomeRunRecorder.StartStream()
2022-02-08 18:47:28.607 [DEBUG][16] ipaddress is 192.168.0.102
2022-02-08 18:47:28.607 [DEBUG][16] building graph
2022-02-08 18:47:28.607 [DEBUG][16] About to load channel from tuning
2022-02-08 18:47:28.609 [DEBUG][16] source@1
2022-02-08 18:47:28.609 [DEBUG][16] Requesting: http://192.168.0.102:5004/tuner1/v11.1
2022-02-08 18:47:29.032 [DEBUG][16] Creating writer: LIVE&/home/pi/recordings/live-WBALDT-432-2.ts
2022-02-08 18:47:29.032 [DEBUG][4] HTTP input source starting
2022-02-08 18:47:29.032 [DEBUG][16] live mode
2022-02-08 18:47:29.033 [DEBUG][16] Created Mutex: Global\NPVR-mutex-e7641132f8f8e2ec5a2ee2615b1a68cd
2022-02-08 18:47:29.034 [DEBUG][16] Created map: /home/pi/recordings/live-WBALDT-432-2.ts.map
2022-02-08 18:47:29.034 [DEBUG][16] StartStream [LIVE&/home/pi/recordings/live-WBALDT-432-2.ts] allocated handle: 2
2022-02-08 18:47:29.034 [DEBUG][16] StartStream() returned handle=2
2022-02-08 18:47:29.034 [DEBUG][16] Allocated Handle: 2
2022-02-08 18:47:29.034 [DEBUG][16] Live TV handle: 0x160002
2022-02-08 18:47:29.034 [DEBUG][16] StartStream(7164:WBALDT, LIVE&/home/pi/recordings/live-WBALDT-432-2.ts) allocated handle: 1441794
2022-02-08 18:47:29.034 [DEBUG][16] Handle: 160002
2022-02-08 18:47:29.034 [DEBUG][16] StreamNative@9 (storing stream handle: 1441794)
2022-02-08 18:47:29.034 [DEBUG][16] clientHandle[sdl-e8a2288b-2e9f-5ba0-9255-a5fa77f061bb] = 1441794 *
2022-02-08 18:47:29.234 [DEBUG][16] StreamNative@10 (with close monitoring...)
2022-02-08 18:47:29.234 [DEBUG][16] RollingFile.Open(/home/pi/recordings/live-WBALDT-432-2.ts) ..
2022-02-08 18:47:29.237 [DEBUG][16] File is in live mode
2022-02-08 18:47:29.239 [DEBUG][16] Renew lease ok (0x160002)
2022-02-08 18:47:29.241 [DEBUG][16] Renew lease ok (0x160002)
2022-02-08 18:47:34.242 [DEBUG][16] Renewed lease... (160002)
2022-02-08 18:47:34.242 [DEBUG][16] Renew lease ok (0x160002)
2022-02-08 18:47:39.326 [DEBUG][16] Renewed lease... (160002)
2022-02-08 18:47:39.326 [DEBUG][16] Renew lease ok (0x160002)
2022-02-08 18:47:40.901 [DEBUG][23] Got request [192.168.0.240]: /service (system.log)
2022-02-08 18:47:40.902 [DEBUG][23] method=system.log
2022-02-08 18:47:40.902 [DEBUG][23] parameters:
2022-02-08 18:47:40.902 [DEBUG][23] method: system.log
2022-02-08 18:47:40.902 [DEBUG][23] msg: Live buffering time 12319 true
2022-02-08 18:47:40.902 [DEBUG][23] sid: aa20ebd5759948a990907fed719d464f
2022-02-08 18:47:40.902 [DEBUG][23] format: json
2022-02-08 18:47:40.902 [DEBUG][23] client_ip: 192.168.0.240
2022-02-08 18:47:40.902 [DEBUG][23] user_agent: Roku/DVP-10.5 (10.5.0.4210-88)
2022-02-08 18:47:40.902 [DEBUG][23] host_callback: ...
2022-02-08 18:47:40.902 [DEBUG][23] Live buffering time 12319 true
2022-02-08 18:47:40.902 [DEBUG][23] {"stat":"ok"}^M

2022-02-08 18:47:40.913 [DEBUG][22] Got request [192.168.0.240]: /control
2022-02-08 18:47:40.913 [DEBUG][22] - format: json
2022-02-08 18:47:40.913 [DEBUG][22] - quality: high
2022-02-08 18:47:40.913 [DEBUG][22] - client: sdl-e8a2288b-2e9f-5ba0-9255-a5fa77f061bb
2022-02-08 18:47:40.913 [DEBUG][22] - sid: aa20ebd5759948a990907fed719d464f
2022-02-08 18:47:40.913 [DEBUG][22] - media: 1.401
2022-02-08 18:47:40.924 [DEBUG][5] Setting activity:
2022-02-08 18:47:42.227 [DEBUG][22] Got request [192.168.0.240]: /control
2022-02-08 18:47:42.227 [DEBUG][22] - format: json
2022-02-08 18:47:42.227 [DEBUG][22] - quality: high
.. repeats ...
2022-02-08 18:47:56.825 [DEBUG][23] - quality: high
2022-02-08 18:47:56.825 [DEBUG][23] - client: sdl-e8a2288b-2e9f-5ba0-9255-a5fa77f061bb
2022-02-08 18:47:56.825 [DEBUG][23] - sid: aa20ebd5759948a990907fed719d464f
2022-02-08 18:47:56.825 [DEBUG][23] - key: 131155
2022-02-08 18:47:56.827 [DEBUG][23] LiveTvPlayer.OnKeyDown() called: {CTRL}S
2022-02-08 18:47:56.870 [DEBUG][23] Setting activity: stop
2022-02-08 18:47:56.870 [DEBUG][23] PLAYBACK_STOPPED@1
2022-02-08 18:47:56.873 [DEBUG][23] PLAYBACK_STOPPED@2
2022-02-08 18:47:56.873 [DEBUG][23] /Settings/General/ShowNewInGuide is set to False
2022-02-08 18:47:56.873 [DEBUG][23] PLAYBACK_STOPPED@3
2022-02-08 18:47:56.874 [DEBUG][23] PLAYBACK_STOPPED@3.1
2022-02-08 18:47:56.874 [DEBUG][23] PLAYBACK_STOPPED@3.1.1
2022-02-08 18:47:56.901 [DEBUG][23] LoadChannelListings(channel=7148)
2022-02-08 18:47:56.998 [DEBUG][23] PLAYBACK_STOPPED@3.1.2 (0)
2022-02-08 18:47:56.999 [DEBUG][23] LoadChannelListings(channel=7164)
2022-02-08 18:47:57.057 [DEBUG][23] LoadChannelListings done (listings = 302)
... repeats...

2022-02-08 18:47:57.625 [DEBUG][23] LoadChannelListings(channel=7168)
2022-02-08 18:47:57.702 [DEBUG][23] LoadChannelListings done (listings = 363)
2022-02-08 18:47:57.740 [DEBUG][23] PLAYBACK_STOPPED@exit
2022-02-08 18:47:57.813 [DEBUG][16] StopStream(1441794)...
2022-02-08 18:47:57.813 [DEBUG][16] clientHandle[sdl-e8a2288b-2e9f-5ba0-9255-a5fa77f061bb] = 1441794
2022-02-08 18:47:57.813 [DEBUG][16] Calling StopStream()
2022-02-08 18:47:57.814 [DEBUG][16] StopStream(2)
2022-02-08 18:47:57.814 [DEBUG][16] StopStream handle: 2
2022-02-08 18:47:57.814 [DEBUG][16] Closing TSWriter....: LIVE&/home/pi/recordings/live-WBALDT-432-2.ts
2022-02-08 18:47:57.859 [ERROR][16] writer.Close() did not complete in a timely fashion
2022-02-08 18:47:57.859 [DEBUG][16] Close@2
2022-02-08 18:47:57.860 [DEBUG][16] Closing mapAccessor
2022-02-08 18:47:57.937 [DEBUG][15] ClientGetActivity() returning: ^M
{^M
"action": "stop"^M
^M
}^M

2022-02-08 18:47:57.937 [DEBUG][15] Setting activity:
2022-02-08 18:47:57.945 [DEBUG][15] Got request [192.168.0.240]: /control
2022-02-08 18:47:57.945 [DEBUG][15] - format: json
2022-02-08 18:47:57.946 [DEBUG][15] - quality: high
2022-02-08 18:47:57.946 [DEBUG][15] - client: sdl-e8a2288b-2e9f-5ba0-9255-a5fa77f061bb
2022-02-08 18:47:57.946 [DEBUG][15] - sid: aa20ebd5759948a990907fed719d464f
2022-02-08 18:47:57.946 [DEBUG][15] - media: stop
2022-02-08 18:47:57.946 [DEBUG][15] - message: -5 malformed data
2022-02-08 18:47:58.094 [DEBUG][15] Got request [192.168.0.240]: /service (system.log)
2022-02-08 18:47:58.094 [DEBUG][15] method=system.log
2022-02-08 18:47:58.094 [DEBUG][15] parameters:
2022-02-08 18:47:58.094 [DEBUG][15] method: system.log
2022-02-08 18:47:58.094 [DEBUG][15] msg: end-of-playlist
2022-02-08 18:47:58.094 [DEBUG][15] sid: aa20ebd5759948a990907fed719d464f
2022-02-08 18:47:58.094 [DEBUG][15] format: json
2022-02-08 18:47:58.094 [DEBUG][15] client_ip: 192.168.0.240
2022-02-08 18:47:58.094 [DEBUG][15] user_agent: Roku/DVP-10.5 (10.5.0.4210-88)
2022-02-08 18:47:58.094 [DEBUG][15] host_callback: ...
2022-02-08 18:47:58.094 [DEBUG][15] end-of-playlist
2022-02-08 18:47:58.094 [DEBUG][15] {"stat":"ok"}^M

</pre>
Please post in the appropriate sub-forum and attach the zipped logs not snippets. The error seems to match the scenario though, the Roku player is not very sophisticated and even on the Silicon Dust forum they note issues using Roku player. If you had a more powerful server you could turn on timeshifting since the m3u8 transcoding might smooth out small rough areas but you don't have that luxury. Any followups should be in the Roku sub forum here.

Martin
(2022-02-09, 12:36 AM)glmatrangola Wrote: [ -> ]I just set up NextPVR on a Raspberry Pi 4B, HDHomerun Duo and Roku TV. I am so impressed by how much nicer the NextPVR interface is than the HDHomerRun app. However. When I'm watching a channel with marginal reception (a little pixelated but totally viewable) The Stream stops and displays the error: "-5 malformed data" then goes back to the NextPVR menu. I think this might be just with the Roku App. But it could be more general. 

Do you only get this when trying to watching Live TV? Or does it also happen on recordings from the same channel? (There are several things behind the scenes that work differently between playing a recording and watching live.)

Also, have you set up NextPVR to do a remux to an .mp4 container in your postprocessing script file? The Roku handles the .mp4 container better than the native .ts container that NextPVR records.
@mvallevand Thanks for the quick reply. Sorry for the long dump. I'll do zips if logs are needed again. Searching through the forums the -4 error didn't show up, but I'll look for specific SiliconDust subs.

My current setup is with RPi 4b 32 Gb SD card. Tried a 64G USB SSD Drive and mapped "recordings" folder there, but the performance with that was worse. I ordered a 1T M.2 with USB3 adapter to give that a try for recordings. I also ordered a new Rock Pi 4B with built-in M.2 adapter which should be much faster. I'll try doing the timeshift when I get that. But it'll take a while to get here. Do you know if enabling the Video Codec (small fee from to Rpi) would help with the transcoding?

A quick look at htop seamed to indicate that the RPi was only using less than 20% of the 4 cores. While playing back live TV.

@BrettB Thanks for the suggestions. I tried a little playback and it seemed OK. But, I need to wait until I get more storage before I can do a real test, 32G SSD isn't cutting it. Is the remux to .mp4 the same solution as @mvallevand with timeshifting? Sorry, still new to NextPVR.
That is a Roku error with bad video files so the only solution is providing a cleaner source

The speed I am talking about is the optional timeshfited play. I expect your CPU would be much higher transcoding to h264 but it does help to fix some stream errors. I don't expect the Rock 4B to be much better then the Odroid N2 which isn't fast enough. I didn't order 4B yet but I do have the $5 pre order coupon.

Also make sure you pay attention the other threads on Roku sunsetting private channels like the NextPVR channel.

Martin
I saw the Roku thread. I feel bad for you! You put all that work into it and they just squash it. Jerks. I'm a developer too. Doing something similar to replace the iOS app for my car because Ford can't write software. But they could just change one little thing and completely deny me access to their api. I have a Roku TV and TV w/ roku stick RN. But might look for the TVo 4k thing and jump ship before I sink too much time into this thing. Roku has been getting on my nerves with the adds etc anyway.
I'll post on Roku's form but I feel like it's shouting into the wind sometimes dealing with these companies.
I'll post a review with the Rock 4B after I try it.
The TiVo has a great remote because of the number keys and it is on sale right now, but don't expect much in the way of firmware upgrade. The remote will be good in the future.

Martin