
Recherche avancée
Autres articles (43)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (6729)
-
cut hls files in to many small ".ts" files or keep one big ".ts" file. which is better ?
5 août 2022, par Evan LeeI need to stream my videos using HLS bytes range HTTP requests.


FFmpeg has an option to keep all the ts file to one single large ".ts" file.


Any pros and cons of split the ts files or keep a big ts file ?


Is a big ts file make the request slower ? because of HDD fseek is slow ?


-
FFmpeg "movflags" > "faststart" causes av_write_trailer() to return -2
30 juin 2016, par williamtroupI’m setting up the format layout for the ideo as follows :
AVOutputFormat* outputFormat = ffmpeg.av_guess_format(null, "output.mp4", null);
AVCodec* videoCodec = ffmpeg.avcodec_find_encoder(outputFormat->video_codec);
AVFormatContext* formatContext = ffmpeg.avformat_alloc_context();
formatContext->oformat = outputFormat;
formatContext->video_codec_id = videoCodec->id;
ffmpeg.avformat_new_stream(formatContext, videoCodec);This is how I am setting up the Codec Context :
AVCodecContext* codecContext = ffmpeg.avcodec_alloc_context3(videoCodec);
codecContext->bit_rate = 400000;
codecContext->width = 1280;
codecContext->height = 720;
codecContext->gop_size = 12;
codecContext->max_b_frames = 1;
codecContext->pix_fmt = videoCodec->pix_fmts[0];
codecContext->codec_id = videoCodec->id;
codecContext->codec_type = videoCodec->type;
codecContext->time_base = new AVRational
{
num = 1,
den = 30
};I’m using the following code to setup the "movflags" > "faststart" option for the header of the video :
AVDictionary* options = null;
int result = ffmpeg.av_dict_set(&options, "movflags", "faststart", 0);
int writeHeaderResult = ffmpeg.avformat_write_header(formatContext, &options);The file is opened and the header is written as follows :
if ((formatContext->oformat->flags & ffmpeg.AVFMT_NOFILE) == 0)
{
int ioOptionResult = ffmpeg.avio_open(&formatContext->pb, "output.mp4", ffmpeg.AVIO_FLAG_WRITE);
}
int writeHeaderResult = ffmpeg.avformat_write_header(formatContext, &options);After this, I write each video frame as follows :
outputFrame->pts = frameIndex;
packet.flags |= ffmpeg.AV_PKT_FLAG_KEY;
packet.pts = frameIndex;
packet.dts = frameIndex;
int encodedFrame = 0;
int encodeVideoResult = ffmpeg.avcodec_encode_video2(codecContext, &packet, outputFrame, &encodedFrame);
if (encodedFrame != 0)
{
packet.pts = ffmpeg.av_rescale_q(packet.pts, codecContext->time_base, m_videoStream->time_base);
packet.dts = ffmpeg.av_rescale_q(packet.dts, codecContext->time_base, m_videoStream->time_base);
packet.stream_index = m_videoStream->index;
if (codecContext->coded_frame->key_frame > 0)
{
packet.flags |= ffmpeg.AV_PKT_FLAG_KEY;
}
int writeFrameResult = ffmpeg.av_interleaved_write_frame(formatContext, &packet);
}After that, I write the trailer :
int writeTrailerResult = ffmpeg.av_write_trailer(formatContext);
However, writeTrailerResult is always -2. I’m been looking into this problem for days and cannot figure out what the problem is.
The DLLs used for the AutoGen library are :
avcodec-56.dll
avdevice-56.dll
avfilter-5.dll
avformat-56.dll
avutil-54.dll
postproc-53.dll
swresample-1.dll
swscale-3.dll -
Android : mp4 file plays when downloaded but when choosing "Video" player gets "Cannot play video"
11 juillet 2019, par gviewI’ve converted the video to an mp4 with ffmpeg using the h264 codec and AAC, and used the baseline profile.
Videos are 540x360x250kbps
I then ran qt-faststart on the file to move the atoms into the right order.
I’ve stuck the file up on a wiki we use and created a link to it.
My test phone is a Samsung Galaxy S3.
When I browse to the page that has links to the mp4’s on it, and I click on them, I get a popup window with 2 options : Internet and Video.
If I download the videos using the "Internet" option, I can play them on the phone without issue.
I’ve done other encodings with the main profile as well, and these also play fine. I thought that a powerful phone like the s3 would be able to handle the more advanced compression schemes available in h264, however I’ve also browsed the Android docs in regards to supported video formats, and it seems to state that only the "baseline" compression profile is supported.
Regardless, what doesn’t work is trying to use the "Video" option which I assume tries to stream the video.
For the wiki in question, clicking on the link reveals that the content-type and content-length headers are being set :
Content-Length 6175996
Content-Type video/mp4;charset=UTF-8Clicking on the link with a browser invokes a player (Quicktime in most cases) that can play the mp4’s.
Is there more to having the file HTTP streamable beyond making a link to it ? Why won’t my Android 4 play these files ?
UPDATE :
I decided to make a quick HTML5 page using the video tag, and the videos do play on both my Galaxy S3 and the latest IOS.