
Recherche avancée
Autres articles (60)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)
Sur d’autres sites (4643)
-
Fragmented MP4 - problem playing in browser
12 juin 2019, par PookyFanI try to create fragmented MP4 from raw H264 video data so I could play it in internet browser’s player. My goal is to create live streaming system, where media server would send fragmented MP4 pieces to browser. The server would buffer input data from RaspberryPi camera, which sends video as H264 frames. It would then mux that video data and make it available for client. The browser would play media data (that were muxed by server and sent i.e. through websocket) by using Media Source Extensions.
For test purpose I wrote the following pieces of code (using many examples I found in the intenet) :
C++ application using avcodec which muxes raw H264 video to fragmented MP4 and saves it to a file :
#define READBUFSIZE 4096
#define IOBUFSIZE 4096
#define ERRMSGSIZE 128
#include <cstdint>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
extern "C"
{
#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>error.h>
#include <libavutil></libavutil>opt.h>
}
enum NalType : uint8_t
{
//NALs containing stream metadata
SEQ_PARAM_SET = 0x7,
PIC_PARAM_SET = 0x8
};
std::vector outputData;
int mediaMuxCallback(void *opaque, uint8_t *buf, int bufSize)
{
outputData.insert(outputData.end(), buf, buf + bufSize);
return bufSize;
}
std::string getAvErrorString(int errNr)
{
char errMsg[ERRMSGSIZE];
av_strerror(errNr, errMsg, ERRMSGSIZE);
return std::string(errMsg);
}
int main(int argc, char **argv)
{
if(argc < 2)
{
std::cout << "Missing file name" << std::endl;
return 1;
}
std::fstream file(argv[1], std::ios::in | std::ios::binary);
if(!file.is_open())
{
std::cout << "Couldn't open file " << argv[1] << std::endl;
return 2;
}
std::vector inputMediaData;
do
{
char buf[READBUFSIZE];
file.read(buf, READBUFSIZE);
int size = file.gcount();
if(size > 0)
inputMediaData.insert(inputMediaData.end(), buf, buf + size);
} while(!file.eof());
file.close();
//Initialize avcodec
av_register_all();
uint8_t *ioBuffer;
AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_H264);
AVCodecContext *codecCtxt = avcodec_alloc_context3(codec);
AVCodecParserContext *parserCtxt = av_parser_init(AV_CODEC_ID_H264);
AVOutputFormat *outputFormat = av_guess_format("mp4", nullptr, nullptr);
AVFormatContext *formatCtxt;
AVIOContext *ioCtxt;
AVStream *videoStream;
int res = avformat_alloc_output_context2(&formatCtxt, outputFormat, nullptr, nullptr);
if(res < 0)
{
std::cout << "Couldn't initialize format context; the error was: " << getAvErrorString(res) << std::endl;
return 3;
}
if((videoStream = avformat_new_stream( formatCtxt, avcodec_find_encoder(formatCtxt->oformat->video_codec) )) == nullptr)
{
std::cout << "Couldn't initialize video stream" << std::endl;
return 4;
}
else if(!codec)
{
std::cout << "Couldn't initialize codec" << std::endl;
return 5;
}
else if(codecCtxt == nullptr)
{
std::cout << "Couldn't initialize codec context" << std::endl;
return 6;
}
else if(parserCtxt == nullptr)
{
std::cout << "Couldn't initialize parser context" << std::endl;
return 7;
}
else if((ioBuffer = (uint8_t*)av_malloc(IOBUFSIZE)) == nullptr)
{
std::cout << "Couldn't allocate I/O buffer" << std::endl;
return 8;
}
else if((ioCtxt = avio_alloc_context(ioBuffer, IOBUFSIZE, 1, nullptr, nullptr, mediaMuxCallback, nullptr)) == nullptr)
{
std::cout << "Couldn't initialize I/O context" << std::endl;
return 9;
}
//Set video stream data
videoStream->id = formatCtxt->nb_streams - 1;
videoStream->codec->width = 1280;
videoStream->codec->height = 720;
videoStream->time_base.den = 60; //FPS
videoStream->time_base.num = 1;
videoStream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
formatCtxt->pb = ioCtxt;
//Retrieve SPS and PPS for codec extdata
const uint32_t synchMarker = 0x01000000;
unsigned int i = 0;
int spsStart = -1, ppsStart = -1;
uint16_t spsSize = 0, ppsSize = 0;
while(spsSize == 0 || ppsSize == 0)
{
uint32_t *curr = (uint32_t*)(inputMediaData.data() + i);
if(*curr == synchMarker)
{
unsigned int currentNalStart = i;
i += sizeof(uint32_t);
uint8_t nalType = inputMediaData.data()[i] & 0x1F;
if(nalType == SEQ_PARAM_SET)
spsStart = currentNalStart;
else if(nalType == PIC_PARAM_SET)
ppsStart = currentNalStart;
if(spsStart >= 0 && spsSize == 0 && spsStart != i)
spsSize = currentNalStart - spsStart;
else if(ppsStart >= 0 && ppsSize == 0 && ppsStart != i)
ppsSize = currentNalStart - ppsStart;
}
++i;
}
videoStream->codec->extradata = inputMediaData.data() + spsStart;
videoStream->codec->extradata_size = ppsStart + ppsSize;
//Write main header
AVDictionary *options = nullptr;
av_dict_set(&options, "movflags", "frag_custom+empty_moov", 0);
res = avformat_write_header(formatCtxt, &options);
if(res < 0)
{
std::cout << "Couldn't write container main header; the error was: " << getAvErrorString(res) << std::endl;
return 10;
}
//Retrieve frames from input video and wrap them in container
int currentInputIndex = 0;
int framesInSecond = 0;
while(currentInputIndex < inputMediaData.size())
{
uint8_t *frameBuffer;
int frameSize;
res = av_parser_parse2(parserCtxt, codecCtxt, &frameBuffer, &frameSize, inputMediaData.data() + currentInputIndex,
inputMediaData.size() - currentInputIndex, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0);
if(frameSize == 0) //No more frames while some data still remains (is that even possible?)
{
std::cout << "Some data left unparsed: " << std::to_string(inputMediaData.size() - currentInputIndex) << std::endl;
break;
}
//Prepare packet with video frame to be dumped into container
AVPacket packet;
av_init_packet(&packet);
packet.data = frameBuffer;
packet.size = frameSize;
packet.stream_index = videoStream->index;
currentInputIndex += frameSize;
//Write packet to the video stream
res = av_write_frame(formatCtxt, &packet);
if(res < 0)
{
std::cout << "Couldn't write packet with video frame; the error was: " << getAvErrorString(res) << std::endl;
return 11;
}
if(++framesInSecond == 60) //We want 1 segment per second
{
framesInSecond = 0;
res = av_write_frame(formatCtxt, nullptr); //Flush segment
}
}
res = av_write_frame(formatCtxt, nullptr); //Flush if something has been left
//Write media data in container to file
file.open("my_mp4.mp4", std::ios::out | std::ios::binary);
if(!file.is_open())
{
std::cout << "Couldn't open output file " << std::endl;
return 12;
}
file.write((char*)outputData.data(), outputData.size());
if(file.fail())
{
std::cout << "Couldn't write to file" << std::endl;
return 13;
}
std::cout << "Media file muxed successfully" << std::endl;
return 0;
}
</vector></string></fstream></iostream></cstdint>(I hardcoded a few values, such as video dimensions or framerate, but as I said this is just a test code.)
Simple HTML webpage using MSE to play my fragmented MP4
<video width="1280" height="720" controls="controls">
</video>
<code class="echappe-js"><script><br />
var vidElement = document.querySelector('video');<br />
<br />
if (window.MediaSource) {<br />
var mediaSource = new MediaSource();<br />
vidElement.src = URL.createObjectURL(mediaSource);<br />
mediaSource.addEventListener('sourceopen', sourceOpen);<br />
} else {<br />
console.log("The Media Source Extensions API is not supported.")<br />
}<br />
<br />
function sourceOpen(e) {<br />
URL.revokeObjectURL(vidElement.src);<br />
var mime = 'video/mp4; codecs="avc1.640028"';<br />
var mediaSource = e.target;<br />
var sourceBuffer = mediaSource.addSourceBuffer(mime);<br />
var videoUrl = 'my_mp4.mp4';<br />
fetch(videoUrl)<br />
.then(function(response) {<br />
return response.arrayBuffer();<br />
})<br />
.then(function(arrayBuffer) {<br />
sourceBuffer.addEventListener('updateend', function(e) {<br />
if (!sourceBuffer.updating &amp;&amp; mediaSource.readyState === 'open') {<br />
mediaSource.endOfStream();<br />
}<br />
});<br />
sourceBuffer.appendBuffer(arrayBuffer);<br />
});<br />
}<br />
</script>
Output MP4 file generated by my C++ application can be played i.e. in MPC, but it doesn’t play in any web browser I tested it with. It also doesn’t have any duration (MPC keeps showing 00:00).
To compare output MP4 file I got from my C++ application described above, I also used FFMPEG to create fragmented MP4 file from the same source file with raw H264 stream. I used the following command :
ffmpeg -r 60 -i input.h264 -c:v copy -f mp4 -movflags empty_moov+default_base_moof+frag_keyframe test.mp4
This file generated by FFMPEG is played correctly by every web browser I used for tests. It also has correct duration (but also it has trailing atom, which wouldn’t be present in my live stream anyway, and as I need a live stream, it won’t have any fixed duration in the first place).
MP4 atoms for both files look very similiar (they have identical avcc section for sure). What’s interesting (but not sure if it’s of any importance), both files have different NALs format than input file (RPI camera produces video stream in Annex-B format, while output MP4 files contain NALs in AVCC format... or at least it looks like it’s the case when I compare mdat atoms with input H264 data).
I assume there is some field (or a few fields) I need to set for avcodec to make it produce video stream that would be properly decoded and played by browsers players. But what field(s) do I need to set ? Or maybe problem lies somewhere else ? I ran out of ideas.
EDIT 1 :
As suggested, I investigated binary content of both MP4 files (generated by my app and FFMPEG tool) with hex editor. What I can confirm :- both files have identical avcc section (they match perfectly and are in AVCC format, I analyzed it byte after byte and there’s no mistake about it)
- both files have NALs in AVCC format (I looked closely at mdat atoms and they don’t differ between both MP4 files)
So I guess there’s nothing wrong with the extradata creation in my code - avcodec takes care of it properly, even if I just feed it with SPS and PPS NALs. It converts them by itself, so no need for me to do it by hand. Still, my original problem remains.
EDIT 2 : I achieved partial success - MP4 generated by my app now plays in Firefox. I added this line to the code (along with rest of stream initialization) :
videoStream->codec->time_base = videoStream->time_base;
So now this section of my code looks like this :
//Set video stream data
videoStream->id = formatCtxt->nb_streams - 1;
videoStream->codec->width = 1280;
videoStream->codec->height = 720;
videoStream->time_base.den = 60; //FPS
videoStream->time_base.num = 1;
videoStream->codec->time_base = videoStream->time_base;
videoStream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
formatCtxt->pb = ioCtxt; -
HLS Event Stream from Azure Blob Storage
23 janvier 2019, par nemesis_567Alright, so I encode videos of around 30 seconds with ffmpeg, the following flags :
ffmpeg.exe -i \"{filename}\" -f hls -hls_segment_type fmp4 -hls_flags single_file -hls_time 5 -g 1 \"{outname}.m3u8\"
This generates a single playlist with an m4s and m3u8 file :
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="1e02982a-c455-40f5-8229-1033a640c91c-0.mp4.m4s",BYTERANGE="818@0"
#EXTINF:4.781911,
#EXT-X-BYTERANGE:1398720@5953584
1e02982a-c455-40f5-8229-1033a640c91c-0.mp4.m4s
#EXTINF:5.063200,
#EXT-X-BYTERANGE:1490276@7352304
1e02982a-c455-40f5-8229-1033a640c91c-0.mp4.m4s
#EXTINF:5.063200,
#EXT-X-BYTERANGE:1484824@8842580
1e02982a-c455-40f5-8229-1033a640c91c-0.mp4.m4s
#EXTINF:5.063200,
#EXT-X-BYTERANGE:1468656@10327404
1e02982a-c455-40f5-8229-1033a640c91c-0.mp4.m4s
#EXTINF:1.969022,
#EXT-X-BYTERANGE:576408@11796060
1e02982a-c455-40f5-8229-1033a640c91c-0.mp4.m4s
#EXT-X-ENDLISTI take this playlist and append several others that are just the same as they come adding a DIscontinuity tag and between each of them and removing unneeded tags. While doing this I replace the filenames with a working SAS URL for the actual files.
Which results in files of the following type :
#EXTM3U
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/1-frag.m4s?sv=2018-03-28&sr=b&sig=el%2F529BGb4Xjeetiv9kxaHAxGYC%2BwogSYgvCivq1tlc%3D&st=2019-01-10T05%3A09%3A13Z&se=2021-01-10T05%3A14%3A13Z&sp=rw",BYTERANGE="818@0"
#EXTINF:4.654771,
#EXT-X-BYTERANGE:1474761@4854677
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/1-frag.m4s?sv=2018-03-28&sr=b&sig=el%2F529BGb4Xjeetiv9kxaHAxGYC%2BwogSYgvCivq1tlc%3D&st=2019-01-10T05%3A09%3A13Z&se=2021-01-10T05%3A14%3A13Z&sp=rw
#EXTINF:5.430566,
#EXT-X-BYTERANGE:1716825@6329438
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/1-frag.m4s?sv=2018-03-28&sr=b&sig=el%2F529BGb4Xjeetiv9kxaHAxGYC%2BwogSYgvCivq1tlc%3D&st=2019-01-10T05%3A09%3A13Z&se=2021-01-10T05%3A14%3A13Z&sp=rw
#EXTINF:4.654771,
#EXT-X-BYTERANGE:1479725@8046263
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/1-frag.m4s?sv=2018-03-28&sr=b&sig=el%2F529BGb4Xjeetiv9kxaHAxGYC%2BwogSYgvCivq1tlc%3D&st=2019-01-10T05%3A09%3A13Z&se=2021-01-10T05%3A14%3A13Z&sp=rw
#EXTINF:5.430566,
#EXT-X-BYTERANGE:1710125@9525988
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/1-frag.m4s?sv=2018-03-28&sr=b&sig=el%2F529BGb4Xjeetiv9kxaHAxGYC%2BwogSYgvCivq1tlc%3D&st=2019-01-10T05%3A09%3A13Z&se=2021-01-10T05%3A14%3A13Z&sp=rw
#EXTINF:3.103181,
#EXT-X-BYTERANGE:200@11236113
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/1-frag.m4s?sv=2018-03-28&sr=b&sig=el%2F529BGb4Xjeetiv9kxaHAxGYC%2BwogSYgvCivq1tlc%3D&st=2019-01-10T05%3A09%3A13Z&se=2021-01-10T05%3A14%3A13Z&sp=rw
#EXT-X-DISCONTINUITY
#EXT-X-MAP:URI="https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/2-frag.m4s?sv=2018-03-28&sr=b&sig=s3s3R1sjE6lZRgfmaYdOkOGCr7BYkOrygBy%2F90crwvM%3D&st=2019-01-10T05%3A09%3A53Z&se=2021-01-10T05%3A14%3A53Z&sp=rw",BYTERANGE="819@0"
#EXTINF:4.897959,
#EXT-X-BYTERANGE:1506220@6184008
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/2-frag.m4s?sv=2018-03-28&sr=b&sig=s3s3R1sjE6lZRgfmaYdOkOGCr7BYkOrygBy%2F90crwvM%3D&st=2019-01-10T05%3A09%3A53Z&se=2021-01-10T05%3A14%3A53Z&sp=rw
#EXTINF:4.897959,
#EXT-X-BYTERANGE:1496289@7690228
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/2-frag.m4s?sv=2018-03-28&sr=b&sig=s3s3R1sjE6lZRgfmaYdOkOGCr7BYkOrygBy%2F90crwvM%3D&st=2019-01-10T05%3A09%3A53Z&se=2021-01-10T05%3A14%3A53Z&sp=rw
#EXTINF:4.897959,
#EXT-X-BYTERANGE:1516854@9186517
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/2-frag.m4s?sv=2018-03-28&sr=b&sig=s3s3R1sjE6lZRgfmaYdOkOGCr7BYkOrygBy%2F90crwvM%3D&st=2019-01-10T05%3A09%3A53Z&se=2021-01-10T05%3A14%3A53Z&sp=rw
#EXTINF:4.897959,
#EXT-X-BYTERANGE:1492617@10703371
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/2-frag.m4s?sv=2018-03-28&sr=b&sig=s3s3R1sjE6lZRgfmaYdOkOGCr7BYkOrygBy%2F90crwvM%3D&st=2019-01-10T05%3A09%3A53Z&se=2021-01-10T05%3A14%3A53Z&sp=rw
#EXTINF:0.816327,
#EXT-X-BYTERANGE:219@12195988
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/2-frag.m4s?sv=2018-03-28&sr=b&sig=s3s3R1sjE6lZRgfmaYdOkOGCr7BYkOrygBy%2F90crwvM%3D&st=2019-01-10T05%3A09%3A53Z&se=2021-01-10T05%3A14%3A53Z&sp=rw
#EXT-X-DISCONTINUITY
#EXT-X-MAP:URI="https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/3-frag.m4s?sv=2018-03-28&sr=b&sig=O%2B%2FQBnVcyIzn2r3T8S7xq2dic9LKW3q7p2bGSYen%2BbI%3D&st=2019-01-10T05%3A10%3A43Z&se=2021-01-10T05%3A15%3A43Z&sp=rw",BYTERANGE="820@0"
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1352781@6631869
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/3-frag.m4s?sv=2018-03-28&sr=b&sig=O%2B%2FQBnVcyIzn2r3T8S7xq2dic9LKW3q7p2bGSYen%2BbI%3D&st=2019-01-10T05%3A10%3A43Z&se=2021-01-10T05%3A15%3A43Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1357320@7984650
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/3-frag.m4s?sv=2018-03-28&sr=b&sig=O%2B%2FQBnVcyIzn2r3T8S7xq2dic9LKW3q7p2bGSYen%2BbI%3D&st=2019-01-10T05%3A10%3A43Z&se=2021-01-10T05%3A15%3A43Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1360645@9341970
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/3-frag.m4s?sv=2018-03-28&sr=b&sig=O%2B%2FQBnVcyIzn2r3T8S7xq2dic9LKW3q7p2bGSYen%2BbI%3D&st=2019-01-10T05%3A10%3A43Z&se=2021-01-10T05%3A15%3A43Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1334946@10702615
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/3-frag.m4s?sv=2018-03-28&sr=b&sig=O%2B%2FQBnVcyIzn2r3T8S7xq2dic9LKW3q7p2bGSYen%2BbI%3D&st=2019-01-10T05%3A10%3A43Z&se=2021-01-10T05%3A15%3A43Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:238@12037561
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/3-frag.m4s?sv=2018-03-28&sr=b&sig=O%2B%2FQBnVcyIzn2r3T8S7xq2dic9LKW3q7p2bGSYen%2BbI%3D&st=2019-01-10T05%3A10%3A43Z&se=2021-01-10T05%3A15%3A43Z&sp=rw
#EXT-X-DISCONTINUITY
#EXT-X-MAP:URI="https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=jPsSq8%2FfNzfjUx5bauJs7mkLu8w%2FYFKLaeLRBu8lPzg%3D&st=2019-01-10T05%3A11%3A25Z&se=2021-01-10T05%3A16%3A25Z&sp=rw",BYTERANGE="820@0"
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1359259@6647772
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=jPsSq8%2FfNzfjUx5bauJs7mkLu8w%2FYFKLaeLRBu8lPzg%3D&st=2019-01-10T05%3A11%3A25Z&se=2021-01-10T05%3A16%3A25Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1353269@8007031
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=jPsSq8%2FfNzfjUx5bauJs7mkLu8w%2FYFKLaeLRBu8lPzg%3D&st=2019-01-10T05%3A11%3A25Z&se=2021-01-10T05%3A16%3A25Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1359724@9360300
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=jPsSq8%2FfNzfjUx5bauJs7mkLu8w%2FYFKLaeLRBu8lPzg%3D&st=2019-01-10T05%3A11%3A25Z&se=2021-01-10T05%3A16%3A25Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1339437@10720024
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=jPsSq8%2FfNzfjUx5bauJs7mkLu8w%2FYFKLaeLRBu8lPzg%3D&st=2019-01-10T05%3A11%3A25Z&se=2021-01-10T05%3A16%3A25Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:238@12059461
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=jPsSq8%2FfNzfjUx5bauJs7mkLu8w%2FYFKLaeLRBu8lPzg%3D&st=2019-01-10T05%3A11%3A25Z&se=2021-01-10T05%3A16%3A25Z&sp=rw
#EXT-X-DISCONTINUITY
#EXT-X-MAP:URI="https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=yfgkYvCLFjt384tsDZZ2ahVfPI4XxoCyyWepmux4rvc%3D&st=2019-01-10T05%3A12%3A12Z&se=2021-01-10T05%3A17%3A12Z&sp=rw",BYTERANGE="820@0"
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1371742@6775319
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=yfgkYvCLFjt384tsDZZ2ahVfPI4XxoCyyWepmux4rvc%3D&st=2019-01-10T05%3A12%3A12Z&se=2021-01-10T05%3A17%3A12Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1389742@8147061
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=yfgkYvCLFjt384tsDZZ2ahVfPI4XxoCyyWepmux4rvc%3D&st=2019-01-10T05%3A12%3A12Z&se=2021-01-10T05%3A17%3A12Z&sp=rw
#EXTINF:5.000000,
#EXT-X-BYTERANGE:1377900@9536803
https://vsatstreams.blob.core.windows.net/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/75888d6c-41fb-4cb0-9573-0e2ab7a6dc4c/4-frag.m4s?sv=2018-03-28&sr=b&sig=yfgkYvCLFjt384tsDZZ2ahVfPI4XxoCyyWepmux4rvc%3D&st=2019-01-10T05%3A12%3A12Z&se=2021-01-10T05%3A17%3A12Z&sp=rw
#EXTINF:5.000000,This stream does not play in chrome with video.js, and only plays in bitmovin client, but it constantly fails with buffer append/stalled errors. In firefox it plays, but without much reliability.
So what am I doing wrong in this process ? I’ve checked the specification for HLS several times, can’t see what I’m doing wrong, or what the player expects.
Please check hls.js player, with the following URL which uses the stream above to see what I’m talking about.
HLS.JS Demo Player With My Playlist -
FFmpeg : Changing from "amerge" to "amix" enables playback of video on safari browser but why its not playing with amerge ?
17 janvier 2019, par Prashant_SarinI am using amerge two add two audios. The video plays fine on chrome but its not getting played on safari. But when i change from "amerge" to "amix", then it works on both but slowing down the composition time. Please suggest what’s wrong with it.