
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 (63)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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
Sur d’autres sites (11481)
-
Revision b5bf7b13a8 : Add two-pass quantization Optimized the quantization function by making it a tw
19 juin 2013, par Yunqing WangChanged Paths :
Modify /vp9/encoder/vp9_quantize.c
Add two-pass quantizationOptimized the quantization function by making it a two-pass
process. The first pass does a quick checking of the transform
coefficients against the base ZBIN, and only keep the good
enough set of coefficients for quantization. A skipping
check is added. If all coefficients are within the base ZBIN, no
quantization is needed. The second pass is the actual quantization
pass, which only processes the coefficient subset determined
in first pass. This reduces the computation. Furthermore, an
alternitive method is used for large transform size, which often
has sparse nonzero quantized coefficients.Overall, the encoder speedup is about 4%. The quantization function
itself gets 20% faster.Change-Id : I3a9dd0da6db030260b6d9c314a9fa48ecae89f22
-
FFmpeg : Encoder did not produce proper pts, making some up
22 novembre 2022, par ChrolumaI'm trying to convert a yuv image to jpg format via FFmpeg. But I occured
[image2 @ 0x38750] Encoder did not produce proper pts, making some up.
while the program was encoding. I looked up some references that someone saidavcodec_send_frame
can only be used when the frames is more than one. Can I use this way to achieve image conversion ? Here is my code :

int ff_yuv422P_to_jpeg(int imgWidth, int imgHeight, uint8_t* yuvData, int yuvLength)
{
 /* ===== define ===== */
 const char* OutputFileName = "img.jpg";
 int retval = 0;

 /* ===== context ===== */
 struct AVFormatContext* pFormatCtx = avformat_alloc_context();
 avformat_alloc_output_context2(&pFormatCtx, NULL, NULL, OutputFileName);
 struct AVOutputFormat* fmt = pFormatCtx->oformat;

 struct AVStream* video_st = avformat_new_stream(pFormatCtx, 0);
 if (!video_st)
 {
 retval = 1;
 perror("ff_yuv422_to_jpeg(): avformat_new_stream");
 goto out_close_ctx;
 }

 /* ===== codec ===== */
 struct AVCodecContext* pCodecCtx = avcodec_alloc_context3(NULL);
 if (avcodec_parameters_to_context(pCodecCtx, video_st->codecpar) < 0)
 {
 retval = 2;
 perror("ff_yuv422_to_jpeg(): avcodec_parameters_to_context");
 goto out_close_ctx;
 }

 pCodecCtx->codec_id = fmt->video_codec;
 pCodecCtx->codec_type = AVMEDIA_TYPE_VIDEO;
 pCodecCtx->pix_fmt = AV_PIX_FMT_YUVJ422P;
 pCodecCtx->width = imgWidth;
 pCodecCtx->height = imgHeight;
 pCodecCtx->time_base.num = 1;
 pCodecCtx->time_base.den = 25;

 //dump info
 av_dump_format(pFormatCtx, 0, OutputFileName, 1);

 struct AVCodec *pCodec = avcodec_find_encoder(pCodecCtx->codec_id);
 if (!pCodec)
 {
 retval = 3;
 perror("ff_yuv422_to_jpeg(): avcodec_find_encoder");
 goto out_close_st;
 }

 if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0)
 {
 retval = 4;
 perror("ff_yuv422_to_jpeg(): avcodec_open2");
 goto out_close_st;
 }

 /* ===== frame ===== */
 struct AVFrame* pictureFrame = av_frame_alloc();
 pictureFrame->width = pCodecCtx->width;
 pictureFrame->height = pCodecCtx->height;
 pictureFrame->format = AV_PIX_FMT_YUVJ422P;

 int picSize = av_image_get_buffer_size(AV_PIX_FMT_YUVJ422P, pCodecCtx->width, pCodecCtx->height, 1);
 uint8_t* pictureBuffer = (uint8_t*)av_malloc(picSize);
 av_image_fill_arrays(pictureFrame->data, pictureFrame->linesize, pictureBuffer, AV_PIX_FMT_YUVJ422P, pCodecCtx->width, pCodecCtx->height, 1);

 /* ===== write header ===== */
 int notUseRetVal = avformat_write_header(pFormatCtx, NULL);
 
 struct AVPacket* pkt = av_packet_alloc();
 av_new_packet(pkt, imgHeight * imgWidth * 3);
 pictureFrame->data[0] = pictureBuffer + 0 * (yuvLength / 4);
 pictureFrame->data[1] = pictureBuffer + 2 * (yuvLength / 4);
 pictureFrame->data[2] = pictureBuffer + 3 * (yuvLength / 4);

 /* ===== encode ===== */
 int ret = avcodec_send_frame(pCodecCtx, pictureFrame);
 while (ret >= 0)
 {
 pkt->stream_index = video_st->index;
 ret = avcodec_receive_packet(pCodecCtx, pkt);
 if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
 {
 retval = 5;
 perror("ff_yuv422_to_jpeg(): avcodec_receive_packet");
 goto out_close_picture;
 }
 else if (ret < 0)
 {
 retval = 6;
 perror("ff_yuv422_to_jpeg(): avcodec_receive_packet ret < 0");
 goto out_close_picture;
 }
 av_write_frame(pFormatCtx, pkt);
 }
 av_packet_unref(pkt);

 /* ===== write trailer ===== */
 av_write_trailer(pFormatCtx);

#if Print_Debug_Info
 printf("yuv2jpg Encode Success.\n");
#endif

out_close_picture:
 if (pictureFrame) av_free(pictureFrame);
 if (pictureBuffer) av_free(pictureBuffer);

out_close_st:
 // old school
 // if (video_st) avcodec_close(video_st->codec);

out_close_ctx:
 if (pFormatCtx) avformat_free_context(pFormatCtx);

out_return:
 return retval;
}



and my log :


Output #0, image2, to 'img.jpg':
 Stream #0:0: Unknown: none
[image2 @ 0x38750] Encoder did not produce proper pts, making some up.
ff_yuv422_to_jpeg(): avcodec_receive_packet: Success



I looked up the avcodec_receive_packet()'s reference, and my code return error code
AVERROR(EAGAIN)
.

-
Using ffmpeg to interpolate images without making video
28 août 2020, par interwebjillThe following ffmpeg command works well to interpolate my set of images :


ffmpeg -r <fps> -i <input /> -filter:v minterpolate=fps=:scd=none:mi_mode=blend -pix_fmt yuvj420p <output>
</output></fps>


however, instead of outputting a video, I would like to instead output a directory of image files which include the original images plus the interpolated images. Is this possible with ffmpeg and if so, what are the commands ?


I could not find a solution in the ffmpeg documentation or on the wiki.