Currently I’m trying to develop RTSP video player, which can show many streams at one time (2, 4, 5 etc). It has to be fast and be able to run on Windows, Mac and Linux.
First app version has been written on Swing and VLC. Good performance, ability to play many streams at one time on slow PC. But not impressive UI and video playing is unsupported on Mac
So, after a lot of researching I stopped on JavaFX and VLC. Great UI, support on all platforms, but performance issues on slow PCs.
Here is simple project which can play one video: https://github.com/costello/vpfx
(don’t forget to set your media link in class java/app/AppController.java, line 22)
Unfortunately it’s using too much CPU, even if I play only one video. I tried to play 2 or 4 videos (from different RTSP streams), completely nightmare.
Here is CPU usage graph on PC with Intel® Pentium® Processor E5300
(2M Cache, 2.60 GHz, 800 MHz FSB) and integrated video card: http://imgur.com/MrBv3HF
vlcj version: 3.0.1
VLC version: 2.1.5
Java: 7 and 8 (java fx 2.2 and java fx 8), same result.
Found this OpenGL discussion: How to use OpenGL in JavaFX?
But I don’t know how to use OpenGL to render image from given RGB array and even I don’t know will it help.
Related
I have been working with QML for a couple of weeks now. But now a new requirement has risen where I have to check whether I can run QT5 in an embedded device for my project. I need this for my GUI related operations. The device has an ARM processor (Intel ARM920T-PXA27x processor to be exact) with 64 MB RAM. 32 MB will be taken up for the OS and the rest will be available for application and QT.
I have to check whether this is possible. I have googled for some references and unable to find a suitable answer to my requirement with QT5. I need the GUI libraries but my project does not have advanced graphical requirements like swiping or animations. It contains basic controls like texts, buttons and lists/grids. Since I am new to QT especially to this part, I would like to hear whether
1) Is this a viable option and should I keep digging more into this? Any feedback would be welcome to know if it's worthy to spend time to attempt this or if it's a lost cause.
2) If there are options, could you point me in the right direction to look more into this?
It depends on the OS you are running on your SOC.
It's definitely possible when running Linux. You can e.g. use Qt Lite for configuring a minimal static build of Qt. Then you deploy your statically linked application to the device. You can check this blog post for experiences with Qt Lite.
One possibility is to go with Qt for Device Creation for the whole embedded Linux based software stack which boots to a UI implemented with Qt technologies.
When I make a change to Javascript file and save it, it takes over 5 seconds to build and restart the development server even if it is simple 10 line example app. I am new to Meteor.js so I don't know if it's normal, but I though changes should appear instantly (about a second or two) on a browser? 5-6 seconds feels pretty long time for me.
Selecting package versions and downloading packages seem to take the major part of the time.
There is one websocket pending (Chrome Dev tools Network tab) when it's restarting. I'm using Meteor 1.0.
That's a known problem they're working on. You can read about it and follow the progress in issue #2846.
There is a new issue about this: https://github.com/meteor/meteor/issues/4284
Upgrading to a pre-release of 1.3 seems one of the best options right now:
meteor update --release METEOR#1.3-modules-beta.8
And upgrading to 1.3 when it comes out (should come around march-april 2016).
Quick measurements to get a rough idea:
BryanARivera says on the thread that updating to 1.3-modules-beta.8 gets him From 6-10s to 1-2s.
I tried on the https://github.com/wekan/wekan project by changing a view component (on an early-2013 mbp with SSD):
with `METEOR#1.2.1` ~10s to reload
with `METEOR#1.2.2-faster-rebuilds.0` ~5s to reload
with `METEOR#1.3-modules-beta.8` ~4s to reload
This was my purely hardware solution to the problem of slow Meteor build times.
When I decided to get into development I was adamant that I wasn't going to run out and buy the latest and greatest in hardware until I actually knew how to code and knew what my requirements were in the long term.
So I went out and bought a used 15" Acer laptop; it had the following spec:
Memory: 6Gb RAM
Processor: Intel Pentium CPu 6200 # 2.13GHz *2
OS: Ubuntu 16.04.1 LTS 32-bit
Storage: 153.5GB HDD
With this setup I saw rebuild times of between 15s ~ 30s (including the browser refresh) of a side project using Meteor 1.4, Reactand a Mongo db instance with around 1500 records. I found these times to be excruciatingly slow when it came to making multiple changes. You can see the initial version of the project I was working on herehere.
After trying to get work done in cafe's and libraries I realised that I was much happier working at home, and once the side project was complete I decided I would reward myself with an upgrade.
My initial choices were between a Macbook Pro and a gaming PC such as the Asus ROG, but since the former are very expensive and the later's graphics abilities were of no use to me (I'm not a gamer) I ruled them both out. These being quality machines, when I compared them against reviews of other PC's and laptops I noticed that where other systems scored higher in performance, they were lower in build quality and vice versa and there was no overall winner that had me sold.
I decided, a self build was in order and that it would be great if I could fit it all into a mini-ITX board and case. My requirements became:
An SSD drive (faster read/write times than a HDD)
Ubuntu: On account of it being free and faster that MacOS
Mini-ITX: so that it can unobtrusively fit onto my desk
Quite
16Gb DDR4 RAM: this seems the bare minimum for development.
After some searching I came across these instructions for a $682 Skylake Mac Mini Hackintosh Build, which formed the basis of my build.
As I currently have no intention of working with MacOS, as per the Hackintosh instructions, I did not change the Wifi card.
My new spec list along with what I paid for each item were as follows:
Intel Core i7 Quad-Core i7-6700 3.4GHz Processor £279.97
Crucial Ballistix Sport 16 GB kit (8 GB x 2) DDR4 2400MT/s UDIMM 288-Pin Memory £121.00
Samsung 850 Pro 250GB SSD £121.00
Gigabyte H-170 Motherboard £109.00
Noctua NH-L9i CPU Cooler £35.00
External PicoPSU Power Brick £24.00
MiniBox 160W PicoPSU £40.00
Streacom F1C-WS £90.00
Noctua NF-A4x10 FLX £10.99
Making a total spend of £830 (correct at time of writing).
The case comes in two finishes; black and silver, I went with the former to keep my monitor my main point of focus on my desk. It took me about an hour as a newbie to put it all together. I imagine it would be much faster if I did this for living.
Pros:
My rebuild times were drastically reduced to only 2s using Meteor 1.4.
The PC as a whole takes only 15 seconds to boot up whereas the laptop could take as long as 2 minutes.
With the laptop, a Meteor reload would fully load the CPU whereas with the PC the 4 cores barley rose above a few percent, as viewed from the System Monitor tool.
It has a footprint of 19cm x 19cm making which is smaller than my laptop.
It was super quite, the fans were barley noticeable on most days.
Cons:
The draw back of such a small case is that there is no room for a graphics card should I want to start gaming in the future.
All the ports are at the rear. However, this does give the front a clean look.
There is no reset button but the power switch can be configured via the bios to act as a "soft" switch such that, pressing it brings up a dialogue giving you the option to restart/suspend/shutdown.
Conclusion:
Overall I am very happy with the choice of components I made and the money I saved by self-building.The PC is powerful enough for video editing and I am working towards editing my first Youtube tutorials.
Being more wise about my needs means that I am now using Docker to create isolated development environments to prevent software conflicts which in themselves can chew up time in resolving.
The component research I did means that I am aware of the massive progress that PC cases, coolers, cables, memory cards, fans have made since I left college. You can now build something not only small and powerful but also attractive with options like tempered glass, liquid coolers, custom braided cables, case strobe lighting and shaped cases.
I am working on a system that includes two units: control unit and display unit both are ARM linux boards.I want to choose videos from sd card or usb on the control unit and stream this video to display unit and lastly show live video on display unit.I searched web and learned RTP and RTSP protocols can be using for this system.Several applications created with LibVLC and Live555 libs.But I need a clear example to simply work this system on Qt enviroment(developing on Ubuntu 12.04 LTS).Most important point is; I need any guy's experiments on this app which one is stable and good performance (FPS).I appriciate you to helping me with this problem.
Thanks.
I would like to develop a media player/recorder.
The primary target platform is Windows, support for other OSs would be nice, but that's not a high priority. It should be able to play formats like wav, mp3, avi. It should also be able to record audio (microphone) and video (webcam or capture card).
As I have some experience with QT and C++, I looked at QT (4.7.2) phonon with DS backend. But unfortunately I was unable to play a simple AVI, even with the MediaPlayer sample that comes with the QT demos. I could only hear sound, but saw no video.
The developer machine is a 64-bit Vista. I also tried it on another 64-bit Vista without any luck. On a 32-bit Win7 (QT MinGW) it then finally worked. But when I copied that MediaPlayer executable and its dlls to the 64bit machines and tried to run it, it again failed.
Is there a known problem with QT phonon on 64 bit machines? I also heard of a VLC phonon backend. Could that be solution? Is QT phonon mature enough to develop a commercial application on top of it? Or is it maybe more wise to access directshow directly?
Thanks
Directshow is just a programming framework or API, it does not guarantee that you will be able to play every possible video format on every computer, since it relies on codecs installed on the system to decompress the audio/video streams. A codec for one specific format might be available in one system an not in anotherone. On top of that, 64 bits architecture adds even more complexity, since codecs built in 64 bits mode cannot be used from 32 bits applications and vice-versa. The issue you are facing on the 32 bits Phonon player is very likelly to be caused by a missing or "not 32 bits compatible" codec.
VLC on the other hand is a self contained application, it does not depend on DirectShow or in any codec installed on the system, so it might be a good idea to use it instead of DirectShow, however you will need to read VLC legal terms and decide if you can still use it for your purposes.
I am working on a full screen kiosk application in Flex 4/Air 2 using Flash Builder 4.
We have a company training website which staff can access via the kiosk, and the main content is interactive flash training videos. Our target machines are by no means 'beefy', they are Atom n270s # 1.6Ghz with 1Gb RAM.
As it stands the videos are all but unusable when used from within the Air application, the application becomes completely unresponsive (100% cpu usage, click events take approx 5-10 seconds to register).
So far I have tried:
increasing the default frame rate from 24fps to 60. No improvement.
nativeWindow.stage.frameRate = 60;
running the videos in a stripped down version of my app, just a full screen HTMLLoader component pointed at the training website. No better than before.
disabled hyper threading. The Atom CPU is split into two virtual cores, and the AIR app was only able to use one thread so maxed out at 50% CPU usage. Since the kiosk will only run the AIR app I am happy to loose hyper threading to increase the performance of the Air app. Marginal Improvement.
The same website with the same videos is responsive if viewed in ie7 on the same machine, although Internet Explorer takes advantage of the CPU’s hyper threading.
The flash videos are built with Adobe Captivate and from what I understand use JavaScript to relay results back to the server.
Adobe Air 2 recently came out of Beta (June 15th I beleive, the day I posted this question...) and this release correctly utilizes BOTH virual cores when hyperthreading is enabled on the CPU.
CPU usage when playing the flash content in the HTMLLoader component dropped from 100% to around 60%, a massive improvement.