merge audio and video in nodejs without using ffmpeg - node.js

Im trying to merge audio and video both in mp4 and x264 codec but only with node js in server side without using ffmpeg.
is there any way to achieve something like this?
I already tried:
https://github.com/gkozlenko/node-video-lib
but its not working.
any ideas ?
tnx

Related

convert audio octet-stream to .wav in nodejs

I currently receive a stream that is in binary format but with the help of nodej I want to convert that stream to .wav audio.
Currently I can get the audio in .raw and I can play it in audacity but I don't know how to convert it to .wav.
if anyone can help me, thanks.
Basically you could use ffmpeg it a great package to deal with audio and video.
there is a wrapper for nodejs, you could install it
npm i fluent-ffmpeg
then you could execute your ffmpeg command from you nodejs application.
this should be helpful https://trac.ffmpeg.org/wiki/audio%20types to chose the right command to execute

Play pcm audio from a websocket stream in React

I am trying to play a pcm audio stream from a websocket in a react application.
On the backend I have a websocket that streams pcm audio. I was able to create a node file that would connect to the websocket pcm stream and play the audio through my computer speakers using the npm packages websocket-stream and speaker.
The issue I am having now is how to move this code over to a react application. When I try to use the websocket-stream package in react, the application does not compile. In addition, the speaker package does not seem to work in the browser. I have found a few examples of playing mp3 files in react, but none that play from a stream.
Any help/direction would be greatly appreciated!
I used this github project and ported the code over to a react app: https://github.com/samirkumardas/pcm-player

nginx rtmp to hls streaming

My scenario is to pull data from a RTSP source via ffmpeg, send it to nginx-rtmp, and use nginx to provide hls playback. There are quite a lot of tutorials and q&a's on the internet. I followed this one:
https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/
However, it miserably failed. To make things simpler to understand, I would like to ask the core question:
Who is responsible to create the m3u8 playlist file?
I tried to experiment in two steps: first, try to push a local mp4 file and play it back via HLS:
Following the above tutorial, I try to use ffmpeg to push a local mp4 file to nginx-rtmp, and use videojs to play it. The browser reported error:
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media.
Secondly, I have successfully saved the video file pushed to nginx-rtmp as a series of FLV file, and I know that I can use exec_push to call ffmpeg to convert flv to a format that is compatible with HLS. Again, here the core question is, howto create and UPDATE the m3u8 file as new video data is coming in endlessly.
For now, I would like experts to help me tackle the first question -- playback static mp4 file through HLS. Any tutorials on m3u8 playlist and mpeg-ts files are also much appreciated!
The nginx-rtmp module by itself creates and updates the playlist as new segments arrive.
To troubleshoot check if the .m3u8 files are created under the folder specified in hls_path of your nginx conf. Rest is just nginx serving a file using http.
If that works try the HLS url directly in safari (safari got inbuilt HLS player) or in Chrome (Play HLS M3u8) extension enabled.
If that works the problem must be with your player.html

HLS stream with jwplayer using requirejs

I would like to use JWPlayer loading by RequireJS to play HLS streams. But I have a problem with it.
All the single files are working for me ( for example .mp4 files ) except the streams.
I've created a plunker example, in the playlist there is an .mp4 file and a test stream from the jwplayer's site and the stream doesn't work.
Please help me, because if the JWPlayer can not work with RequireJS we will not buy the official licence :(

converting audio file format after upload

I am developing a phonegap application for iOS and Android. In iOS, recorded sound format is .wav and in android, it's .amr/.mp3. After recording, audio file gets uploaded to a web server.
I need to convert these files from .amr/.wav to .mp3 after upload - what options do I have?
I've read about ffmpeg and ffmpeg-php. Will that work with shared hosting? If yes, can someone provide any link to install it?
Any converter, which will work with shared hosting of justHost cPanel?
any php class which can send my audio file to ffmpeg server and get back mp3 file? Just thinking.
Any other option?
I don't mind the method - I need the the required output.

Resources