
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (15)
-
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (4903)
-
ffmpeg c# Windows forms
7 février 2017, par TODOI’m fairly new to windows forms and ffmpeg (unity background).
I’m trying to get a button click on a windows form to take a png sequence, and convert it to an mp4 with ffmpeg.
Process ffmpeg = new Process();
ffmpeg.StartInfo.FileName = Path.Combine(Environment.CurrentDirectory, @"c:\test\ffmpeg.exe");
ffmpeg.StartInfo.Arguments = "-framerate 25 -i 0001_IMG%03d.JPG -c:v libx264 -preset ultrafast -crf 0 -vf scale=-2:1080 -pix_fmt yuv420p temp.mp4";
ffmpeg.Start();I have no problem running the same ffmpeg command from cmd, or from within a c++ console application I experimented with Using system("")
I’ve been stuck on this for a little longer than I care to admit, and have tried searching for answers, but am still learning as i go.
Any help would be much appreciated.
-
Can't replicate FFMpeg Prores quality setting
3 février 2017, par Ben LUsing ffmpeg as a library. I’m looking to create a global-quality slider with very inconsistent results.
AvCodecContext::global_quality
seems like a good place to start. Not all lossy codecs make reference to this member, but it does appear to work for ProRes.c:\>ffmpeg.exe -i test.mov -c:v prores_ks -q:v 28 out.mov # output 10mb file
c:\>ffmpeg.exe -i test.mov -c:v prores_ks -q:v 2 out.mov # output 28mb fileGreat. Now let’s do it in code. Based on Muxing.c. I’m distilling down the code a lot just to give a hint about which api’s I’m calling.
AVStream* AddStream(AVFormatContext* formatContext, int quality)
{
AVCodec* codec = AVFindEncoder("prores_ks");
AVStream* newStream = avformat_new_stream(formatContext, codec);
newStream->id = formatContext->nb_streams - 1;
AVCodecContext c = avcodec_alloc_context3(codec);
c->codec_id = AV_CODEC_ID_PRORES;
c->codec_type = AVMEDIA_TYPE_VIDEO;
c->width = 1920;
c->height = 1080;
newStream->time_base = av_inv_q(frameRate);
c->time_base = av_inv_q(frameRate);
c->pix_fmt = AV_PIX_FMT_YUVA444P10;
c->global_quality = quality;
return newStream;
}
......
//excerpt from WriteFrame()
AVPacket pkt;
av_init_packet(&pkt);
pkt.data= pVideoBuffer;
pkt.size= iVideoBufferSize;
int gotpkt = 0;
int ret = avcodec_encode_video2(pCodecContext, &pkt, pPicture, &gotpkt);
if (ret == 0)
{
av_packet_rescale_ts(&pkt, pCodecContext->time_base, pVideoStream->time_base);
if (gotpkt) {
ret = av_interleaved_write_frame(pFormatContext, &pkt);
}
}I can’t get quality to affect the size of the output. Any ideas ?
This is the excerpt from proresenc_kostya.c
ctx->force_quant = avctx->global_quality / FF_QP2LAMBDA;
if (!ctx->force_quant) {
if (!ctx->bits_per_mb) {
for (i = 0; i < NUM_MB_LIMITS - 1; i++)
if (prores_mb_limits[i] >= ctx->mb_width * ctx->mb_height *
ctx->pictures_per_frame)
break;
ctx->bits_per_mb = ctx->profile_info->br_tab[i];
} else if (ctx->bits_per_mb < 128) {
av_log(avctx, AV_LOG_ERROR, "too few bits per MB, please set at least 128\n");
return AVERROR_INVALIDDATA;
}
min_quant = ctx->profile_info->min_quant;
max_quant = ctx->profile_info->max_quant;
for (i = min_quant; i < MAX_STORED_Q; i++) {
for (j = 0; j < 64; j++)
ctx->quants[i][j] = ctx->quant_mat[j] * i;
}
ctx->slice_q = av_malloc(ctx->slices_per_picture * sizeof(*ctx->slice_q));
if (!ctx->slice_q) {
encode_close(avctx);
return AVERROR(ENOMEM);
}
ctx->tdata = av_mallocz(avctx->thread_count * sizeof(*ctx->tdata));
if (!ctx->tdata) {
encode_close(avctx);
return AVERROR(ENOMEM);
}
for (j = 0; j < avctx->thread_count; j++) {
ctx->tdata[j].nodes = av_malloc((ctx->slices_width + 1)
* TRELLIS_WIDTH
* sizeof(*ctx->tdata->nodes));
if (!ctx->tdata[j].nodes) {
encode_close(avctx);
return AVERROR(ENOMEM);
}
for (i = min_quant; i < max_quant + 2; i++) {
ctx->tdata[j].nodes[i].prev_node = -1;
ctx->tdata[j].nodes[i].bits = 0;
ctx->tdata[j].nodes[i].score = 0;
}
}
}Edit :
Outputs from ffmpeg.exe :
profile 4, 1020 slices, interlacing: no, 6576 bits per MB
frame size upper bound: 11429274Output from ffmpeg avlog on my app :
profile 4, 1020 slices, interlacing: no, 1425 bits per MB
frame size upper bound: 6170103 -
ffmpeg H264 Encode Frame at a time for network streaming
4 février 2017, par Richard HarrowI’m working on a remote desktop application, I would like to send an encoded H264 packet over TCP by using ffmpeg for the encoding. However I couldn’t find useful info for the particular case of encoding just one frame (already on YUV444) and get the packet.
I have several issues, the first was that :
avcodec_encode_video2
Was not blocking, I found that most of the time you get the "delayed" frames at the end, however, since this is a real time streaming the solution was :
av_opt_set(mCodecContext->priv_data, "tune", "zerolatency", 0);
Now I got the frame, but several issues, it takes a while and even worse I got a gray with trash pixels video as result. My configuration for the Codec Context :
m_pCodecCtx->bit_rate=8000000;
m_pCodecCtx->codec_id=AV_CODEC_ID_H264;
m_pCodecCtx->codec_type = AVMEDIA_TYPE_VIDEO;
m_pCodecCtx->width=1920;
m_pCodecCtx->height=1080;
m_pCodecCtx->pix_fmt=AV_PIX_FMT_YUV444P;
m_pCodecCtx->time_base.num = 1;
m_pCodecCtx->time_base.den = 25;
m_pCodecCtx->gop_size = 1;
m_pCodecCtx->keyint_min = 1;
m_pCodecCtx->i_quant_factor = float(0.71);
m_pCodecCtx->b_frame_strategy = 20;
m_pCodecCtx->qcompress = (float)0.6;
m_pCodecCtx->qmax = 51;
m_pCodecCtx->qmin = 20;
m_pCodecCtx->max_qdiff = 4;
m_pCodecCtx->refs = 4;
m_pCodecCtx->max_b_frames = 1;
m_pCodecCtx->thread_count = 1;I would like to know how this could be done, how do I set the "I Frames" ? and, that would be the optimal for a "one at a time" encoding ? Also I’m not concerned right now with the quality, just need to be fast enough (under 16 ms).
For the encoding part :
nres = avcodec_encode_video2(m_pCodecCtx,&packet,m_pFrame,&framefinished);
if(nres<0){
qDebug() << "error encoding: " << nres << endl;
}
if(framefinished){
m_pFrame->pts++;
ofstream vidout("video.h264",ios::app);
if(vidout.good()){
vidout.write((const char*)&packet.data[0],packet.size);
}
vidout.close();
av_packet_unref(&packet);
}I’m not using a container, just a raw file, ffplay reproduce raw files if the packets are right, and that’s my principal issue. I’m planning to send the packet over tcp and decode on the client. Any help would be greatly appreciated.