Opened 14 years ago

Closed 14 years ago

#9722 closed Patch - Bug Fix (Fixed)

HTTP streaming

Reported by: Jonatan <mythtv@…> Owned by: markk
Priority: minor Milestone: 0.25
Component: MythTV - Video Playback Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I had some troubles getting HTTP streaming to work reliably and managed to come up with a patch. If it's not a good solution, maybe it will at least give the devs a clue of what the problem might be.

RTMP also works (except seeking) if configured with --enable-librtmp.

Changes:

  • Changed url_read() to url_read_complete(). This got rid of logs from RingBuffer:Seek() complaining about reads returning less than requested.
  • Reopened the stream by calling url_close() followed by url_open() prior to calling av_open_input_stream(). This got rid of various decoding errors.
  • Added call to url_seek() in StreamingRingBuffer::Seek() to support seeking in HTTP streams

Attachments (3)

streaming.patch (5.4 KB) - added by Jonatan <mythtv@…> 14 years ago.
with_patch.log (16.9 KB) - added by Jonatan <mythtv@…> 14 years ago.
With url_close part of the patch, where RTMP works
without_patch.log (4.3 KB) - added by Jonatan <mythtv@…> 14 years ago.
Without url_close part of the patch, where RTMP doesn't work

Download all attachments as: .zip

Change History (11)

Changed 14 years ago by Jonatan <mythtv@…>

Attachment: streaming.patch added

comment:1 Changed 14 years ago by markk

Milestone: unknown0.25
Owner: changed from Janne Grunau to markk
Status: newaccepted

comment:2 Changed 14 years ago by markk

Partly applied in 0078315fdac33cffe4e9

comment:3 Changed 14 years ago by markk

Jonatan

Can you explain what the url_close element of the patch is adding? I'm not seeing any issues with decoder errors. Under what conditions are you seeing errors?

As far as the rtmp support is concerned, I'll hold off on this for now. Few people will have librtmp available and without any core integration, it is unlikely to be utilised for some time.

comment:4 in reply to:  3 Changed 14 years ago by Jonatan <mythtv@…>

Replying to markk:

Jonatan

Can you explain what the url_close element of the patch is adding? I'm not seeing any issues with decoder errors. Under what conditions are you seeing errors?

Good news is that HTTP now seem to be working fine even without the url_close element of the patch. RTMP still doesn't work without it though. I'll attach logfiles for when it works and when it doesn't.

As far as the rtmp support is concerned, I'll hold off on this for now. Few people will have librtmp available and without any core integration, it is unlikely to be utilised for some time.

Sure, no problem.

Changed 14 years ago by Jonatan <mythtv@…>

Attachment: with_patch.log added

With url_close part of the patch, where RTMP works

Changed 14 years ago by Jonatan <mythtv@…>

Attachment: without_patch.log added

Without url_close part of the patch, where RTMP doesn't work

comment:5 Changed 14 years ago by Github

Disallow seeking in http:// streams.

Seeking backwards in http streams will always fail and seeking forward only works on a small minority of files, with no obvious rationale for success. Attempting to allow seeking will almost certainly lead to a raft of user issues once UPnP Media Server support is added.

A further fix is needed to disable rewinding and limit fast forward to 3x or less (i.e. avoid actually seeking).

Refs #9722

Branch: master Changeset: 33be4fc94b2c9bc7cbd08e01df0c7d93853300d6

comment:6 Changed 14 years ago by Github

TV: Limit fast forward/rewinf if we cannot seek.

Refs #9722

Branch: master Changeset: 3db7e55ab26e5e01ed6a6cfb83bafed78fba3f5c

comment:7 Changed 14 years ago by Github

TV: Don't show jump options if we cannot jump.

Refs #9722

Branch: master Changeset: 5bcddfd2769c92fed6001f2f1f3ad493e3606e20

comment:8 Changed 14 years ago by markk

Resolution: Fixed
Status: acceptedclosed

Jonatan - I'm not going to add rtmp:// functionality yet. I suspect we are going to have our hands full supporting http:// in the near future, there is no UI support for rtmp, it adds a dependency on librtmp that needs additional configure support and in my limited testing, rtmp streaming was highly unreliable.

If you have code that requires rtmp functionality, feel free to open another ticket.

Note: See TracTickets for help on using tickets.