
Recherche avancée
Autres articles (36)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (2971)
-
Marketing Touchpoints : Examples, KPIs, and Best Practices
11 mars 2024, par Erin -
YUV422 to TIFF and PNG conversion giving different values
30 novembre 2019, par GarryI’ve been doing some work with images captured from a CMOS image sensor and saved to YUV422. I’ve converted them to TIFF and PNG formats using both ImageMagick and FFMPEG and done some analysis of the images and noticed that the RGB values differ between the two image formats. I’m a little confused as to why as they’re both lossless formats and the images are in the sRGB colourspace (verified with ImageMagick ’identify’ command).
Do they not use the same YCbCr->sRGB conversion algorithm ? Am I missing something about the conversion process ?I used the following commands to convert the images :
ffmpeg -pix_fmt uyvy422 -s 972x972 -i input.yuv output.png
ffmpeg -pix_fmt uyvy422 -s 972x972 -i input.yuv output.tiff
magick -size "972x972" pal:input.yuv output.png
magick -size "972x972" pal:input.yuv output.tiff -
Using FFMPEG to make HLS clips from H264
21 novembre 2017, par Tyler BrooksI am using a Hi35xx camera processor from HiSilicon. It is an Arm9 with a video pipeline bolted on the side. At one end of the pipeline is the CMOS sensor. At the other end is a H264 encoder. When I turn on the pipeline, the encoder outputs H264 NAL packets like this :
frame0: <sps>,<pps>,<sei>,<key frame="frame">
frame1: <delta frame="frame">
frame2: <delta frame="frame">
...
frameN: <delta frame="frame">
frameN+1: <sps>,<pps>,<sei><key frame="frame">
frameN+2: <delta frame="frame">
frameN+3: <delta frame="frame">
...
etc.
</delta></delta></key></sei></pps></sps></delta></delta></delta></key></sei></pps></sps>I am turning that into HLS clips by doing the following (pseudo code for clarity) :
av_register_all();
avformat_network_init();
avformat_alloc_output_context2(&ctx_out, NULL, "hls", "./foo.m3u8");
strm_out = avformat_new_stream(ctx_out, NULL);
codec_out = strm_out->codecpar;
codec_out->codec_id = AV_CODEC_ID_H264;
codec_out->codec_type = AVMEDIA_TYPE_VIDEO;
codec_out->width = encoder_width;
codec_out->height = encoder_height;
codec_out->bit_rate = encoder_bitrate;
codec_out->codec_tag = 0;
avformat_write_header(ctx_out, NULL);
while(get_packet_from_pipeline_encoder(&encoder_packet)) {
AVPacket pkt;
av_init_packet(&pkt);
pkt.stream_index = 0;
pkt.dts = AV_NOPTS_VALUE;
pkt.pts = AV_NOPTS_VALUE;
pkt.duration = (1000000/FRAMERATE); // frame rate in microseconds
pkt.data = encoder_packet.data;
pkt.size = encoder_packet.size;
if (is_keyframe(&encoder_packet)) {
pkt.flags |= AV_PKT_FLAG_KEY;
}
av_write_frame(ctx_out, &pkt);
}
av_write_trailer(ctx_out);
avformat_free_context(ctx_out);This seems to work fine except that the resulting HLS frame rate is not right. Of course, this happens because I am not setting the pts/dts stuff correctly and ffmpeg lets me know that. So I have two quetions :
- Am I going about this right ?
- How can I set the pts/dts stuff correctly ?
The encoder is giving me packets and I am submitting them as frames. Those
<sps>, <pps> and <sei></sei></pps></sps>
packets are really out of band data and don’t really have a timestamp. How can I submit them correctly ?