esseki 12 Posted January 6, 2015 Share Posted January 6, 2015 Hi, i was wondering if the development team already considered moving from FFMPEG to GStreamer (http://en.wikipedia.org/wiki/GStreamer). GStreamer is a pipeline-based multimedia framework written in the C programming language with the type system based on GObject. GStreamer allows a programmer to create a variety of media-handling components, including simple audio playback, audio and video playback, recording, streaming and editing. The pipeline design serves as a base to create many types of multimedia applications such as video editors, streaming media broadcasters and media players. It comes with a cross platform SDK (http://gstreamer.com) available for the main desktop and mobile OS : Linux Android OS X iOS Windows It is open source, free and well documented : http://gstreamer.freedesktop.org/documentation/ http://docs.gstreamer.com/display/GstSDK/Home But the most interesting feature according to me, is its ability to offer hardware accelerated video decoding/encoding (http://docs.gstreamer.com/display/GstSDK/Playback+tutorial+8%3A+Hardware-accelerated+video+decoding). The list of hardware supported is impressive : As of July-2012, there exist at least 8 different video decoding acceleration APIs: VAAPI (Video Acceleration API): Initially designed by Intel in 2007, targeted at the X Window System on Unix-based operating systems, now open-source. It is currently not limited to Intel GPUs as other manufacturers are free to use this API, for example, Imagination Technologies or S3 Graphics. Accessible to GStreamer through the gstreamer-vaapi and Fluendo’s Video Acceleration Decoder (fluvadec) plugins. VDPAU (Video Decode and Presentation API for UNIX): Initially designed by NVidia in 2008, targeted at the X Window System on Unix-based operating systems, now open-source. Although it is also an open-source library, no manufacturer other than NVidia is using it yet. Accessible to GStreamer through the vdpau element in plugins-bad and Fluendo’s Video Acceleration Decoder (fluvadec) plugins. DXVA (DirectX Video Acceleration): Microsoft API specification for the Microsoft Windows and Xbox 360 platforms. Accessible to GStreamer through the Fluendo’s Video Acceleration Decoder (fluvadec) plugin. XVBA (X-Video Bitstream Acceleration): Designed by AMD Graphics, is an arbitrary extension of the X video extension (Xv) for the X Window System on Linux operating-systems. Currently only AMD's ATI Radeon graphics cards hardware that have support for Unified Video Decoder version 2.0 or later are supported by the proprietary ATI Catalyst device driver. Accessible to GStreamer through the Fluendo’s Video Acceleration Decoder (fluvadec) plugin. VDA (Video Decode Acceleration): Available on Mac OS X v10.6.3 and later with Mac models equipped with the NVIDIA GeForce 9400M, GeForce 320M, GeForce GT 330M, ATI HD Radeon GFX, Intel HD Graphics and others. Only accelerates decoding of H.264 media. Accessible to GStreamer through the Fluendo’s Video Acceleration Decoder (fluvadec) plugin. OpenMAX (Open Media Acceleration): Managed by the non-profit technology consortium Khronos Group, it is a "royalty-free, cross-platform set of C-language programming interfaces that provides abstractions for routines especially useful for audio, video, and still images". Accessible to GStreamer through the gstreamer-omx plugin. OVD (Open Video Decode): Another API from AMD Graphics, designed to be a platform agnostic method for softrware developers to leverage the Universal Video Decode (UVD) hardware inside AMD Radeon graphics cards. Currently unavailable to GStreamer. DCE (Distributed Codec Engine): An open source software library ("libdce") and API specification by Texas Instruments, targeted at Linux systems and ARM platforms. Accessible to GStreamer through the gstreamer-ducati plugin. It means that GStreamer could use hardware (basically the GPU instead of the CPU) to accelerate video decoding or video transcoding with the following configuration : PC with ATI, Nvidia, Intel or S3 GPU running windows (DXVA) PC with Nvidia (VDPAU) , Intel or S3 (VAAPI) GPU running Linux Mac with ATI, Nvidia or Intel GPU running Mac OS X (VDA) Raspberry Pi (OpenMax) and even my lovely Cubox-i Since MediaBrowser can already be used on low power ARM based tiny computers (http://mediabrowser.tv/community/index.php?/topic/9571-running-server-on-raspberry-pi-yes-it-works/ or http://mediabrowser.tv/community/index.php?/topic/16767-mediabrowser-server-on-my-arm-based-beloved-cubox-i/), it would open to them the doors of transcoding capabilities reserved to power consuming and expensive HTPC. For people who would doubt about the ability for ARM devices to handle transcoding, i have gathered few articles : - an example of VPU accelerated transcoding DLNA server running on a Cubox-i : http://www.solid-run.com/community/viewtopic.php?f=13&t=630 - an example of DVD transcoding solution based on a Cubox-i using Gstreamer : http://www.solid-run.com/community/viewtopic.php?f=8&t=1130 - some example of usage of Gstreamer with Raspberry Pi : http://blog.pi3g.com/2014/02/gstreamer-1-0-packages-with-hardware-support/ or http://www.onepitwopi.com/raspberry-pi/gstreamer-1-2-on-the-raspberry-pi/ I am looking forward your opinion and feedbacks. esseki 4 Link to comment Share on other sites More sharing options...
Luke 36887 Posted January 7, 2015 Share Posted January 7, 2015 sounds neat. i think it would be great for a contributing community member who is a fan of gstreamer to create a proof of concept that switches the server to gstreamer and displays the benefits. Link to comment Share on other sites More sharing options...
esseki 12 Posted January 7, 2015 Author Share Posted January 7, 2015 (edited) Hi Luke, i'm glad that you find this interesting. I'm not exactly a fan of Gstreamer, but i'm a LAMP web developer the day, who trasnforms into a geek / power user during the night. I would be happy to help even if i don't know where to start from. For your info, i have at my disposal the following hardware : a mac a Cubox-i4Pro a Raspberry Pi and an old ex professionnal PC running Windows Vista that i hate This would be my little contribution to this amazing piece of software. esseki Edited January 7, 2015 by esseki Link to comment Share on other sites More sharing options...
Luke 36887 Posted January 8, 2015 Share Posted January 8, 2015 Sounds great to me. First you would have to look at these classes here and replace the command lines with gstreamer equivalents https://github.com/MediaBrowser/MediaBrowser/tree/master/MediaBrowser.Api/Playback Link to comment Share on other sites More sharing options...
Raithlin 10 Posted January 12, 2015 Share Posted January 12, 2015 @@esseki Let me know if you are interested in working on this. I am a C# developer, and although I don't have much time to give, I'd love to see GPU transcoding implemented properly across the board. 1 Link to comment Share on other sites More sharing options...
esseki 12 Posted January 18, 2015 Author Share Posted January 18, 2015 (edited) Hi @@Raithlin, i didn't find as much time as i would have liked to focus on this lately but this is still on my plate. My plan is to focus first on writing commands to compare the efficiency of both FFMEPG and GStreamer when it comes to transcoding. If the result matches my expectations, i will need some help with MediaBrowser C# code May i ask you what kind of hardware you have ? And if you have any particular expectations regarding hardware accelerated transcoding ? Edited January 19, 2015 by esseki Link to comment Share on other sites More sharing options...
Luke 36887 Posted January 18, 2015 Share Posted January 18, 2015 the best thing to do to get this to take off is to get someone onboard here who knows gstreamer inside and out. if you can get someone like that then i can work with them. Link to comment Share on other sites More sharing options...
Raithlin 10 Posted January 19, 2015 Share Posted January 19, 2015 I run MB on my low-powered HP micro-server - AMD Turion N54L 2.2GHz - coupled with a Nvidia GeForce 210 graphics card. For obvious reasons, I'm looking to move the transcoding to the (more than capable) graphics chip for the tables/phones around the house. I do agree with Luke though - but the documentation I've been through so far is pretty complete. I'm gonna keep reading... Link to comment Share on other sites More sharing options...
esseki 12 Posted January 22, 2015 Author Share Posted January 22, 2015 (edited) Hi, FYI i have posted on the SolidRun forum to ask some help to somebody who achieved the same kind of goal : http://www.solid-run.com/community/topic630.html His experience with Gstreamer may be helpfull. Let's see if i get some news In the meantime, like @@Raithlin i will keep experimenting Gstreamer using the official doc. By the way @@Raithlin, i see that you have an NVidia chip, you should have a look at this thread Edited January 22, 2015 by esseki Link to comment Share on other sites More sharing options...
greatsimo88m 0 Posted January 26, 2015 Share Posted January 26, 2015 I also have a Cubox-i4Pro (Vivante GC2000 GPU) and 2 Raspberry Pi (VideoCore IV GPU) and would love to see this implemented. Although I do not know GStreamer and I am not fond of C#, I will do my best to help with this task. If you have anything to test or any suggestion where to start from, I will be glad to contribute. Link to comment Share on other sites More sharing options...
Luke 36887 Posted June 17, 2015 Share Posted June 17, 2015 Are there any news about this? Would really love to see gstreamer working because I am running Emby on a Raspi 2 and have no hope that the ffmpeg team will ever enable gpu acceleration on the raspi. https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog Link to comment Share on other sites More sharing options...
techywarrior 688 Posted June 17, 2015 Share Posted June 17, 2015 That's great.... But aren't we using the 2.5 branch? Are there any problems switching to the 2.7 branch to get hardware acceleration? Or is it just a matter of lots of user testing once the switch is made? Link to comment Share on other sites More sharing options...
lenovomi 0 Posted July 3, 2015 Share Posted July 3, 2015 any update on it? my raspbian has... ffmpeg --versionffmpeg version 0.8.17-6:0.8.17-1+rpi1, Copyright © 2000-2014 the Libav developers built on Mar 25 2015 00:39:58 with gcc 4.6.3The ffmpeg program is only provided for script compatibility and will be removedin a future release. It has been deprecated in the Libav project to allow forincompatible command line syntax improvements in its replacement called avconv(see Changelog for details). Please use avconv instead. Link to comment Share on other sites More sharing options...
Luke 36887 Posted July 3, 2015 Share Posted July 3, 2015 what update are you looking for? why would we move away from ffmpeg? Link to comment Share on other sites More sharing options...
techywarrior 688 Posted July 5, 2015 Share Posted July 5, 2015 what update are you looking for? why would we move away from ffmpeg? Possible he is referring to the talk of HW acceleration being in the 2.5 branch of ffmpeg and if/when Emby will use that branch if it isn't already... and if it is if/when Emby will use the latest build which includes the acceleration. Link to comment Share on other sites More sharing options...
jpichie 7 Posted August 24, 2015 Share Posted August 24, 2015 Hi guys, I would love to see hardware transcoding with AMD, as their APUs are very cost effective. I'd hate to have to buy a new mobo for Intel/nVidia, any idea if this is something possible in the upcoming versions? 2 Link to comment Share on other sites More sharing options...
Luke 36887 Posted December 13, 2016 Share Posted December 13, 2016 Emby Server has numerous (expiremental) hardware transcoding options available now. Give them a try, I think you will enjoy it. Thanks ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now