Kodi Community Forum

Full Version: Video Addon Development play flv
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I'm new to addon development. In fact I started by fixing a couple of addons. Now I am confronting a problem playing flv links.

After a while of reading through the html code and using safaris analyzer I found a link to the video file: http://flv.alarab.com:8080/flv/92368.flv

The link alone won't work in a browser, but i figured this one opens a flash player to play the video:

http://alarabplayers.alarab.com/jwplayer.../92368.flv

I hard coded this link to test calling the video file like this:

Code:
fileright = 'http://alarabplayers.alarab.com/jwplayer/player.swf?file=http://flv.alarab.com:8080/flv/92368.flv'
listItem = xbmcgui.ListItem(path=str(fileright))
xbmcplugin.setResolvedUrl(_thisPlugin, True, listItem)

Kodi is not able to open the video. Any advice?

Thanks!

btw: this is the original page: http://tv1.alarab.com/v74581-_دنيا_اسعد_..._2_2272015
Have you tried just setting the path of the listitem to the URL of the flv file
That was my first attempt. No success. This is an extract from the log:

Code:
23:27:36 T:123145310429184 WARNING: DARWINOSX: underflow (0 vs 4096 bytes)
23:28:12 T:140735271120896   ERROR: CCurlFile::Stat - Failed: Timeout was reached(28) for http://flv.alarab.com:8080/flv/92368.flv
23:28:12 T:140735271120896  NOTICE: DVDPlayer: Opening: http://flv.alarab.com:8080/flv/92368.flv
23:28:12 T:140735271120896 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:28:12 T:123145302839296  NOTICE: Thread DVDPlayer start, auto delete: false
23:28:12 T:123145302839296  NOTICE: Creating InputStream
23:28:13 T:123145303453696  NOTICE: Thread JobWorker start, auto delete: true
23:29:13 T:123145302839296   ERROR: CCurlFile::Stat - Failed: Timeout was reached(28) for http://flv.alarab.com:8080/flv/92368.flv
23:30:13 T:123145302839296   ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
23:30:13 T:123145302839296   ERROR: CCurlFile::Open failed with code 0 for http://flv.alarab.com:8080/flv/92368.flv
23:30:13 T:123145302839296   ERROR: Open - failed to open source <http://flv.alarab.com:8080/flv/92368.flv>
23:30:13 T:123145302839296   ERROR: CDVDPlayer::OpenInputStream - error opening [http://flv.alarab.com:8080/flv/92368.flv]
23:30:13 T:123145302839296  NOTICE: CDVDPlayer::OnExit()
23:30:13 T:140735271120896   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.alarab/?url=http%3A%2F%2Ftv1.alarab.net%2F%2Fv74825-_%D8%AF%D9%86%D9%8A%D8%A7_%D8%A7%D8%B3%D8%B9%D8%AF_%D8%B3%D8%B9%D9%8A%D8%AF_%D8%A7%D9%84%D8%AC%D8%B2%D8%A1_2_2302015&mode=4]
23:30:13 T:140735271120896  NOTICE: CDVDPlayer::CloseFile()
23:30:13 T:140735271120896  NOTICE: DVDPlayer: waiting for threads to exit
23:30:13 T:140735271120896  NOTICE: DVDPlayer: finished waiting
23:30:13 T:140735271120896  NOTICE: CDVDPlayer::CloseFile()
23:30:13 T:140735271120896  NOTICE: DVDPlayer: waiting for threads to exit
23:30:13 T:140735271120896  NOTICE: DVDPlayer: finished waiting
23:30:13 T:123145324457984  NOTICE: 1Channel: Service: Playback Stopped
23:30:13 T:123145324457984  NOTICE: 1Channel: Service: Resetting...
23:30:13 T:123145319628800  NOTICE: Stream All The Sources: Service: Playback Stopped
23:30:13 T:123145318019072   ERROR: EXCEPTION: Unknown addon id 'none'.
23:30:15 T:123145309892608  NOTICE: virtual bool CAESinkDARWINOSX::Initialize(AEAudioFormat &, std::string &): Opening default device Built-in Output
23:30:16 T:123145305063424  NOTICE: Thread BackgroundLoader start, auto delete: false
23:30:16 T:123145305600000  NOTICE: Thread JobWorker start, auto delete: true
That basically is telling you that you can't access that url. I tried in a browser and also couldn't open it. You can't play it if you can't read it.
That's correct. Extending the code to http://alarabplayers.alarab.com/jwplayer.../92368.flv allows one to watch the flv in a browser. That's why I hardcoded this link and not the url itself.
(2015-11-23, 22:31)nomansland008 Wrote: [ -> ]That's correct. Extending the code to http://alarabplayers.alarab.com/jwplayer.../92368.flv allows one to watch the flv in a browser. That's why I hardcoded this link and not the url itself.

I get video not found or access denied on that one also. It's possible that the url is only accessable to the .swf, is geo-locked or needs some weird headers set to access.
Hi learningit,

thanks to your remark I figured out the problem. Even though the html contains this link: http://flv.alarab.com:8080/flv/92368.flv

the real path is http://flv2.alarab.com:8080/flv/92368.flv

The number 2 after the first flv was missing.

I works fine now. I have to check if this is consistent and finish the code.
i have created a addon for that site
@pipcan: I see. Thanks. So is the current problem fixed? Is an update available for the addon?