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 :(
Related
How can I use hls m3u8 format in nextjs
I tried with video.js CDN but I couldn't achieve it. Hls.js and react player are not compatible with the last version.
Please check the example at this link: https://stackblitz.com/edit/github-hgv7za-ezygog.
Currently, it is working for me with the sample m3u8 file located at https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8.
If you encounter a specific error, please provide more details, such as the console log, etc.
The actual task is to play mp3 file that should be embedded with the electron app.
I placed the mp3 file near my electron app "main.js".
I wanted to play it using some "sound-play" (https://github.com/nomadhoc/sound-play) package using bridge api, but it didn't worked out, sound is not playing.
So I want to just play it using an audio element (which seems to be more universal), but I don't get what src url I should supply to it. And then I wonder how to correctly add an additional asset to the built version (I'm using electron-builder).
Working with extra/local resources in election apps is kind of obscure topic for me. Advice would be appreciated.
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
I have an mp4 video file that I've converted to .ts file with ffmpeg for streaming via m3u8. along with that mp4 I also have multiple audio files as .wav that are the alternate audio files for the video. I have added them to a main m3u8 file like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=850000,RESOLUTION=640x360,AUDIO="bipbop_audio"
index0.m3u8
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="eng",NAME="BipBop Audio 1",
AUTOSELECT=YES,DEFAULT=YES
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="nr",NAME="BipBop Audio 2",
AUTOSELECT=NO,DEFAULT=NO,URI="audio1.m3u8"
when I go to play this using hls.js in the browser the video file's m3u8 is downloaded (index0.m3u8) and the video plays, but the audio file's m3u8 files are not downloaded by the browser and the audio does not play. I can actually see the alternate audio info in the hls.js object instance that is in the main m3u8 file when I console log it, but making hls.js switch to it does not make it download nor play.
So far I've tried:
converting the audio to .mp3 via ffmpeg
converting the audio to .ts via ffmpeg
here is what the .ts version of the audio file looks like as an m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:2914
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:2913.661333,
abc0.ts
#EXT-X-ENDLIST
I'm pretty new to ffmpeg and hls.js, but is there some specific way I need to make ffmpeg generate the m3u8 files for both the audio and video to make them work together?
so far I don't see any errors in the browser relating to the main m3u8 or hls.js.
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.