
Recherche avancée
Médias (1)
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
Autres articles (95)
-
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 (8049)
-
Trying to save frames as colored image using Ffmpeg in C++
2 septembre 2021, par TolgaI am new to FFmpeg and I am trying to save the video frames as colored images. I have achieved saving them as grayscale using Netpbm, however, I need to save the frames as colored. I have tried implementing the code in this link.


However, I get an error :


'Exception thrown at 0x00E1FC4F (swscale-5.dll) in VideoDecoding2.exe:
 0xC0000005: Access violation writing location 0xCCCCCCCC.'



Is there any way to improve this code or another way to save frames as colored ?


Here is my code below.


- 

src_pix_fmt
isAV_PIX_FMT_YUV420p
.dst_pix_fmt
isAV_PIX_FMT_RGB24
.






src_pix_fmt = avcc->pix_fmt;

src_width = avcc->width;
src_height = avcc->height;

dst_width = src_width;
dst_height = src_height;

numBytes = av_image_get_buffer_size(dst_pix_fmt, dst_width, dst_height, 0);

buffer = (uint8_t*)av_malloc(numBytes);

if ((ret = av_image_alloc(src_data, src_linesize, src_width, src_height, src_pix_fmt, 16)) < 0)
{
 printf("Couldn't allocate source image.\n");
 return 0;
}

av_image_fill_arrays(frameRGB->data, frameRGB->linesize, buffer, dst_pix_fmt, dst_width, dst_height, 0);

while (av_read_frame(avfc, packet) >= 0)
{
 ret = avcodec_send_packet(avcc, packet);
 if (ret < 0)
 {
 printf("Packets could not supplied to decoder.\n");
 return -1;
 }

 ret = avcodec_receive_frame(avcc, frame);
 printf("%d", ret);

 if (packet->stream_index == videoStream)
 {
 sws_ctx = sws_getContext(src_width, src_height, src_pix_fmt,
 dst_width, dst_height, dst_pix_fmt,
 SWS_BILINEAR, NULL, NULL, NULL);

 if (!sws_ctx)
 {
 printf("Cannot create scale context for conversion\n"
 "fmt:%s s:%dx%d --> fmt:%s s:%dx%d\n",
 av_get_pix_fmt_name(src_pix_fmt), src_width, src_height,
 av_get_pix_fmt_name(dst_pix_fmt), dst_width, dst_height);
 return 0;
 }

 sws_scale(sws_ctx, (const uint8_t* const*)frame->data, frame->linesize, 0, frame->height, dst_data, dst_linesize);

 FILE* f;
 char szFilename[32];
 int y;

 snprintf(szFilename, sizeof(szFilename), "frame%d.ppm", avcc->frame_number);
 fopen_s(&f, szFilename, "wb");
 
 if (f == NULL)
 {
 printf("Couldn't open file.\n");
 return 0;
 }
 
 fprintf(f, "P6\n%d %d\n255\n", dst_width, dst_height);

 for (y = 0; y < dst_height; y++)
 fwrite(frameRGB->data[0] + y * frameRGB->linesize[0], 1, dst_width * 3, f);
 
 fclose(f);
 }
}



-
How to tell FFMPEG to transcode only if target container does not support source stream
22 juillet 2018, par awiebeI’m trying to prepare some video files for streaming if possible without any loss of quality.
The trouble is I’ve tried to use ffmpeg’s
copy
codec, which works just fine if the target video container(mp4) can accept the source stream codec, but dies otherwise. Is there a way to tell ffmpegTry to copy (and match the any other parameters given) but if not, transcode using the "best" or at the very least default codec (since bestness is hard to quantify).
-
Can I get pictures/stills/photos from inside a container file from a CD-I disc ?
8 décembre 2017, par user9047197I have
ffmpeg
setup.Is there a way to extract
pictures/stills/photos
(etc) from a container (file) that’s from an old CD-I game that I have.I don’t want to extract the audio nor video. And I don’t want frames from the videos either.
I want the bitmaps (etc) from INSIDE that container file.
I know my Windows 8.1 PC can’t read inside that container file - so I’m hoping there’s a way to extract all the files (I want) instead using
ffmpeg
.(IsoBuster only gives the audio and video so I know already about IsoBuster.)
I think there are no individual headers for the
pictures/stills/photos
, etc.Here’s what ExifTool decoded the file as :
ExifTool Version Number (10.68)
File Name (green.3t)
File Size (610 MB)
File Permissions (rw-rw-rw-)
File Type (MPEG)
File Type Extension (mpg)
MIME Type (video/mpeg)
MPEG Audio Version (1)
Audio Layer (2)
Audio Bitrate (80 kbps)
Sample Rate (44100)
Channel Mode (Single Channel)
Mode Extension (Bands 4-31)
Copyright Flag (False)
Original Media (False)
Emphasis (None)
Image Width (368)
Image Height (272)
Aspect Ratio (1.0695)
Frame Rate (25 fps)
Video Bitrate (1.29 Mbps)
Duration (1:02:12 approx)
Image Size (368x272)
Megapixels (0.100)Thank you for reading and - help !! :D