Ticket #13864 (closed Bugs: Fixed)

Opened 22 months ago

Last modified 21 months ago

RTMP playback fails - Unable to Init Codec

Reported by: ampedandwired Owned by:
Priority: 4 - Normal Milestone: 12.0 "Frodo"
Component: Audio playback (audio/video files) Version: 12.0 "Frodo" RC2
Severity: Normal Keywords:
Cc: Blocked By:
Blocking: Platform: All
Revision:

Description

I have run into a problem with playback when testing my  Rdio addon with Frodo RC2 on Ubuntu.

In certain situations, when a plugin uses setResolvedURL to start playback of an RTMP stream, it fails with the following error:

CAudioDecoder: Unable to Init Codec while loading file rtmpe://...

The interesting thing is that this error only happens when the list item has had some infoLabels applied to it with "setInfo".

I have put together a simple plugin that illustrates the problem (attached). If you choose "Play" with the code as is, playback fails with the error above. If you then comment out the line that has the call to "setInfo", you will see that the RTMP handshake is successful (it won't actually be played as the token in the URL isn't valid, but you can see the handshake happening). I have attached a debug log showing both the failure and success case described above.

Putting the following line at the top of the <rules> section of playercorefactory.xml solves (well, works around) the problem:

<rule name="rtmpe" protocols="rtmpe" player="DVDPlayer" />

Attachments

test-plugin.tar.gz Download (995 bytes) - added by ampedandwired 22 months ago.
Simple plugin to replicate the error
xbmc.log Download (80.1 KB) - added by ampedandwired 22 months ago.
Debug log showing failure and success cases

Change History

Changed 22 months ago by ampedandwired

Simple plugin to replicate the error

Changed 22 months ago by ampedandwired

Debug log showing failure and success cases

comment:1 Changed 22 months ago by Djape

I could be wrong, but problem here seems to lay in extension name. I have exactly the same problem and identical error with rtmp stream that are not live.flv or live.mp4.

When I restreamed live.flv trough Wowza, I had to name it live.stream and now my rtmp url is named  rtmp://url/application/live.stream Once I try to play it in XMBC it throws

CAudioDecoder: Unable to Init Codec while loading file  rtmp://...

I've fixed my problem by changing playercorefactory.xml

<!-- Only dvdplayer can handle these normally -->

<rule name="sdp/asf" filetypes="sdp|asf|stream" player="DVDPlayer" />

I would prefer if |stream is added by default in playercorefactory.xml

comment:2 Changed 22 months ago by davilla

looking

comment:3 Changed 21 months ago by davilla

calling that setInfo method creates a MusicInfoTag on the underlying FileItem. PAPlayer is assumed if the underlying item has a MusicInfoTag.

not sure the best way to handle this.

comment:4 Changed 21 months ago by davilla

is anyone paying attention to this or should I just ignore it ?

comment:5 Changed 21 months ago by ampedandwired

Hi davilla, I'm certainly paying attention, and I very much appreciate you taking the time to look into this. I guess I'm just not sure what to do with the information you've given so far.

Looking at the commit history for playercorefactory.xml in the Frodo branch, it looks like the change that caused this bug was this commit by huceke back in September for Raspberry Pi support:  https://github.com/xbmc/xbmc/commit/45fe6fce168e99e34cd7ffd437d482eabb2bd3da

The reason was: "Changes to the player selection. The default player selection in xbmc is too cosy with DVDPlayer.".

I have verified that reverting this change by adding "rtmp" back as follows fixes the problem:

<rule name="hdhomerun/myth/rtmp/mms/udp" protocols="hdhomerun|myth|cmyth|rtmp|mms|mmsh|udp" player="DVDPlayer" />

Not sure of the original reason for removing it - perhaps it can be added back in?

comment:6 Changed 21 months ago by davilla

The reason for that commit was there are two other internal video players in addition to dvdplayer. These are amlplayer and omxplayer.

so what should restore it for the default video player would be

<rule name="rtmp" protocols="rtmp" player="videodefaultplayer" />

can you test that ?

comment:7 Changed 21 months ago by ampedandwired

Thanks davilla, I've tested and that line does indeed fix the problem.

comment:8 Changed 21 months ago by ronie

  • Status changed from new to closed
  • Resolution set to Fixed
  • Milestone changed from Future / Pending to 12.0

comment:9 Changed 21 months ago by twinther

Hi ronie, I think you forgot to merge this into the frodo branch. It appears to only have been fixed in master. Br. Tommy

comment:10 Changed 21 months ago by ronie

*ronie slaps davilla with a pink pony

comment:11 Changed 21 months ago by davilla

damnit, I PR'ed it, huceke pulled it into mainline and no-one added it to the list :(

Note: See TracTickets for help on using tickets.