I am using Plugin.MediaManager NuGet package to provide cross-platform video player for my app. However, it does not support playing RTSP video streams. Is there any other library that supports this?
I have looked around and the most common ones are platform-specific libraries such as KXmovie and Managed Media Aggregation but I am a little intimidated by the thought of having to port and/or recompile them.
The best case is if there is a Xamarin.Forms compatible NuGet package available. Failing that, an iOS library that requires binding, but not recompiling. As a last resort, something that needs to be compiled and linking manually, but works out of the box.
OK so the resounding conclusion is that one does not exist with Xamarin bindings. I will start with this project on GitHub and see if I can compile and generate the bindings myself.
A bit late, but there is now. LibVLCSharp supports RTSP (and many other stuff).
Related
We're in the process of building and deploying a desktop based app on electron v 12.0.7. It'll be a (free) commercial software deployed to ~2-3M users worldwide.
Recently our legal team enquired about the proprietary codecs bundled with chromium and I thought the best way to confirm this would be to reach out here.
So, here're specific things that I need help with:
Are we shipping chromium with proprietary codecs? If yes, what are potentially contentious codecs that come by default in chromium bundled with electron v 12.0.7?
Is there any documentation around how the electron team builds chromium (with what flags)?
Is the default libffmpeg.dylib/dll bundled with electron building ffmpeg with support for things like H.264 and MP3 codecs?
I noticed there are libffmpeg binaries available with each electron build, e.g. https://github.com/electron/electron/releases/download/v12.0.7/ffmpeg-v12.0.7-darwin-arm64.zip . What's the purpose of this binary?
Any help would be appreciated.
Ok, it took a while to plummet through all the information out there.
I started wth https://github.com/electron/libchromiumcontent/issues/174#issuecomment-184187254 and ended up on electron's discord server talking with multiple folks from electron team. I'm collating my findings here so that it may save some time for someone.
Here're what I found out. Any corrections/edits are more than welcome so that the information presented here is correct.
Are we shipping chromium with proprietary codecs?
If yes, what are potentially contentious codecs that come by default in chromium bundled with electron v 12.0.7?
YES. At least on OSX, the libffmpeg.dylib that comes by default with electron contains exported symbols (for proprietary decoders) for AAC and H264. So, they remain in the realm of non-royalty-free software. I think legal advice is required here if you're planning to ship your application commercially(using default electron + libffmpeg.dylib)
e.g. List of exported decoders from the dylib can be viewed using the following command:
nm -gU /Applications/{your-app-name}.app/Contents/Frameworks/Electron\ Framework.framework/Versions/A/Libraries/libffmpeg.dylib | grep 'decoder'
I wrote a simple python script to look at any electron-based app, and print list of decoders available inside libffmpeg (bundled inside an electron based app).
Sample output from my script: (My app is built with electron v 12.0.7)
Decoders available/exported from libffmpeg.dylib: ['aac', 'aac-latm',
'flac', 'h264', 'libopus', 'mp3', 'pcm-alaw', 'pcm-f32le',
'pcm-mulaw', 'pcm-s16be', 'pcm-s16le', 'pcm-s24be', 'pcm-s24le',
'pcm-s32le', 'pcm-u8', 'theora', 'vorbis', 'vp3', 'vp8']
So defintely we have aac and h264 decoders (non-royalty-free-software) going out by default with our electron-based application. To the best I know, these could lead to possible patent-infringement issues.
2. Is there any documentation around how the electron team builds chromium (with what flags)?
I couldn't find any conclusive documents but https://github.com/electron/electron/blob/58c58c46c4e03c996983a0c71163e1a5efed12fa/build/args/all.gn hints that by default proprietary_codecs is set to true in electron's build
3. Is the default libffmpeg.dylib/dll bundled with electron building ffmpeg with support for things like H.264 and MP3 codecs?
It certainly looks to be the case (based on above)
4. I noticed there are libffmpeg binaries available with each electron build, e.g. https://github.com/electron/electron/releases/download/v12.0.7/ffmpeg-v12.0.7-darwin-arm64.zip . What's the purpose of this binary?
If you care about shipping royalty free binaries and not deal with patent issues, this is what probably you should use (unless you chose to build whole electron by yourself tweaking gn args).
A quick check of these ffmpeg.dylib reveal that AAC and H264 decoders are not present(or atleast it doesn't have exported symbols for them). So it leads me to believe that these custom versions of dylib are built by electron team keeping this in mind. Using same script this is the output for list of decoders available in custom version of libffmpeg
Decoders available/exported from libffmpeg.dylib: ['flac', 'libopus',
'mp3', 'pcm-alaw', 'pcm-f32le', 'pcm-mulaw', 'pcm-s16be', 'pcm-s16le',
'pcm-s24be', 'pcm-s24le', 'pcm-s32le', 'pcm-u8', 'theora', 'vorbis',
'vp3', 'vp8']
So this is the difference between two versions of dylib (left one is downloaded from electron site, right one is what comes by default with electron)
It also appears that this problem was already identified and we have a plugin for electron-packager that does all the heavy-lifting for you: https://github.com/MarshallOfSound/electron-packager-plugin-non-proprietary-codecs-ffmpeg
Since we din't use electron-packager (but electron-builder), i had to resort to put this logic of replacing libffmpeg in afterPackHook
: https://www.electron.build/configuration/configuration#afterpack
Important step to remember is that: this replacement needs to be done before we code-sign the whole app (or it breaks the code-sign integrity).
Hope it helps someone else going through the same problem.
Cheers!
I can't seem to get SDL_Mixer to initialize with OGG support enabled. I know that I must link with libogg, libvorbis and libvorbisfile but it still won't work. I have .dylibs, .frameworks and .as of these three libraries and I've tried them all.
I'm copying the dylibs/frameworks into the Frameworks folder of the app package in the build phases tab.
I have Runpath Search Paths set to #executable_path/../Frameworks in the build settings tab.
But Mix_Init(MIX_INIT_OGG) keeps returning the error OGG support not available.
I'm using the latest Homebrew versions of all of the mentioned libraries. I'm not sure what else to try.
I have a finished game with 300MB of wavs as the music.
Update
I’ve managed to mix some Objective C with C++ and get some sound playing with AVAudioPlayer but it’s horrendous code. I’m having to cast to void * to make sure my music player class is compatible with my C++ code base. The garbage collector is so annoying. All it does is get in your way. You have to fight it with bridge casts.
I’d really like to use SDL_Mixer or a simple C library.
I got the Objective C music player fully implemented but I just can’t stand Objective C. I found a brilliant library called stb_vorbis. I’ve used a few of the other stb libraries so I knew this one would be great. Playing the audio data from this library is actually pretty easy. All I really had to do was call stb_vorbis_get_samples_short_interleaved inside of SDL2’s audio callback. I didn’t have to do any mixing because I only need to play music. The implementation was so simple that it actually worked perfectly the first time I ran it! This because stb_vorbis and SDL2 are both C libraries so they just make sense (unlike Objective C which should be burned).
TL;DR
If you just want to play music and either can’t use SDL_Mixer or don’t want to use SDL_Mixer then you can just feed the data from stb_vorbis into SDL2’s audio callback.
I am going to build pjsip on window7,and I almost be ready to compile the project,but something confused me is one of the steps show in this page:link
It is said about SDL2,describe is here:
SDL sources comes with VS project settings, under VisualC sub-directory
So,what should I do indict by the description?
Another question,should I build SDL2 from source?
You should build SDL only if you want to compile PJSIP with video enabled.
It is used for rendering only. If you want you can build it from source.
Another option for rendering is DirectShow but it's broken for ages.
I developed a renderer driver for PJSIP to render to a bitmap and than I render this bitmap in C#. It's easier and works fast.
Also for video you will need ffmpeg at least for codecs.
My opinion: start without video. It's not easy to make it work and might be you won't need it at all.
I would like to create a Windows desktop app using HTML5 features, specifically H.264 video,Web SQL Database,FileReader API. I don't want to use AIR (which currently does not support the video tag, instead uses Flash). Ideally I would like an exe file that just wraps the latest version of webkit in a basic window. It should be stand alone, not rely on the user having Chrome etc. installed. It could load an index.html file in the same directory as the exe. That is it.
I have been unable to find anything like this. I was going to build it myself using QTWebkit but the latest version (4.8.0) does not support the Video tag due to some kind of build issue. I assume the 4.8.1 version will fix this.
Does anyone out there know of something like this that is available now?
For anyone coming across this, Titanium for desktop is no longer supported by Appcelerator, but the project is still supported as an open source initiative. As of today (10/14/2012), it is called TideSDK. According to their Twitter account, they're behind in the 1.3 release due to some sponsored work that will end up in the code base.
Additional options not yet mentioned include AppJS (OSS, requires node.js) and Sencha Desktop Packager (quite pricey).
I think titanium is not totally gone. There is this stuff called tideSdk
I couldn't try it out yet also , so video support and the codec are open for your exploration. Here is how they say:
Create multi-platform desktop apps with HTML5, CSS3 and JavaScript
TideSDK is the new standard for creating beautiful and unique desktop
apps using your web development skills.
I recently thought about doing the same thing, you can still do it with air without using flash, but you could also use Chrome Packaged apps, mozilla prism (although inactive today) or Microsoft HTA (html application).
You can think of using a framework that does the browser embedding for you like Titanium. It's mostly used for creating apps that can be published to iphone, android, and windows devices. It will create a windows MSI install.
Another option is to use the CEF project ( Chromium Embedded Framework for C/C++). I havn't looked at it much, so I can't tell you how difficult/easy it is to work with. Their main site also has wrappers for Java, .NET, and other languages.
Any suggestion regarding how to play videos using GTK+?
Regards,
Lancy Norbert Fernandes
For Playing Videos on GTK+ and other GTK Bindings you have a lot of options.
Option: Use A Third-Party Library
1- Try using ogmrip-gtk , A set of Gtk Interface, which allows you to use the open-source OGMRip library as a Gtk-Widget.
2- You may use another library, gstreamer. Also can be used easily with Gtk.
3- You may use LibVLC - gtk. A GTK wrapper for LibVLC (ever used the VLC Media Player?). Personally , I like this a lot.
Option: Using Code from Open-Source Software
1- The Banshee media player is open-source and although it uses Gtk#, you may have no trouble converting the code to GTK+.
2- See the MPlayer or Totem Player Source Code. (or any other for that matter, here is a list )
Option: Use A Process
1- I've heard the MPlayer Command Line is pretty simple. Here's a guide. http://www.mplayerhq.hu/DOCS/HTML/en/commandline.html
With GTK+ there are always a lot of new and innovative (not to mention open-source) ways to do stuff. So always keep looking for better ways. I am personally a great fan of the GTK+ toolkit and have found that there is nothing you cannot do with it.
GStreamer integrates well with GTK+.