Video on Haiku

Hello all:

I’ve never previously ported third party code over to the Haiku, and I certainly never thought that a webm movie viewer could be the first thing I might try. Thanks to a great piece of work by Chris Double (https://github.com/doublec/webm-player) - I’m viewing webm movies on my Haiku desktop tonight. The video is great - no hesitation or jerkiness - but the port is still not producing any audio. The only dependencies are libvorbis, libogg, and libsdl. The libvpx/8 decoder is statically linked. I used the binaries from haiku-files.org/files/lib for vorbis, ogg and SDL. If anyone wants to try the webm video viewer, I’ve put a copy of the r1a3 binary (includes no vorbis, ogg or sdl libs) at:

http://rscheckelhoff.users.sourceforge.net/get-haiku-video.html

If you need a webm file to try with the viewer, you can find one at http://video.webmfiles.org/demo-files/

The big rabbit is hillarious, and the elephant movie is … entertaining.

Since Youtube now supports webm video files, this thing should be pretty useful. I should put the source files into a package that’s been “Haikuized” (the compilation of the binary was an on-the-fly adhoc operation). Then maybe someone else in the community can add the audio if I don’t have the time. Chris’s code is BSD licensed.

Maybe this thing could be worked into WebPositive as part of HTML5 implementation …




The dependency files may be gotten from:




libsdl-1.2.14-r1a3 … .zip

libvorbix-1.3.2-r1a3 … .zip

libogg-1.2.2-r1a3 … .zip




These zips are to be extracted from within /boot




The webm binary is a command line video player, and takes a filename (.webm)

Enjoy!

WebM is easy to port on any x86/ARM system, I’ve even embedded it into my OpenGL game engine, and had working code on Haiku 16 months ago (as well as on the iOS platform). The real trick is to write a Media translator so that it integrates with Haiku media kit properly. Not much time at this point in my life …

Ah thanks alot for your work would be nice to get itintegrated into Haiku and Webpositive…

Yoru work is very appreceated.

Thanks nice contribution to the right time…

Cool, I’ll give this a try. And yes, html5 and webm actually gives Haiku a shot at being a first rate citizen on the web which would be great, it’s not as if it’s going to get less pervasive in our lives.

Here’s hoping webpositive gets a development boost or that someone gets a chrome/firefox port going, as the current web offerings in Haiku (webpositive/ancient Firefox) really isn’t up to par with what I gather most users expect these days.

Webpositive seems to be a very nice browser, IMHO. It may not have all the bells and whistles specified by the HTML5 specification (yet), but I’ll bet they’re working on it. I think Maxime Simone and Ryan Leavengood did a fabulous job on the browser, and I actually prefer it over my firefox 14 …

Hi ronald-scheckelhoff!

Any new software for Haiku is appreciated, so thanks for your work. However, I think at least the current Haiku (nightlies and soon alpha4) do support WebM via ffmpeg.

Regards,
Humdinger

Thanks for the comment, Humdinger.

You know, it’s amazing how much Haiku has matured over the past couple years. Very recently I would have been sitting here at my main desk, using FreeBSD to send this reply to your comment. The other machine, sitting on the low table next to me, would also have been running FreeBSD. A visitor who came to my place today would see Haiku running on both machines. Webpositive makes that possible for me.

I appreciate your statement about the ffmpeg. The developers have chosen that technology for the back-end of the codec framework. Keeping everything down to a homogenous set of functional components is the game plan for Haiku. That is evidenced by the somewhat lukewarm response to the addition of QT. And - it does keep things neat and clean. Now, here I will write something that will make all the readers laugh. I really do have some reservations about the legal status of ffmpeg. I never use it. If you look at their page on ffmpeg.org/legal.html you can see that they themselves admit to some potential hot spot problems (depending on jurisdiction) for the patent issues that may or may not exist. They do write in that page that anyone selling the ffmpeg material might very well be paying royalties.

This is where I’m unsure about the direction Haiku is taking with the codec framework. Most operating systems utilize ffmpeg as an add-on precisely for the potential legal reason. If you have qualms about it, you can simply not install it. It seems that Haiku is making the system’s multimedia dependent on it. If that is true, then that is a different approach than any other OS is taking. Would Haiku ever be sold commercially? If so, then there could be royalties if ffmpeg is built into it.

I’m one of those very strange persons who actually reads the EULA, top to bottom. I’m a little paranoid about all things legal. I’m hearing the readers laugh now. Oh well.

The little webm video player is a stand alone app, and that goes against the BE philosophy. On the other hand, why not have another program? The webm binary barely qualifies as a program now. It would take some work to make it very useful. Nonetheless; I like the code that it comes from, mainly for its simplicity. FFmpeg is certainly not simple, but then I’m comparing apples to oranges. The API and its generalized functionality is the basket the codec apples fit into.

Well if so then that cost will be offloaded onto the buyer in the form of the asking price, that’s how it works in any other commercial operating system. The licence cost involved when Microsoft and Apple etc provides out of the box support for patented codecs is something you pay for when you buy their offerings.

I don’t see why a potential commercial Haiku version would be any different, not that I long for any such option, I really hope Haiku stays open source and free and that it is devoid of commercial offshoots.

As for the legality of Haiku shipping ffmpeg, I don’t know how things stand there. From what I understand the patents governing some of the video codecs supported by ffmpeg (like x264) are not legally binding the same way in all countries.

Perhaps Haiku needs a disclaimer just to be sure, saying you need to infrom yourself of the laws where you are located before downloading and installing Haiku, or perhaps it needs to make the codecs an optional install done by the end user as is the case with just about every Linux distro.

It’s probably a thing worth bringing up, although there’s a good chance the devs have discussed this between themselves already.

…and there are “some” stripped-down versions of FFmpeg around (to solve license problems)…

ffmpeg licence is LGPL+GPL, there is no problem with that.

There may or may not be problems with patents. But until someone claims there is, we are right to use it. I’m not sure how the LGPL/GPL protects us, and the ffmpeg devs, if we used software and it happens to embed some code that violate a patent.

Anyway, while ffmpeg is distributed with Haiku, it is used as a media add-on. So it is in no way at the core of the media kit. It only happens to be the only add-on bundled with Haiku, but you could easily add others, or replace it. We used to have separate add ons for MP3, Ogg Vorbis, Musepack, and so on. It proved to not be worth the effort for various reasons :

  • It takes a lot of work to get them working properly, and has to be done for each format, while ffmpeg does them all
  • ffmpeg has a lot of support from other projects (open source or not). So it moves faster

As for the patents, I guess we would get into the same “problems” if we wrote video decoding ourselves. There are usually no other ways of decoding these video formats than using the technology that was patented !

If you want to go commercial with Haiku and play safe, the easiest way is removing ffmpeg altogether, and either replacing it, or providing it as an extra free package. As you can read in the FAQ of ffmpeg, there are only vague hints that there might be patents somewhere, that may apply to the software, only in some countries. and this apply to any software decoding these video formats (MPEG4 and H264, but there are likely others). If we start to listen to such claims, we won’t be able to do anything. So, the best solution for us is to wait and see how it turns out. But I guess if ffmpeg is a problem, any replacement we could come up with is as likely to run into the same problem.

Also remember that Haiku is meant to be easy to use, so we don’t want to bother the user with installing ffmpeg as an extra step, unless we see an actual proof that it’s a legal requirement to do so.

I know this thread is well over a year old, but since we are nearing a new alpha release, I thought it may be a good time to review the state of multimedia support in Haiku. The current version of ffmpeg is now 2.1. Haiku is still using 0.10. Are there any plans to do an update to the latest version for the next alpha?

We have a problem with that, the version we use is already not really working on gcc2. Decoding works, but encoding will likely crash or produce empty files.

We could upgrade the gcc4 part of Haiku to a more modern ffmpeg, and keep the old version for gcc2 only. But their API is not stable, so this means also keeping two versions of our ffmpeg decoder add-on.

This will have to happen someday, but it seems the Haiku devs aren’t doing enough video watching to be annoyed by the older ffmpeg version. So, a good first step would be to provide us with an updated ffmpeg recipe at haikuports.

Do you remember the BeOS slogan - “The Media Operating System”?

I understand the reasons for keeping gcc2 builds, and have read all the debate concerning that topic. However, it seems with each passing week gcc2 is becoming less and less relevant to the progression of Haiku as a modern desktop operating system. While I do not subscribe to “gcc2 must die!”, I must say it should be considered for retirement sooner rather than later.

gcc2 must die!

They hear you and the cry to abandon old corpse of gcc2 compatibility. It’s just they don’t really care (anymore), since many of them use other OSes primarily. In open source you first implement features important to you, but it’s hard to do if you only run Haiku in virtual machine under Linux/Windows/OS X. If you’re forced to use Haiku day in and day out, you’ll run into problems very fast, including multimedia (audio/video codecs, device drivers and apps).

They hear you and the cry to abandon old corpse of gcc2 compatibility. It’s just they don’t really care (anymore), since many of them use other OSes primarily. In open source you first implement features important to you, but it’s hard to do if you only run Haiku in virtual machine under Linux/Windows/OS X. If you’re forced to use Haiku day in and day out, you’ll run into problems very fast, including multimedia (audio/video codecs, device drivers and apps).[/quote]
I once used Haiku for one month and I had no issues with multimedia, I just downloaded VLC and there you go.