
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (34)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (5278)
-
Merge commit ’eae58428bd199f7d4670bf471f56ed204430878e’
5 octobre 2015, par Hendrik LeppkesMerge commit ’eae58428bd199f7d4670bf471f56ed204430878e’
* commit ’eae58428bd199f7d4670bf471f56ed204430878e’ :
avcodec : Do not lock during open for codecs marked as having threadsafe initMerged-by : Hendrik Leppkes <h.leppkes@gmail.com>
-
FFmpeg - avcodec_receive_frame doesn't receive all frames and lose frames before receving frames
22 mars 2019, par JinxThe
vcodec_receive_frame
function didn’t receive the rest of the frames. I tested that there were totally 132 frames of the video and it only received 125 frames losing 7 frames at the END of the video. How can I get the lost frames back ?But something weird happened. As you can see the output from my
MyDecode::receiveFrame()
function. The code inside the blockif (ret != 0){}
executed first, but the lost frames are at the end of the video. So how could they come out first ? What caused this happen ?MyDecode.cpp
AVFrame* MyDecode::receiveFrame()
{
mux.lock();
if (!codecCtx) {
mux.unlock();
return 0;
}
AVFrame* frame = av_frame_alloc();
int ret = avcodec_receive_frame(codecCtx, frame);
mux.unlock();
if (ret != 0)
{
static int lost_frames = 1;
std::cout << "Lost frames: " << lost_frames << std::endl;
lost_frames += 1;
av_frame_free(&frame);
return nullptr;
}
std::cout << "Received frames: " << received_frame_num << std::endl;
received_frame_num += 1;
return frame;
}
bool MyDecode::sendPacket(AVPacket* packet)
{
if (!packet || !packet->data || packet->size == 0)
return false;
mux.lock();
if (!codecCtx) {
mux.unlock();
return false;
}
int ret = avcodec_send_packet(codecCtx, packet);
mux.unlock();
av_packet_free(&packet);
if (ret != 0) {
return false;
}
return true;
}Console output
Total frames: 132
Lost frames: 1
Lost frames: 2
Lost frames: 3
Lost frames: 4
Lost frames: 5
Lost frames: 6
Lost frames: 7
Received frames: 1
Received frames: 2
Received frames: 3
................
Received frames: 125UPDATE :
MyDemux.cpp
AVPacket* MyDemux::readFrame()
{
mux.lock();
if (!formatCtx) {
std::cout << "formaetCtx is null" << std::endl;
mux.unlock();
return nullptr;
}
AVPacket* packet = av_packet_alloc();
if (!packet) {
std::cout << "packet is null" << std::endl;
mux.unlock();
return nullptr;
}
int ret = av_read_frame(formatCtx, packet);
if (ret != 0) {
while (true) {
av_read_frame(formatCtx, nullptr);
}
mux.unlock();
av_packet_free(&packet);
av_packet_unref(packet);
return nullptr;
}
media_type = packet->stream_index;
mux.unlock();
return packet;
}main.cpp
while (true) {
AVPacket* pkt = demux.readFrame();
if (demux.get_media_type() == 0) {
AVFrame* frame = video_decode.receiveFrame();
videoWidget->paintFrame(frame);
}
else if (demux.get_media_type() == 1) {
}
if (!pkt) {
std::cout << "to break" << std::endl;
break;
}
} -
Why are the colors transposed in my webm thumbnails ?
9 décembre 2022, par Peter ChaplinI have been using ffmpeg to generate webm files from png frames, and the webm files run ok in my video player, but the thumbnail colours appear transposed - blue replacing red, purple replacing orange, brown replacing green. I've also encountered issue uploading the webm to an image hosting site (which normally does support webms), though this might be an issue on their end.
I'm on Ubuntu 22.04.1 LTS


Does anyone know what might be causing this, and how to fix it ? Or how to check whether the webm files are ok or corrupted ?


*Edit : ok, here's a side-by-side comparison of the thumbnails that appear in my file explorer - mp4 on the left and webm on the right.
Both were generated from the same set of pngs, using the same command except with the filename extension changed.




Specifically,


ffmpeg -framerate 24 -i Panel2Humanized/frame%04d.png panel2humanskin.webm



and


ffmpeg -framerate 24 -i Panel2Humanized/frame%04d.png panel2humanskin.mp4



Both look the same when opened with a video player. It looks like the mp4 thumbnail grabbed the 1st frame while the webm grabbed the last, but the colors should be the same in each. (The text-bubble in the top-left is yellow in the mp4).


*Follow-up : Apparently my WebMs are being generated in GBRP (Green-Blue-Red Planar) pixel format, the site I was trying to upload to requires YUV420P (Luma/Chroma 4:2:0 Planar) format, maybe that's the issue ? I'm still not sure exactly what that means or how to fix it.


*Final follow-up : Looks like I needed to change the argument to :


ffmpeg -framerate 24 -i Panel2Humanized/frame%04d.png -pix_fmt yuv420p paned2humanskin.webm