Can i play .m3u8 file in browser? - http-live-streaming

The given file was a hevc file(.h265). I couldn't play it . I tried it various way. I Used Shaka player , vimeo.js. But i couldn't solve it.

Related

Add movflags to top of mp4 file without using ffmpeg for a live RTSP stream

Update:
I have a video player in browser which plays mp4 videos though websocket. The player only supports mp4 file. When i checked normal mp4 fiels does not play in the player, a mp4 file with a "moovflags faststart " will only play on that player. For a allready stored file , this will work properly.
But In case of an livestream(RTSP), using ffmpeg will only work once the RTSP connection has terminated since the "moovflags faststart " flags will work once a connection has terminated properly.
Hope the above statements makes more sense.
Due to this behavior, am checking if there is any way to get the moovflasg at first or something
I am having RTSP live source and i need it to convert the RTSP to a mp4 file which has moov flags in the begining of the file.
I have checked with openrtsp to take a mp4 dump of the rtsp, but it only adds moov flags and other info on the footer of the mp4(onlky when openrtsp has closes the rtsp stream).
Ffmpeg has " -movflags faststart" to move the footer info to the header of the mp4 container.
Since i am having a RTSP live source, the video data will be comming back to back and there wont be any termination. The above ffmpeg command only works once the rtsp stream has terminated.
Is there any way we can make a mp4 container which contains the mp4 footer info present in the header itself so that i can use it for a live source?
EDIT #1
I have video player which plays mp4 video files , it only support playback of a recorded mp4 file which is createtd using "-movflags faststart" , normal mp4 files does not play in that.
This is the player
https://github.com/sonysuqin/WasmVideoPlayer.
Since i am tryng to stream live video to the player, its not possible to use movflags faststart.
The mp4 header can not be added to the file before it is complete. It’s not possible because of how mp4 files are structured. The header needs to know the frame type, timestamp, size, and file offset of every frame in the file. That can’t be known until the file is complete. You can not stream an mp4 while it is being created. You need to use a protocol such as HLS or DASH to accomplish this.

SIM800C : Uploaded audio AMR file has noise when played during call

I am able to upload the AMR file to SIM800C successfully.
When I play the uploaded audio file during the call using the below command :
#if CALL_RECORDED_AUDIO
Serial1.print("AT+CMEDPLAY=1,C:\\REC\\");
// "Command Media PLAY" -> to play an audio if it is a recorded audio
#else
Serial1.print("AT+CMEDPLAY=1,C:\\User\\");
// "Command Media PLAY" -> to play an audio if it is a uploaded audio
#endif
Played audio always has noise, from C:\User\.
However if I record the audio during call and save it. Play the recorded audio during next call then there is no noise. ( By defining CALL_RECORDED_AUDIO in above code snippet)
according to the documentation of the sim800 it is necessary to play a sound wav during the call
Note
. mode 2 and 3 are not supported when playing audio file during call.
. The audio file can not be played duirng incoming call or outgoing call.
. Only support WAV, PCM, AMR and MP3 format.
. Only support WAV format with 8K 16bit during call.
page 201/202 of the sim800 guide
personally i did not suck having no sim800
I think the recording of a call must be in .WAV format
let me know if it works

Media Info says wav file is truncated instead of showing the properties

I have written some data to a wav file along with the header. But when i play it using media player or VLC it does not play. When I open the same file using MediaInfo, it says 'IsTruncated: Yes' . what does this truncated mean and how to solve this.
Please help

How do I combine AUDIO group with VIDEO stream and produce a new .ts file using ffmpeg?

