
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (29)
-
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 -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
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 (5445)
-
FFmpeg av_read_frame not reading frames properly ?
16 juin 2019, par Sir DrinksCoffeeALotAlright, so I’ve downloaded some raw UHD sequences in .yuv format and encoded them with ffmpeg in .mp4 container (h264 4:4:4, 100% quality, 25fps). When i use ffprobe to find out how many frames are encoded i get 600, so that’s 24 secs of video.
BUT, when i run those encoded video sequences through
av_read_frame
i only get like 40-50% of frames processed beforeav_read_frame
returns error code-12
. So I’m wild guessing that there are some data packages in middle of the streams which get read byav_read_frame
and forces a function to return-12
.What my questions are, how should i deal with this problem so i can encode full number of frames (600) ? When
av_read_frame
returns value different from0
should iav_free_packet
and proceed to read next frame ? Sinceav_read_frame
returns values< 0
for error codes, which error code is used forEOF
so i can insulate end of file code ? -
FFmpeg av_read_frame not reading frames properly ?
2 août 2016, par Sir DrinksCoffeeALotAlright, so I’ve downloaded some raw UHD sequences in .yuv format and encoded them with ffmpeg in .mp4 container (h264 4:4:4, 100% quality, 25fps). When i use ffprobe to find out how many frames are encoded i get 600, so that’s 24 secs of video.
BUT, when i run those encoded video sequences through
av_read_frame
i only get like 40-50% of frames processed beforeav_read_frame
returns error code-12
. So I’m wild guessing that there are some data packages in middle of the streams which get read byav_read_frame
and forces a function to return-12
.What my questions are, how should i deal with this problem so i can encode full number of frames (600) ? When
av_read_frame
returns value different from0
should iav_free_packet
and proceed to read next frame ? Sinceav_read_frame
returns values< 0
for error codes, which error code is used forEOF
so i can insulate end of file code ? -
Broken output from libavcodec/swscale, depending on resolution
3 juin 2014, par dtumaykinI am writing a video conference software, I have a H.264 stream decoded with libavcoded into IYUV and than rendered into a window with VMR9 in windowless mode. I use a DirectShow graph to do so.
To avoid unnecessary conversion into RGB and back (see link), I convert IYUV video into YUY2 before passing it to VMR9, with libswscale.
I noticed that with video resolution of 848x480, output video is broken, so I investigated further and came up that for some resolutions video is always broken. To exclude the libswscale from elaboration, I added support for IYUV+padding to IYUV conversion, and it worked, with all resolutions.
Still, I was willing to avoid slow IYUV, so I implemented support for NV12 (with libswscale) and YV12 (manually, essentially the same as IYUV). After doing some tests on two different computers, I came up with strange results.
resolution YUY2 NV12 IYUV YV12
PC 1 (my laptop)
640x360 ok broken ok broken
848x480 broken broken ok broken
960x540 broken broken ok broken
1024x576 ok ok ok ok
1280x720 ok ok ok broken
1920x1080 ok broken ok broken
PC 2
640x360 ok ok ok ok
848x480 ok broken ok broken
960x540 ok ok ok ok
1024x576 ok ok ok ok
1280x720 ok broken ok ok
1920x1080 ok ok ok okTo exclude VMR9 fault, I substituted it with EVR, but with same results.
I know that padding is needed for memory alignment, and that the size of padding depends on CPU used (libavcodec doc), that may explain difference between two computers(first has Intel i7-3820QM, the second Intel Core 2 Quad Q6600). I suppose it has something to do with padding, because images are corrupted in certain way.
You can see my blue t-shirt in lower part of image, and my face in the upper one.To follow is the code for the conversion. NV12 and YUY2 conversions are performed with libswscale, while IYUV and YV12 manually.
int pixels = _outputFrame->width * _outputFrame->height;
if (_outputFormat == "YUY2") {
int stride = _outputFrame->width * 2;
sws_scale(_convertCtx, _outputFrame->data, _outputFrame->linesize, 0, _outputFrame->height, &out, &stride);
}
else if (_outputFormat == "NV12") {
int stride[] = { _outputFrame->width, _outputFrame->width };
uint8_t * dst[] = { out, out + pixels };
sws_scale(_convertCtx, _outputFrame->data, _outputFrame->linesize, 0, _outputFrame->height, dst, stride);
}
else if (_outputFormat == "IYUV") { // clean ffmpeg padding
for (int i = 0; i < _outputFrame->height; i++) // copy Y
memcpy(out + i * _outputFrame->width, _outputFrame->data[0] + i * _outputFrame->linesize[0] , _outputFrame->width);
for (int i = 0; i < _outputFrame->height / 2; i++) // copy U
memcpy(out + pixels + i * _outputFrame->width / 2, _outputFrame->data[1] + i * _outputFrame->linesize[1] , _outputFrame->width / 2);
for (int i = 0; i < _outputFrame->height / 2; i++) // copy V
memcpy(out + pixels + pixels/4 + i * _outputFrame->width / 2, _outputFrame->data[2] + i * _outputFrame->linesize[2] , _outputFrame->width / 2);
}
else if (_outputFormat == "YV12") { // like IYUV, but U is inverted with V plane
for (int i = 0; i < _outputFrame->height; i++) // copy Y
memcpy(out + i * _outputFrame->width, _outputFrame->data[0] + i * _outputFrame->linesize[0], _outputFrame->width);
for (int i = 0; i < _outputFrame->height / 2; i++) // copy V
memcpy(out + pixels + i * _outputFrame->width / 2, _outputFrame->data[2] + i * _outputFrame->linesize[2], _outputFrame->width / 2);
for (int i = 0; i < _outputFrame->height / 2; i++) // copy U
memcpy(out + pixels + pixels / 4 + i * _outputFrame->width / 2, _outputFrame->data[1] + i * _outputFrame->linesize[1], _outputFrame->width / 2);
}out
is an output buffer._outputFrame
is libavcodec output AVFrame._convertCtx
is initialized as follows.if (_outputFormat == "YUY2")
_convertCtx = sws_getContext(_width, _height, AV_PIX_FMT_YUV420P,
_width, _height, AV_PIX_FMT_YUYV422, SWS_FAST_BILINEAR, nullptr, nullptr, nullptr);
else if (_outputFormat == "NV12")
_convertCtx = sws_getContext(_width, _height, AV_PIX_FMT_YUV420P,
_width, _height, AV_PIX_FMT_NV12, SWS_FAST_BILINEAR, nullptr, nullptr, nullptr);Questions :
- Are manual conversions correct ?
- Are my assumptions correct ?
- Is previous two answers are positive, where is the problem ? And especially...
- Why it presents only with some resolutions and not others ?
- What additional info can I provide ?