
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (107)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (5739)
-
Is it possible to merge two or more videos in real-time like this ?
25 février 2015, par MarkoIs it possible to play video online that’s made of two or more video files ?
Since my original post wasn’t clear enough, here’s expanded explanation and question.
My site is hosted on Linux/Apache/PHP server. I have video files in FLV/F4V format. I can also convert them to other available formats if necessary. All videos have same aspect ratio and other parameters.
What I want is to build (or use if exist) online video player that plays video composed of multiple video files concatenated together in real-time, i.e. when user clicks to see a video.
For example, visitor comes to my site and sees video titled "Welcome" available to play. When he/she clicks to play that video, I take video files "Opening.f4v", "Welcome.f4v" and "Ending.f4v" and join/merge/concatenate them one after another to create one continuous video on the fly.
Resulting video looks like one video, with no visual clues, lags or even smallest observable delay between video parts. Basically what is done is some form of on-the-fly editing or pre-editing, and user sees the result. This resulting video is not saved on the server, it’s just composed and played that way real-time.
Also, if possible, user shouldn’t be made to wait for this merging to be over before he/she sees resulting video, but to be able to get first part of the video playing immediately, while merging is done simultaneously.
Is this possible with flash/actionscript, ffmpeg, html5 or some other online technology ? I don’t need explanation how it’s possible, just a nod that it’s possible and some links to further investigate.
Also, if one option is to use flash, what are alternatives for making this work when site is visited from iphone/ipad ?
-
Anomalie #3894 : Jointures (erronées ?) avec les boucles documents et leurs critères
27 janvier 2017, par marcimat ☺☮☯♫Jointure avec Documents / id_mot¶
Par ailleurs pour les mots la jointure que montre tcharles est correcte justement. Cependant, là il cherche les mots clés présents sur les documents, ce qui contredit ce que je disais en 2012 là http://marcimat.magraine.net/SPIP-3-Documents-Mots :
Ce que SPIP va décider lorsqu’il y a ambiguïté, c’est à dire comme ici
(DOCUMENTS){id_mot}
alors qu’il existe les 2 tables spip_documents_liens et spip_mots_liens, c’est qu’il va préférer interpréter cela comme une liaison sur la table de lien de la boucle en cours, c’est à dire sur spip_documents_liens, ce qui signifie donc que ça va retourner « les documents attachés à un mot clé »Donc, pour ce point, quelque part à un moment donné il y a eu un changement.
Autres test.¶
Je viens de remarquer que le problème survient dès lors qu’il y a plusieurs critères optionnels sur la boucle. De telle sorte les boucles suivantes ont une seule jointure sur spip_documents_liens :
-
-
-(+ 1 jointure sur spip_mots_liens)
C’est dès lors qu’on utilise plusieurs critères optionnels que les problèmes surviennent :
-Si on appelle
page=test&id_breve=1
(1er critère) on aura 1 seule jointure :SELECT documents.fichier FROM spip_documents AS `documents` INNER JOIN spip_documents_liens AS L1 ON ( L1.id_document = documents.id_document ) WHERE (documents.statut = ’publie’) AND (documents.mode IN (’image’,’document’)) AND (documents.taille > 0 OR documents.distant=’oui’) AND (L1.id_objet = 1) AND (L1.objet = ’breve’) AND (L1.vu = ’non’) GROUP BY documents.id_document
Si on appelle
page=test&id_article=1
(2è critère) on aura 2 jointures :SELECT documents.fichier FROM spip_documents AS `documents` INNER JOIN spip_documents_liens AS L2 ON ( L2.id_document = documents.id_document ) INNER JOIN spip_documents_liens AS L1 ON ( L1.id_document = documents.id_document ) WHERE (documents.statut = ’publie’) AND (documents.mode IN (’image’,’document’)) AND (documents.taille > 0 OR documents.distant=’oui’) AND (L2.id_objet = 1) AND (L2.objet = ’article’) AND (L1.vu = ’non’) GROUP BY documents.id_document
Si on appelle
page=test&id_rubrique=1
(3è critère) on aura 2 jointures (le L s’incrémente à L3) :SELECT documents.fichier FROM spip_documents AS `documents` INNER JOIN spip_documents_liens AS L3 ON ( L3.id_document = documents.id_document ) INNER JOIN spip_documents_liens AS L1 ON ( L1.id_document = documents.id_document ) WHERE (documents.statut = ’publie’) AND (documents.mode IN (’image’,’document’)) AND (documents.taille > 0 OR documents.distant=’oui’) AND (L3.id_objet = 1) AND (L3.objet = ’rubrique’) AND (L1.vu = ’non’) GROUP BY documents.id_document
Autrement dit, je pense que SPIP crée une jointure pour la possibilité d’avoir id_breve dans l’URL (L1), pareil pour id_article (L2), etc pour les suivantes.
Le champ "vu" utilise la première jointure possible (toujours L1 du coup ici). Ensuite SPIP nettoie les jointures inutiles en fonction des paramètres d’environnement reçus, mais il ne peut enlever L1 car le champ "vu" l’utilise (alors qu’il faudrait qu’il utilise une autre jointure, L3 par exemple si id_rubrique dans l’env, et enlever L1). -
How add Data Stream into MXF(using mpeg2video) file with FFmpeg and C/C++
26 mars 2019, par Helmuth SchmitzI’m a little bit stuck here trying create a MXF file
with data stream on it. I have several MXF video files that contain
this standard**1 Video Stream:
Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 29.9
16 audio streams
Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
1 Data Stream:
Data: none**This data stream, contain personal data inside video file. I can
open this stream and data is really there. Is all ok. But, when i try
to create a file exactly like this, everytime i call "avformat_write_header"
it returns an error.If i do comment the creation of this data streams the video file is succeffully
created.If i change to "mpegts" with this data stream, the video file is also succeffully
created.But, i can’t use mpets and i need this data stream.
I know that is possible MXF with data stream cause i have this originals files
that have this combination.So, i know that i missing something in my code.
This is the way i create this Data Stream :
void CFFmpegVideoWriter::addDataStream(EOutputStream *ost, AVFormatContext *oc, AVCodec **codec, enum AVCodecID codec_id)
{
AVCodecParameters *par;
ost->stream = avformat_new_stream(oc, NULL);
if (ost->stream == NULL)
{
fprintf(stderr, "OOooohhh man: avformat_new_stream() failed.\n");
return;
}
par = ost->stream->codecpar;
ost->stream->index = 17;
par->codec_id = AV_CODEC_ID_NONE;
par->codec_type = AVMEDIA_TYPE_DATA;
ost->stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}the file openning is this :
CFFMpegVideoWriter::CFFMpegVideoWriter(QString outputfilename) : QThread()
{
av_register_all();
avcodec_register_all();
isOpen = false;
shouldClose = false;
frameIndex = 0;
#ifdef __linux__
QByteArray bFilename = outputfilename.toUtf8();
#else
QByteArray bFilename = outputfilename.toLatin1();
#endif
const char* filename = bFilename.data();
codecContext = NULL;
//encontra o formato desejado...
outputFormat = av_guess_format("mp2v", filename, nullptr);
if (!outputFormat)
{
qDebug("Could not find suitable output format\n");
return;
}
//encontra o codec...
codec = avcodec_find_encoder(outputFormat->video_codec);
if (!codec)
{
qDebug( "Codec not found\n");
return;
}
//aloca o contexto do codec...
codecContext = avcodec_alloc_context3(codec);
codecContext->field_order = AV_FIELD_TT;
codecContext->profile = FF_PROFILE_MPEG2_422;
//aloca o contexto do formato...
formatContext = avformat_alloc_context();
formatContext->oformat = outputFormat;
//aloca o contexto da midia de saida...
avformat_alloc_output_context2(&formatContext, NULL, NULL, filename);
if (!formatContext)
{
qDebug("Erro");
return;
}
videoStream.tmp_frame = NULL;
videoStream.swr_ctx = NULL;
//adiciona a stream de video...
if (outputFormat->video_codec != AV_CODEC_ID_NONE)
{
addVideoStream(&videoStream, formatContext, &video_codec, outputFormat->video_codec);
}
//adiciona as 16 streams de audio...
if (outputFormat->audio_codec != AV_CODEC_ID_NONE)
{
for (int i = 0; i < 16; i++)
{
addAudioStream(&audioStream[i], formatContext, &audio_codec, outputFormat->audio_codec);
}
}
addDataStream(&datastream, formatContext, &video_codec, outputFormat->video_codec);
videoStream.sws_ctx = NULL;
for (int i = 0; i < 16; i++)
{
audioStream[i].sws_ctx = NULL;
}
opt = NULL;
//carreca o codec de video para stream de video...
initVideoCodec(formatContext, video_codec, &videoStream, opt);
//carrega o codec de audio para stream de audio...s
for (int i = 0; i < 16; i++)
{
initAudioCodec(formatContext, audio_codec, &audioStream[i], opt);
}
av_dump_format(formatContext, 0, filename, 1);
//abrea o arquivo de saida..
if (!(outputFormat->flags & AVFMT_NOFILE))
{
ret = avio_open(&formatContext->pb, filename, AVIO_FLAG_WRITE);
if (ret < 0)
{
qDebug("Could not open'%s", filename);
return;
}
}
//escreve o cabecalho do arquivo...
ret = avformat_write_header(formatContext, &opt);
if (ret < 0)
{
qDebug("Error occurred when opening output file");
return;
}
isOpen = true;
QThread::start();
}The code always fails at "avformat_write_header" call.
But if i remove "datastream" or change it to mpegts everything runs fine.
Any ideia of what am i doing wrong here ?
Thanks for reading this.
Helmuth