Opened 17 years ago

Closed 13 years ago

#3580 closed enhancement (Won't Fix)

uPnP commercial skipping

Reported by: anonymous Owned by: beirdo
Priority: major Milestone: unknown
Component: MythTV - UPnP Version: Master Head
Severity: medium Keywords: skip commercial upnp
Cc: beirdo Ticket locked: no

Description

The attached patch supercedes Ticket 3344, to correct fast-forwarding for uPnP players. In addition, new functionality was added to the GetRecordings? method so that portions of content could be specified through a "bytes=" parameter in the URL. A new method GenM3u is provided to automatically generate a playlist containing a series of URLs that specify content up to the end of a commercial break. In the near future, I'll submit a patch to the CDS that will present a upnp listing of commercial-detected recordings, and will utilize the new GenM3u method to serve up the recording segments, in full upnp spec compliance. See Section 2.8.9.2 Playlist file generation from container derived object resources of the standard.

Rather than completely removing detected commercials, commercial skipping will be semi-automatic. When a user viewing the program recognizes a commercial, the user may hit the "next track" button, which will switch to the next segment of content, just past the end of the detected commercial break, thereby skipping the commercials. Thus, if commercial content is erroneously marked, the user may review the missed content. For those that trust in the algorithms, complete commercial removal can be achieved through lossless transcoding.

Attachments (7)

patchfile (22.2 KB) - added by robsbox@… 17 years ago.
patchfile.2 (22.2 KB) - added by robsbox@… 17 years ago.
patchfile.3 (40.9 KB) - added by robsbox@… 17 years ago.
additional changes for track parameter and start of CDS modification
patchfile.4 (43.4 KB) - added by robsbox@… 17 years ago.
Final patch revision
patchfile.5 (43.8 KB) - added by robsbox@… 17 years ago.
Final patch file fixing fast forwarding and implementing commercial skipping tracks.
patchfile.6 (44.1 KB) - added by robsbox@… 17 years ago.
fix small memory leak & iterator deficiency
mythtv-commskip-0.20-fixes.patch (44.4 KB) - added by anonymous 17 years ago.

Download all attachments as: .zip

Change History (28)

Changed 17 years ago by robsbox@…

Attachment: patchfile added

Changed 17 years ago by robsbox@…

Attachment: patchfile.2 added

comment:1 Changed 17 years ago by robsbox@…

please disregard patchfile.1 -- had a bug in the url, which is fixed in patchfile.2

comment:2 Changed 17 years ago by robsbox@…

Also supercedes ticket 2500.

Changed 17 years ago by robsbox@…

Attachment: patchfile.3 added

additional changes for track parameter and start of CDS modification

comment:3 Changed 17 years ago by robsbox@…

*Submitted patchfile.3 as a replacement for prior patchfiles. *Modified MythXML service GenM3u() and GetRecordings?() for more user-friendly parameters (i.e., track=<#> in lieu of specifying a byte range). *Started modification to upnpcdstv, but it appears playlists are unsupported/non-functioning. Added commercial free category to menu.

Changed 17 years ago by robsbox@…

Attachment: patchfile.4 added

Final patch revision

comment:4 Changed 17 years ago by robsbox@…

Modified new table method ProgramInfo::GetTrackMap?() and added new type pos_time_map_t for supporting the method so that a map of commercial endpoints byte offsets indexed by time position (in seconds) is created. This will come in handy whenever someone decides to include track offsets in mytharchive rather than arbitrary, percentage based tracks.

Since my uPnP player apparently does not support playlists, but will play a sequence of videos if the play button is pressed when viewing a container list of video segments, I modified UPnpCDSTv() to generate a list of videoItems, each videoItem having content comprising the show followed by the commercials. The next track button skips to the next segment of video. I needed the above modification to the track table so that the duration of each track is reported properly in the resource tag.

Please disregard patchfile.4, which did not calculate segment sizes properly and had a bug in the duration of the last track. Patchfile.5 is the final patch to implement this functionality.

Changed 17 years ago by robsbox@…

Attachment: patchfile.5 added

Final patch file fixing fast forwarding and implementing commercial skipping tracks.

Changed 17 years ago by robsbox@…

Attachment: patchfile.6 added

fix small memory leak & iterator deficiency

comment:5 Changed 17 years ago by dblain

Owner: changed from Isaac Richards to dblain

comment:6 Changed 17 years ago by anonymous

hmm, what upnp player are you using? I just patched this against the latest svn of 0.20-fixes (which recently got a upnp backport), and the skip track button just tells me "Invalid". I have a linkplayer2, so it's possible it is a limitation of my player. I had to hand-apply a couple of diffs because of rejects ...

I'll attached the changes here ... I think it'll also apply to trunk, but I can't verify if anything works. I can verify though that if I select "Commercial Free" from the recordings list, it hangs for 60 seconds before erroring out.

Changed 17 years ago by anonymous

comment:7 Changed 17 years ago by dblain

There are numerous things wrong with this patch using the latest upnp code.

I started re-implementing this feature and ran into a problem with getting appropriate file offsets.

I also wanted to change the way it shows up in the directory. I was going to add a sub-folder ("Chapters") under each recording, that would give simular results.

comment:8 in reply to:  7 Changed 17 years ago by robsbox@…

Replying to dblain:

There are numerous things wrong with this patch using the latest upnp code.

Dave, I've be happy to discuss offline -- please email me. Regards, Rob

comment:9 Changed 16 years ago by paulh

Component: mythtvupnp

comment:10 in reply to:  6 Changed 16 years ago by robsbox@…

Replying to anonymous:

hmm, what upnp player are you using?

I have a Buffalo LinkTheater?. After I upgrade to 0.21-fixes, I will attempt to review and patch again.

comment:11 Changed 15 years ago by Dibblah

Status: newassigned

comment:12 Changed 14 years ago by stuartm

Component: upnpMythTV - UPnP

comment:13 Changed 14 years ago by wjskelle

Guys, how do we move forward with this? I have a Samsung HDTV that recognizes my Myth box, and after applying a different patch (ticket 7296) it plays all of my recorded shows beautifully! However, not being able to skip commercials is a real pain. It looks like this patch is 'kind of' compatible with 0.21 but I think we should open some discussion on how to move forward with this concept?

comment:14 Changed 14 years ago by robertm

Ticket locked: set

Speaking of discussion, please take it to the (aptly named) discussion lists.

comment:15 Changed 14 years ago by robertm

Ticket locked: unset

I might start looking at some uPnP stuff in the future, unlocking in case anyone wants to update the patch for trunk.

comment:16 Changed 14 years ago by robertm

Owner: changed from dblain to robertm

robsbox, If you feel like updating this for .23 or trunk, I won't let it go three years, If you can get it updated I won't let it rot.

comment:17 Changed 14 years ago by beirdo

Cc: beirdo added

comment:18 Changed 14 years ago by beirdo

Owner: changed from robertm to beirdo

comment:19 Changed 14 years ago by beirdo

Type: defectenhancement

comment:20 Changed 14 years ago by stuartm

Version: headTrunk Head

comment:21 Changed 13 years ago by stuartm

Resolution: Won't Fix
Status: assignedclosed

Since we don't have an agreed upon patch and no progress has been made on producing one in years this ticket is no longer valid, it's a feature request and it belongs with the other feature requests in the wiki.

I'm told that Gavin (Beirdo) has tried and failed to produce something that he was happy with.

Note: See TracTickets for help on using tickets.