Opened 8 years ago

Closed 5 years ago

#10020 closed Patch - Feature (Won't Fix)

UPnP audio transcoding support

Reported by: Joe Bryant <tenminjoe@…> Owned by: stuartm
Priority: minor Milestone: 0.28
Component: MythTV - UPnP Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This patch adds automatic audio transcoding to the UPnP server. This should allow UPnP clients which do not support OGG or FLAC to play these files.

An additional "res" element is added to each advertised audio file, adding a modified URL. When a file with one of these URLs is requested, Myth's http server converts the file on-the-fly to uncompressed audio ("audio/L16" format). The original "res" element (advertising the file as OGG or FLAC or whatever) remains, so clients that already have support for these files should be unaffected.

I have tested this using my Xbox 360 as the UPnP client. Because other issues stop MythTV's UPnP working with the Xbox 360, I have included changes from my Xbox 360 patch (at ticket #9632), so that I can be sure this is a working patch. If this is not acceptable, and someone lets me know, I can remove these changes and make a version of this patch which only contains the audio-transcoding changes (but I will not be able to test this patch myself).

Attachments (2)

allchanges.diff (46.3 KB) - added by Joe Bryant <tenminjoe@…> 8 years ago.
Changes to add audio transcoding support to UPnP AND make UPnP compatible with Xbox 360
upnprevised.diff (48.7 KB) - added by Joe Bryant <tenminjoe@…> 8 years ago.
Previous version of the patch broke the plugins build, this should correct

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by Joe Bryant <tenminjoe@…>

Attachment: allchanges.diff added

Changes to add audio transcoding support to UPnP AND make UPnP compatible with Xbox 360

comment:1 Changed 8 years ago by Joe Bryant <tenminjoe@…>

One note - I find that, with the patch, I get lots of messages from the FFMPEG libraries reading "Diverting av_*_packet function calls to libavcodec" in the output. I can get rid of these messages by using the "--disable-symver" option with the configure script. I'm not sure whether this is the right solution - I'd love to know if there's a better way.

Changed 8 years ago by Joe Bryant <tenminjoe@…>

Attachment: upnprevised.diff added

Previous version of the patch broke the plugins build, this should correct

comment:2 Changed 8 years ago by beirdo

Component: MythTV - GeneralMythTV - UPnP
Owner: set to dblain

comment:3 Changed 6 years ago by stuartm

Milestone: unknown0.28
Owner: changed from dblain to stuartm
Status: newaccepted

comment:4 Changed 5 years ago by JYA

mythtv already has method and a class to decode audio and perform all the processing required.

there are two ways you can achieve what you want. 1- Use the static AudioOutputUtil::DecodeAudio? 2- Write a AudioOutput? derivated class that defines what output format is supported

Method 2 is the preferred/better way. This is the way mythtranscode works.

with 2) the audio will be decoded, upmixed/downmixed as required, resampled etc.. all automatically.

comment:5 Changed 5 years ago by Joe Bryant <tenminjoe@…>

Thanks for the feedback, jyavenard.

Nowadays I don't have the same kind of free time as I did when I submitted the patch all those years ago - if you or anyone else would like to fix it up, please feel free.

comment:6 Changed 5 years ago by stuartm

Resolution: Won't Fix
Status: acceptedclosed
Note: See TracTickets for help on using tickets.