
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (44)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 (...)
Sur d’autres sites (7377)
-
Treating a video stream as playback with pausing
21 janvier 2020, par kealistI am working on an application that streams multiple h264 video streams to a video wall. I am using libav/ffmpeg libs to stream multiple video files at once from inside the application. The application will control playback speed, seeking, pausing, resuming, stopping, and the video wall will only be receiving udp streams.
I want to implement streaming such that if the videos are paused, the same frame is sent continually so that it looks as if it is a video window in a paused state.
How can i insert copies of the same h264 frame into the stream so that it does not mess up sending of later frames ?
My code is almost an exact port of
transcoding.c
from ffmpeg.exe. Planning on retaining a copy of the last frame/packet, and when paused to send this. Is this likely to function properly, or should I approach this a different way.while (true)
{
if (paused) {
// USE LAST PACKET
}
else
{
if ((ret = ffmpeg.av_read_frame(ifmt_ctx, &packet)) < 0)
break;
}
stream_index = packet.stream_index;
type = ifmt_ctx->streams[packet.stream_index]->codec->codec_type;
Console.WriteLine("Demuxer gave frame of stream_index " + stream_index);
if (filter_ctx[stream_index].filter_graph != null)
{
Console.WriteLine("Going to reencode&filter the frame\n");
frame = ffmpeg.av_frame_alloc();
if (frame == null)
{
ret = ffmpeg.AVERROR(ffmpeg.ENOMEM);
break;
}
packet.dts = ffmpeg.av_rescale_q_rnd(packet.dts,
ifmt_ctx->streams[stream_index]->time_base,
ifmt_ctx->streams[stream_index]->codec->time_base,
AVRounding.AV_ROUND_NEAR_INF | AVRounding.AV_ROUND_PASS_MINMAX);
packet.pts = ffmpeg.av_rescale_q_rnd(packet.pts,
ifmt_ctx->streams[stream_index]->time_base,
ifmt_ctx->streams[stream_index]->codec->time_base,
AVRounding.AV_ROUND_NEAR_INF | AVRounding.AV_ROUND_PASS_MINMAX);
if (type == AVMediaType.AVMEDIA_TYPE_VIDEO)
{
ret = ffmpeg.avcodec_decode_video2(stream_ctx[packet.stream_index].dec_ctx, frame,
&got_frame, &packet);
}
else
{
ret = ffmpeg.avcodec_decode_audio4(stream_ctx[packet.stream_index].dec_ctx, frame,
&got_frame, &packet);
}
if (ret < 0)
{
ffmpeg.av_frame_free(&frame);
Console.WriteLine("Decoding failed\n");
break;
}
if (got_frame != 0)
{
frame->pts = ffmpeg.av_frame_get_best_effort_timestamp(frame);
ret = filter_encode_write_frame(frame, (uint)stream_index);
// SAVE LAST FRAME/PACKET HERE
ffmpeg.av_frame_free(&frame);
if (ret < 0)
goto end;
}
else
{
ffmpeg.av_frame_free(&frame);
}
}
else
{
/* remux this frame without reencoding */
packet.dts = ffmpeg.av_rescale_q_rnd(packet.dts,
ifmt_ctx->streams[stream_index]->time_base,
ofmt_ctx->streams[stream_index]->time_base,
AVRounding.AV_ROUND_NEAR_INF | AVRounding.AV_ROUND_PASS_MINMAX);
packet.pts = ffmpeg.av_rescale_q_rnd(packet.pts,
ifmt_ctx->streams[stream_index]->time_base,
ofmt_ctx->streams[stream_index]->time_base,
AVRounding.AV_ROUND_NEAR_INF | AVRounding.AV_ROUND_PASS_MINMAX);
ret = ffmpeg.av_interleaved_write_frame(ofmt_ctx, &packet);
if (ret < 0)
goto end;
}
ffmpeg.av_free_packet(&packet);
} -
What is faster, Raw PCM audio files, or mp3 files decoded with FFmpeg ?
8 janvier 2020, par Matthew StromI’m pretty deep into the development of my Android app, and as I mess around with my audio files a second time to try longer audio clips (1000ms long), I am now getting audio glitches again. Before I was not getting any glitches with 160ms long files.
- Background : I’m making a metronome, so imagine roughly 100 lines of code in the callback to constantly figure out what audio file to play and for how long.
Without getting into my code, I was just wondering if file size or file type has any impact on performance ? I believe I’m using the sample
Player
rendering class (source) (for Raw file input) which seems to load the audio data of the file each callback. This would Perhaps loading data from a larger array would slow it down ? Although, It could also be the new features/logic that I’m adding to the callback.I know it is talked about frequently about using mp3’s and decoding with FFmpeg. Has anyone done any bench-marking between mp3 and raw, and is there any performance advantage to using mp3’s, or is it mainly to cut down on your APK size ?
Sorry if this has been discussed somewhere, however, I wasn’t able to find any articles mentioning this aspect between the two file types. Looking more closely at the rendering class, my gut tells me that file size "shouldn’t" be a factor... Otherwise I’ll continue to debug and maybe get some systraces in if I can.
-
Is there a way to apply a curve bend in ffmpeg ?
25 mars 2020, par stevendesuI have four cameras each feeding me a different portion of a basketball court. Due to the slight offset of the cameras physical locations and lens distortion around the edges of the camera, I cannot simply stitch the videos together without some kind of correction.
I’ve looked into ffmpeg’s
perspective
filter, as well as thelenscorrection
filter. In the former case it was only able to create a trapezoid, not the curved image I want. In the latter case using negative values tok1
andk2
seemed to be heading in the right direction, but it either disorted the top and bottom of the image to the point of being nonsensical noise, or it zoomed in to the image so much that I lost important details.For the sample picture below, ultimately I want the midcourt line (the blue vertical line on the right side) to be vertical, and I want the mess of wires on the white desk at the bottom to remain visible and identifiable.
Given a video which looks like the following :
I wish to produce something like the following :
This image was made using the "Curve Bend" filter in GIMP, but I just eye-balled it - so it’s not perfect. Ideally once I get the exact parameters the midcourt line will be perfectly vertical
When using the
lenscorrection
filter, no values fork1
andk2
seemed to get the effect I want :Negative
k1
, negativek2
:Negative
k1
, positivek2
:Positive
k1
, negativek2
:Positive
k1
, positivek2
:In general :
- negative / negative distorted the image beyond recognition
- negative / positive looked alright, but the midcourt line was off the screen and it wasn’t clear if any distortion had been applied
- positive / negative looked the best, but while the top and bottom curved in the middle of the left and right actually bulged out, leaving the midcourt line distorted
- positive / positive was the opposite of the desired effect