Video via OMXControl don t have sound, omxplayer play it fine - javascript

I m trying to use the Lamba Labs Beirut Hackerspace 's RPiTv
I have configured my Raspberry Pi for it (Raspibian, node.js, omxplayer, youtube-dl...)
If I download a video and play it in omxplayer, all work fine.
When I try to do it via the node.js app, the video play fine, but there is no audio
The screen is a HP ProDisplay P201 linked by a DVI cable
Audio by a audio casque linked with jack
I can modify the code, but since I m still learning javascript, I d like to avoid it for now.
I m thinking that the lack of audio can come from:
-Is there limitation between omxcontrol and omxplayer? (Is the volume just set to 0 when omxplayer is called, or is there is no audio at all?)
_-In that case, what is the volume control option for omxcontrol, tried google but it seem he don t like me today
-Is it something I made wrong when installing omxcontrol or node.js? (I assume youtube-dl and omxplayer are fine, since it play well when lauched manually)
I know I ask a lot, but even a hint will help.

I figured it out, I just wasn t watching the right code.
I was thinking the problem came from remote.js, but then I saw omxcontrol was starting omxplayer with -o hdmi flag (in omxcontrol/index.js), since the screen didn t had audio output, the audio was lost.
I removed the flag and all work fine.
Hope it can help somebody else.

Related

How to deal with a YouTube video that have been watched before

I have a question after viewing the way that yt-dl (and its branches) work, it is as easy as requesting a video like any regular user and doing the reconstruction and collecting the whole thing as one file. I have to assert that it is not a superuser question!
Is there a way (even a not mature one) to deal programmatically (I think JS is the only one that I ask for here) with the segments of a video from youtube for example so that we do not need to download the whole video from the beginning if we have watched a video and decided that we want to keep it offline? Assuming that the whole video is still in the RAM (storage tab in the developer's tools)
OS: Windows   Browser: Chrome   PL: JS
Answers to this question are going to be the seed of a browser extension project
If it is your video, may be. I have seen people segmenting the videos like chapters/parts. If you can do that, you should be able to take part of the video.
I also find this video that explains it:
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwj5i5Oo4oj9AhXBNuwKHWtMAMcQtwJ6BAgKEAI&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuuZZFVMoE_U&usg=AOvVaw0LMgqUzgu9nUzvxe63jQ-m

Best step to create simple TeamViewer clone

I need to create a Teamviewer clone. Basically, I need it to work on all 3 major platforms (Win, Mac, Linux). I'm racking my brains to try to solve using NodeJS + Electron DesktopCapture to capture video, and transmute via P2P
I was thinking of doing with https://recordrtc.org instead of electron, since it works right from the browser, and I could only later package it to an executable.
But I think my biggest problems are:
1) How do I take the real time video capture from Electron / RecordRTC and stream it via a server? I can only get the recorded file later (.webm), but this is useless.
2) How will I control another user's mouse and keyboard? RobotJS, maybe? as if I were going to watch the video for 1 channel and contrast the keyboard and mouse for another?
I know how to program, I just need a light!
It's for my job! (Freelancer)
Ty <3

Recording sound in Electron.js

I'm currently working on an experiential project building a sound recorder.
I will use an arduino with a button to start/stop recording, so that there are no interactions with the machine (a concealed Windows laptop) at all for the end user.
Looking for a way to record the sound on the machine from a microphone, ideally in Javascript.
The sound should be recorded locally (no dependency on Wifi connection) and each sound should be saved as a separate file.
Once the project is done/installed, I will have no access to the machine any more so the files need to be easily accessed by a non technical user (hence the arduino/laptop combo and not a raspberry pi for example).
My forte is JS so I was hoping to do it using Electron but I haven't found a way to do this just yet.
I have tried the obvious navigator.mediaDevices.getUserMedia which doesn't work on Electron for security reasons. There are a number of libraries out there but the ones I saw won't work at all, are outdated, and haven't been updated in years.
I also tried using p5.js, which despite being a bit convoluted worked quite well, but requires user input when saving the audio file, which is not an option given the installation will only have one button to start/stop recording an as interface.
Has anybody done this or is anyone able to put me in the right direction?

Audio Analysis in WinJS

I've been poking around the API to find what I'm looking for, as well as searching online (but examples of Windows Store apps are pretty scarce). What I'm essentially looking for is a starting point for analyzing audio in a Windows Store JavaScript app. If I were creating a simple visualizer, for example, and I need to detect the various kinds of "bumps" in the currently playing audio.
Can anybody point me in the right direction here? Is this something that's even possible in a Windows Store JavaScript app? Whether it's the audio of a selected song, or the device's currently playing song, or the audio on the microphone... either way is fine for my needs at the moment. I'm just looking for where to start in the analysis of the audio.
GGG's response sounded skeptical of the possibility of a signal processor on WindowsRT, and I have to admit I don't know much about WindowsRT either. But we know you will have javascript available. It sounds like you are interested in Digital Signal Processing in Javascript. If you take a look at these resources. They could get you pointed in the right direction.
https://github.com/corbanbrook/dsp.js
http://www.bores.com/courses/intro/index.htm
http://arc.id.au/SpectrumAnalyser.html

Random loss of javascript audio in Chrome

I've been developing a browser based game using html5 and canvas objects it's going well so far. However i've run across a strange issue that I believe is related to chrome. Basically, the game can play fine for a period of time (this varies, typically a few minutes) then the audio just stops playing. If you then refresh the page or go on any other page with html5 audio tags then the sounds do not play either. If I take a look at the javascript console's network tab in chrome then i can see the audio objects haven't transferred and have a type and status of 'pending'. I've never got an error like this in firefox, only chrome.
My search online for similar situations only found one link that sound similar http://www.lordofultima.com/en/forum/showthread.php?tid=52813 with users complaining about loss of sound in chrome in this game (which is also done in javascript)
Any pointers? Feel free to ask if you need more info.
Just remove id3 tag of mp3 , it's strange but works , at least i hope

Categories

Resources