Streaming issues

Help and support for HDHomeRun DVR and HDHomeRun software for Windows 10, Mac, Android, XBox, etc.
Post Reply
sdust
Posts: 69
Joined: Sat Jun 05, 2021 3:39 am
x 1

Streaming issues

Post by sdust »

I was always curious why there is such a delay when flipping channels. (for the last week that is)

Firing ffprobe from ffmpeg suite against stream url:

Code: Select all

$ ffprobe   http://10.168.0.234:5004/auto/v15.7 -v info
ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers

[mpeg2video @ 0x5587bc384de0] Invalid frame dimensions 0x0.
    Last message repeated 7 times
[mpegts @ 0x5587bc375fc0] Could not find codec parameters for stream 1 (Audio: ac3 ([129][0][0][0] / 0x0081), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'http://10.168.0.234:5004/auto/v15.7':
  Duration: N/A, start: 25541.562400, bitrate: N/A
  Program 18
    Stream #0:2[0x75]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 128 kb/s
  No Program
    Stream #0:0[0x71]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bottom first), 704x480 [SAR 40:33 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x74]: Audio: ac3 ([129][0][0][0] / 0x0081), 0 channels, fltp


So I am guessing something is wrong with the stream (at least at the beginning).

Online
nickk
Silicondust
Posts: 16938
Joined: Tue Jan 13, 2004 9:39 am
x 101

Re: Streaming issues

Post by nickk »

It takes about 500ms for the tuner to tune. Then it locates the PAT and PMT which usually repeat in the stream pretty quickly. Then the video decoder needs to find an I-frame which for ATSC 1.0 is every 500ms.

Some platforms require additional buffering for hardware decode but generally the channel change should be comparable to a normal TV.

Nick

sdust
Posts: 69
Joined: Sat Jun 05, 2021 3:39 am
x 1

Re: Streaming issues

Post by sdust »

The problem is the garbage at the beginning. It confuses ffmpeg:

Code: Select all

[mpeg2video @ 0x555c57717e20] Invalid frame dimensions 0x0.
    Last message repeated 28 times
[mpegts @ 0x555c57713800] PES packet size mismatch


Frame dimensions 0x0? ;)

Online
nickk
Silicondust
Posts: 16938
Joined: Tue Jan 13, 2004 9:39 am
x 101

Re: Streaming issues

Post by nickk »

The HDHomeRun sends data as it arrives. It is up to the demuxer to find a sync point for audio and a sync point for video.

sdust
Posts: 69
Joined: Sat Jun 05, 2021 3:39 am
x 1

Re: Streaming issues

Post by sdust »

nickk wrote: Mon Jun 07, 2021 11:33 pm The HDHomeRun sends data as it arrives. It is up to the demuxer to find a sync point for audio and a sync point for video.
This doesn't explain 0x0 size frames at the beginning Can you just not send any data before the first I-frame is received?

foxbat121
Posts: 1995
Joined: Tue Jan 05, 2010 3:48 pm
Device ID: 131087C9, 13233B7C
x 5

Re: Streaming issues

Post by foxbat121 »

I would assume to inspect inside the stream would add a lot overhead to the tuner (which usually does not include a powerful processor) hardware while give no obvious advantage at all. The live TV viewing app should anticipate and behave correctly on these live transportation streams. It is not really streaming. For example, my Prime tuner bought over a decade ago can support MPEG2, H.264 and now HEVC 4K streams without problems mostly because it doesn't care what's inside the transportation stream.

sdust
Posts: 69
Joined: Sat Jun 05, 2021 3:39 am
x 1

Re: Streaming issues

Post by sdust »

foxbat121 wrote: Tue Jun 08, 2021 6:16 am I would assume to inspect inside the stream would add a lot overhead to the tuner (which usually does not include a powerful processor) hardware while give no obvious advantage at all. The live TV viewing app should anticipate and behave correctly on these live transportation streams. It is not really streaming. For example, my Prime tuner bought over a decade ago can support MPEG2, H.264 and now HEVC 4K streams without problems mostly because it doesn't care what's inside the transportation stream.
Should I think about EXTEND in my future? ;)
HDHomeRun Extend (HDTC-2US) has the same features as HDHomeRun CONNECT, plus adds the ability to convert the incoming video into H.264 format, making it more suitable for streaming over wireless connections and to portable devices like phones and tablets.

foxbat121
Posts: 1995
Joined: Tue Jan 05, 2010 3:48 pm
Device ID: 131087C9, 13233B7C
x 5

Re: Streaming issues

Post by foxbat121 »

Maybe but is it still in production? [removed by moderator - see forum rules]

Online
nickk
Silicondust
Posts: 16938
Joined: Tue Jan 13, 2004 9:39 am
x 101

Re: Streaming issues

Post by nickk »

You have the right HDHomeRun hardware.

FFmpeg should handle the stream without issue. Some warnings at the start is normal. It won't be able to detect the frame size until the next GOP.

Are you seeing a problem with FFmpeg?

Nick

sdust
Posts: 69
Joined: Sat Jun 05, 2021 3:39 am
x 1

Re: Streaming issues

Post by sdust »

nickk wrote: Tue Jun 08, 2021 9:37 am You have the right HDHomeRun hardware.

FFmpeg should handle the stream without issue. Some warnings at the start is normal. It won't be able to detect the frame size until the next GOP.

Are you seeing a problem with FFmpeg?
Yes. ffmpeg can not handle the stream. Wonder what EXTEND uses to transcode.

Online
nickk
Silicondust
Posts: 16938
Joined: Tue Jan 13, 2004 9:39 am
x 101

Re: Streaming issues

Post by nickk »

We use FFmpeg regularly for testing.

Can you post what you are trying to do (actual commands).

Nick

sdust
Posts: 69
Joined: Sat Jun 05, 2021 3:39 am
x 1

Re: Streaming issues

Post by sdust »

I think I was doing something wrong. I was thrown out by the number of errors.

Here is the command:

Code: Select all

ffmpeg -hide_banner -loglevel warning -nostdin -i http://192.168.0.238:5004/auto/v11.3 -vn -acodec aac -ac 2 -f adts -
This allows my mp3 player play TV audio.

Apologies for the noise.

Post Reply