ap0c / node-omxplayer Goto Github PK
View Code? Open in Web Editor NEWA library for controlling the Raspberry Pi omxplayer from Node.js.
License: MIT License
A library for controlling the Raspberry Pi omxplayer from Node.js.
License: MIT License
omxplayer will throw error if system GUI is disabled.
omxplayer test.mp3 -o local --blank --no-osd
omxplayer.bin: omxplayer.cpp:473: void blank_background(uint32_t): Assertion `display' failed.
/usr/bin/omxplayer: line 67: 3170 Aborted > LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"$OMXPLAYER_BIN "$ @"
Perhaps we should remove "--blank" from https://github.com/Ap0c/node-omxplayer/blob/master/index.js#L38 ?
If I set the orientation of my screen to "right" (90ΒΊ) in my raspberry, the video plays as it is not rotated. Any clue?
Is there any way to run this player not on my raspberry but on my mac?
I would like to change something to the code and for testing purposes this would be ideal.
For now, if I run a javascript file, which uses the node-omxplayer it says I don't have the underlying OMX Player installed β which I actually don't. But I cannot figure out how to do that. Is it even possible to run it on a mac?
I need a function to change the sound position to a specific location (forward and backward) based on the value of a clock, making the sound synchronized with a clock. Should it be possible to create a function to perform that function, and a specific method to read out the duration of a media file as an integer in ms?
Hi,
Sorry I am not a programmer but a user. I have a big video installation with 30 raspberry remoted by OSC (with this : https://github.com/marsvaardig/osc-node ) It would be perfect if possible to remote the positon like with a for exemple "/win 0 0 960 540 /home/pi/videos... etc"
So how is it possible to add the --win command in theses two node? If possible ? And who could make it?
Thanks a lot
merci
Fabrice Aragno
Lausanne
Hi,
I'm playing audio only and unfortunately, the current screen which shows important information is hidden due to a black fullscreen. The reason for this is the paramter --blank
in line 38:
let args = [source, '-o', output, '--blank', osd ? '' : '--no-osd'];
Would it be possible to make this paramter configurable from outside?
I've got a syntax error: Unexpected strict mode reserved word at line 5 in node-omxplayer/index.js.
Any idea ?
Thanks
Hi,
I've try to use your library with this piece of code:
var Omx = require('node-omxplayer');
var player = Omx('~/song.mp4');
player.on('close', function() {
console.log('player closed!!!!');
});
player.on('error', function() {
console.log('error happened!');
});
but the issue is it's immediately printing:
player closed!!!!
the player doesn't even open.
As a side note when I open omxplayer
with exec it works well:
var exec = require('child_process').exec;
exec('omxplayer ~/song.mp4');
but with spawn
(which your library uses) it again, immediately closing
var spawn = require('child_process').spawn;
var args = [ '~/song.mp4' ];
spawn('omxplayer', args);
I'm running this on latest raspbian, with nodejs v6.11.2
Have any suggestions how to solve it?
Thanks!
Hi, thanks for the package but it plays the video muted as default. volUp doesn't work for me. How can I help you to solve this? Thanks
Hello,
I'm facing an issue with node-omxplayer, I'm playing audio for 1 min then after that I'm closing the player and after 1 min again playing another audio but this time it plays only for 1sec and closes immediately.
please help me with this.
Thank you
Maybe you should delete the args for omxplayer ...
log.
I listen to the close event to do something after a video is finished playing.
After first time adding a newSource and when the video is done the close event is called once (this is good).
But when I play a second video by adding newSource and when the video is done the close event is called twice.
And after a third video the close event is called three times.
Is there a reason this happens?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.