Here is the input manifest:
$ curl 'https://example.net/ipadlive/index_new.m3u8?sessionid=81893121496608402793&ipaddress=x.x.x.x&callsign=YYYY&hubid=51&zipcode='
#EXTM3U
#EXT-X-VERSION:4
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group",NAME="eng",DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en",URI="https://example.net/ipadlive/06_new.m3u8?cdnHost=da148.cdn.iptv.example.net&sessionid=81893121496608402793&ipaddress=x.x.x.x&callsign=CHAN&hubid=51&zipcode=&countycode=null&fta=null&optimumid=null&devicename=&devicetype=0&osver=&res=&fps="
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group",NAME="spa",DEFAULT=NO,AUTOSELECT=YES,LANGUAGE="en",URI="https://example.net/ipadlive/07_new.m3u8?cdnHost=da148.cdn.iptv.example.net&sessionid=81893121496608402793&ipaddress=x.x.x.x&callsign=CHAN&hubid=51&zipcode=&countycode=null&fta=null&optimumid=null&devicename=&devicetype=0&osver=&res=&fps="
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=479776,RESOLUTION=240x180,CODECS="avc1.42c00c,mp4a.40.2",AUDIO="group"
https://example.net/ipadlive/01_new.m3u8?cdnHost=da148.cdn.iptv.example.net&sessionid=81893121496608402793&ipaddress=x.x.x.x&callsign=CHAN&hubid=51&zipcode=&countycode=null&fta=null&optimumid=null&devicename=&devicetype=0&osver=&res=&fps=
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=780576,RESOLUTION=320x240,CODECS="avc1.42c00d,mp4a.40.2",AUDIO="group"
https://example.net/ipadlive/02_new.m3u8?cdnHost=da148.cdn.iptv.example.net&sessionid=81893121496608402793&ipaddress=x.x.x.x&callsign=CHAN&hubid=51&zipcode=&countycode=null&fta=null&optimumid=null&devicename=&devicetype=0&osver=&res=&fps=
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1079872,RESOLUTION=480x360,CODECS="avc1.42c01e,mp4a.40.2",AUDIO="group"
https://example.net/ipadlive/03_new.m3u8?cdnHost=da148.cdn.iptv.example.net&sessionid=81893121496608402793&ipaddress=x.x.x.x&callsign=CHAN&hubid=51&zipcode=&countycode=null&fta=null&optimumid=null&devicename=&devicetype=0&osver=&res=&fps=
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1682976,RESOLUTION=640x480,CODECS="avc1.42c01e,mp4a.40.2",AUDIO="group"
https://example.net/ipadlive/04_new.m3u8?cdnHost=da148.cdn.iptv.example.net&sessionid=81893121496608402793&ipaddress=x.x.x.x&callsign=CHAN&hubid=51&zipcode=&countycode=null&fta=null&optimumid=null&devicename=&devicetype=0&osver=&res=&fps=
I've never seen this before where the audio stream is a separate url than a video stream listed in the manifest.
Is there a way I can combine an audio stream and a specific video stream to produce a new stream that has both audio and video in it?
I was doing something like this:
ffmpeg -i <manifest> -c copy test.m3u8 and I don't get any audio.
I've tried changing <manifest> to an individual video stream, but then no audio. If I change it to an AUDIO stream I get no video.
I recently had the problem of combining an audio .ts file with its accompanying video .ts file. I was able to solve it using the following method for Windows users. [see - Video resource ]
1) You will need to download the ffmpeg library that will allow Windows to combine both files together. In my case I was running Windows 8 (32 bit OS) and chose a static build:
2) I then opened notepad and wrote the following code once ffmpeg was installed:
ffmpeg -i VIDEO.ts -i AUDIO.ts -c:v copy -c:a copy OUTPUT.mp4
I saved the notepad file as "joiner.bat"
NB: this bat file must present in the same folder as your separate audio and video ts files in order to combine them!!!
3) Once the bat file is in the same folder as your audio and video ts files you can double click on the joiner.bat file to combine the audio and video ts files into a single mp4 (OUTPUT.mp4) file.
I hope this helps the more novice types among us. Yes I'm still a n00b after many years - don't worry! ;)

wx.Sound : wav file unsupported

I'm doing a game with wx.python and when I try to add a background music using wx.Sound I got the following error:
Python error:
Sound file 'images/game.wav' is in unsupported format.
This is the code I use. I've seen this code many times on the web but none had
the same problem:
sound = wx.Sound("images/game.wav")
sound.Play(wx.SOUND_ASYNC)
Sounds like you need to save the WAV file in a different format. WAV files are not all created equal.
http://en.wikipedia.org/wiki/WAV#WAV_file_compression_codecs_compared
Why not use wx.media or maybe the mplayer widget? I have a tutorial on each of these:
http://www.blog.pythonlibrary.org/2010/07/24/wxpython-creating-a-simple-media-player/
http://www.blog.pythonlibrary.org/2010/04/20/wxpython-creating-a-simple-mp3-player/

Resources