Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [issue][linux] Video Playback

Author
Message
Pete W
6
Years of Service
User Offline
Joined: 3rd Oct 2017
Location: Germany
Posted: 4th Oct 2017 00:11
OS: Linux (Mint 18, like Ubuntu 16.04)
AGK: latest 2017.09.25

LoadVideo() always returns 0, which means the video couldn't be loaded.

This occurs consistently, including in the supplied demo VideoPlayback project (both mp4 and wmv)

Playing of the video with native player (VLC) is without problem. libavcodec54 is installed.

Can anyone confirm this, or even beter sugest a fix?


Thanks,
Pete
Dybing
12
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 4th Oct 2017 17:13 Edited at: 4th Oct 2017 20:12
On Linux (Ubuntu 16.04), I get a -1 return from loadVideo(). Meaning video not supported. Pretty standard video file (mp4 h264 encoded 30fps @556bps 270x360px) that is only a few seconds long. Plays well in native mediaplayer (Totem Movie Player). Works well in the app on iOS and Android though, and as that is my target devices for the app I'm doing, I've not bothered going looking for any solutions to the problem. But a solution would be muy appreciated

EDIT: Installed the ffmpeg package (7:2.8.11-0ubuntu0.16.04.1) and now the status on loadVideo() have gone from -1 (not supported) to 0 (error on loading). Still works perfectly on native videoplayer though.
Pete W
6
Years of Service
User Offline
Joined: 3rd Oct 2017
Location: Germany
Posted: 4th Oct 2017 23:51
Running from command line doesn't provide any clues (no output).

Running ldd on the ouput binary gives:



which to my untrained eye looks like it's not linked against a suitable video library (e.g. avcodec) in order to be able to play a video.
Dybing
12
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 6th Oct 2017 01:02
Tried on my Raspberry Pi 3 as well running Raspbian Pixel (Debian based just as Ubuntu) - and same error on loadVideo(), code 0 error on loading.
Pete W
6
Years of Service
User Offline
Joined: 3rd Oct 2017
Location: Germany
Posted: 6th Oct 2017 21:19
@Dybing Thanks for the confirmation.

Maybe one of the devs could have look at this at some point?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Oct 2017 13:33 Edited at: 12th Oct 2017 13:33
Unfortunately the Linux and Raspberry Pi versions of AppGameKit have no video playback support. Building the video decoding into the app would have patent and license issues, and linking to the shared libav or ffmpeg libraries had problems with major version changes across the various versions of Linux.
Dybing
12
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 13th Oct 2017 02:05
On Pi it should be straight enough - just support Raspian Pixel and done. On amd64 distros - well, stick to the latest Ubuntu LTS release (now 16.04, half a year until 18.04) and we're golden. Afterall, Ubuntu is universally loved in the Linux community. Every distro wish they were Ubuntu. Right? Right!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 13th Oct 2017 13:48
Quote: "just support Raspian Pixel and done"

Apparently a lot of people are upgrading to Raspbian Stretch, and I assume some people will still be on Raspbian Jessie, so unfortunately it's not as easy as just telling everyone to upgrade. They will want it to work on what they have.

Quote: "stick to the latest Ubuntu LTS release"

Same, we used to do this but then people were asking why it didn't work on their version and their distribution, or people upgraded early to newer versions of Ubuntu and lost support for AGK. So now we try to support as many versions as possible, within reason.
Pete W
6
Years of Service
User Offline
Joined: 3rd Oct 2017
Location: Germany
Posted: 13th Oct 2017 15:07 Edited at: 13th Oct 2017 15:26
@Paul Thanks for the feedback. Wasn't sure if it was a problem with my system or not.

Hmm, yeah, understand the problem with library compat.

Statically linking not an option? libav is available under the LGPL (as well as the normal GPL) which should avoid licensing issues. Patents, well that's a grey area (and only really relevant for US & Japan). At least as a compiler option would be nice (with 'use at own risk' disclaimer).

Hmm, I'm wondering if this could be implemented as a plugin somehow.

Edit:
Theora/Ogg support only would suffice , at least as far as I'm concerned

Compile a version libav with just ogg support and statically link it to the play binary might be a solution that avoids the current issues?

Then those of us aiming for cross-platform support can do something like:



Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 13th Oct 2017 17:24 Edited at: 13th Oct 2017 19:05
Libav looks promising.

The legal description of libav, including Patent Mini-FAQ:
https://libav.org/legal/


Quote: "Patents, well that's a grey area and only really relevant for US & Japan"
Nah...
If you got some problems, you will definitly get a 60+ judge from munich, who never saw a computer in the last 20 years.
- Even if you had arguments, they become invaild.
- Even if you are right, you will spend >10000€ , no return.
- Even if the other arguments are wrong/ made up, you have to take care about it for at least 1 year and still pay for a lawyer.

Algorythms cannot be patented after the german law. But they still can and are, due to sneaky european laws.

[/url]
Pete W
6
Years of Service
User Offline
Joined: 3rd Oct 2017
Location: Germany
Posted: 13th Oct 2017 17:51 Edited at: 13th Oct 2017 18:02
@Jack

Well, INAL, but section §52 of the European Patent Convention excludes programs for computers from being patented. Mind you, the UK (where Game Creators are based) aren't going to be part of the EU after March 2019....

You're right of course about a 60 year old Judge in Münich Though, thisresolution the Bundestag in 2013 should help in theory.

Only supporting Ogg-Theora (on linux) would safely avoid any issues of patents, theoretical or otherwise.

Edit: Extra infos: libtheora alone is probably more stable (for dynamic linking), and is also BSD licensed.
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 13th Oct 2017 19:14 Edited at: 13th Oct 2017 19:31
Quote: "Well, INAL, but section §52 of the European Patent Convention excludes programs for computers from being patented. Mind you, the UK (where Game Creators are based) aren't going to be part of the EU after March 2019.... "

They use the "Verfahrenspatent" (=process patent?) or the "Geschmacksmuster" (=design patent?) to get patents on algorythms.
They are so creepy, even if you create a superior algorythm totally diffrent, that can also give the same calculation results, they try to shut you up if they see their money in danger. (At least when you are working in my jungle) As I said, It does not have to be true, to get you into a defense position. Once you are there be pepared to pay about 10000€, just to say: "Nope, this is bullshit."

Code is logical, law isn't.
Libav is still a very interesting lib. I searched recently for video libs, but I have not found this one , thx btw
The GPL licence is well described in the FAQ. I do not see any problems here.

[/url]
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 13th Oct 2017 23:29
Unfortunately static linking violates the LGPL, has to be a shared library. Something like Theora would be a viable solution, although it looks like it is quite out of date now. Probably the best solution would be to load the libav shared library at runtime, which would allow support for multiple versions, and would allow the app to run even if it wasn't available, with video disabled. I'll add it to my todo list, I'm not sure when we'll be able to get around to it though.
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 14th Oct 2017 02:29
You're the best

[/url]

Login to post a reply

Server time is: 2024-03-28 16:44:58
Your offset time is: 2024-03-28 16:44:58