
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (75)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (12171)
-
Encode buffer captured by OpenGL in C
4 janvier 2020, par M. YingI am trying to use OpenGL to capture the back buffer of my computer’s screen, and then H.264 encode the buffer using FFMPEG’s
libavcodec
library. The issue I’m having is that I would like to encode the video inAV_PIX_FMT_420P
, but the back buffer capture function provided by OpenGL,glReadPixels()
, only supports formats likeGL_RGB
. As you can see below, I try to use FFMPEG’sswscale()
function to convert from RGB to YUV, but the following code crashes at theswscale()
line. Any ideas on how I can encode the OpenGL backbuffer ?// CAPTURE BACK BUFFER USING OPENGL
int width = 1280, height = 720;
BYTE* pixels = (BYTE *) malloc(sizeof(BYTE));
glReadPixels(0, 720, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels);
//CREATE FFMPEG VARIABLES
avcodec_register_all();
AVCodec *codec;
AVCodecContext *context;
struct SwsContext *sws;
AVPacket packet;
AVFrame *frame;
codec = avcodec_find_encoder(AV_CODEC_ID_H264);
context = avcodec_alloc_context3(encoder->codec);
context->dct_algo = FF_DCT_FASTINT;
context->bit_rate = 400000;
context->width = width;
context->height = height;
context->time_base.num = 1;
context->time_base.den = 30;
context->gop_size = 1;
context->max_b_frames = 1;
context->pix_fmt = AV_PIX_FMT_YUV420P;
avcodec_open2(context, codec, NULL);
// CONVERT TO YUV AND ENCODE
int frame_size = avpicture_get_size(AV_PIX_FMT_YUV420P, out_width, out_height);
encoder->frame_buffer = malloc(frame_size);
avpicture_fill((AVPicture *) encoder->frame, (uint8_t *) encoder->frame_buffer, AV_PIX_FMT_YUV420P, out_width, out_height);
sws = sws_getContext(in_width, in_height, AV_PIX_FMT_RGB32, out_width, out_height, AV_PIX_FMT_YUV420P, SWS_FAST_BILINEAR, 0, 0, 0);
uint8_t *in_data[1] = {(uint8_t *) pixels};
int in_linesize[1] = {width * 4};
// PROGRAM CRASHES HERE
sws_scale(encoder->sws, in_data, in_linesize, 0, encoder->in_height, encoder->frame->data, encoder->frame->linesize);
av_free_packet(&packet);
av_init_packet(&packet);
int success;
avcodec_encode_video2(context, &packet, frame, &success); -
Concatenate mp4 files
17 juillet 2020, par jap101I want to concatenate around 15 45 second clips together end on end. These clips can be of different resolution (most are 1080 or 720) but are all mp4 files.


i have tried both


concatenate_videoclips(clips,method='compose')
concatenate_videoclips(clips,method='chain')



from moviepy but neither of these are good for me since 'compose' relies on all the files being the same resolution which they are not and chain takes too long and sometimes causes errors.


i have also tried using ffmpeg with :


ffmpeg -i clip1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts



for each clip and then concatenating with :


ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|...|intermediate15.ts" -c copy -bsf:a aac_adtstoasc output.mp4



but this method seemed to cause a audio problem i believe due to the lossless compression when changing file type. There are these strange audio pauses periodically throughout the video.


i have also tried ffmpeg


ffmpeg -f concat -safe 0 -i clipsfile.txt -c copy output.mp4



where the clipsfile.txt looks like


file clip1.mp4
file clip2.mp4
...
file clip15.mp4



when i run this it works but i have an audio error where someclips (often comes in pairs) where one clip is silent and then the next clip plays the audio from the previous clip but of the first clip is shorter the audio will go back to the second clips audio at the correct time so it seems to me like the audio is overlaps and causes it to be silent and then when the overlap stops it goes back to normal.


Any suggestions to fix any of these, extra information or recommendations of other things to do are much appreciated thanks.


-
avconv audio and video out of sync
28 juillet 2015, par bram_aertsI have a problem synchronizing audio and video using avconv.
My goal is to process the video stream with opencv and later put the original audio back on the soundless video.
The processed video stream will be at the same period of time as the original video, but will have a starting offset of a few minutes.I tried to simplify the problem with the following code :
filename="inputvideo.mp4"
avconv -i $filename -an -ss 30 test.mp4
avconv -i test.mp4 -vn -ss 30 -i $filename -async 1 testmerged.mp4The second line removing the audio of the original video and shifting it 30 seconds (emulating what the opencv-code will do).
The last line putting the video and original audio (shifted 30 seconds) back together.I assumed if I’d both shift them the same amount of seconds, they would be neatly synchronized, but curiously the video and audio in the resulting movie are out of sync. It is a static delay of about about 3 seconds (audio is behind).
The same problem appears when making an interim mp3 file and using this as audio track for the resulting movie.When searching for a solution I found none that resolve this.
I tried to overcome this issue by using the -vsync/-async options. But since there is no timestamp information in the video this doesn’t solve the problem.
Even with the latest static build of ffmpeg the audio and video are still out of sync.Is there anything I overlooked or is it just impossible to sync audio and video in ffmpeg ?
And if so, What would be a decent and simple replacement for the funcionality I’m looking for ?