
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 (66)
-
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 (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (10102)
-
Hello, I have some problems with ffmpeg.concat, there are logs
12 mai 2022, par MatveyLog :


[swscaler @ 0x27d3c10] [swscaler @ 0x2886fe0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x27d3c10] [swscaler @ 0x283be10] deprecated pixel format used, make sure you did set range correctly
Output #0, avi, to '/home/pi/Desktop/VIDEOREG/2022:05:12_09:51:57:856_v1.avi':
 Metadata:
 software : Lavf58.45.100
 ISFT : Lavf59.20.101
 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1080x720, q=2-31, 200 kb/s, 25 fps, 25>
 Metadata:
 encoder : Lavc59.25.100 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Output #0, avi, to '/home/pi/Desktop/VIDEOREG/2022:05:12_09:51:57:911_v3.avi':
 Metadata:
 software : Lavf58.45.100
 ISFT : Lavf59.20.101
 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1080x720, q=2-31, 200 kb/s, 25 fps, 25>
 Metadata:
 encoder : Lavc59.25.100 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Output #0, avi, to '/home/pi/Desktop/VIDEOREG/2022:05:12_09:51:57:890_v2.avi':
 Metadata:
 software : Lavf58.45.100
 ISFT : Lavf59.20.101
 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1080x720, q=2-31, 200 kb/s, 25 fps, 25>
 Metadata:
 encoder : Lavc59.25.100 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[mjpeg @ 0x27aaa10] mjpeg_decode_dc: bad vlc: 0:0 (0x27b7c20)trate=8122.4kbits/s speed=1.33e+04x
[mjpeg @ 0x27aaa10] error dc
[mjpeg @ 0x27aaa10] error y=18 x=37
[mjpeg @ 0x27aaa10] EOI missing, emulating
[mjpeg @ 0x29551c0] error count: 65
[mjpeg @ 0x29551c0] error y=2 x=17
###############################################



My part of code for concatenation audio and video :


def video_with_audio(number, filename, video):
 ms = datetime.today().strftime('%f') + '0000'
 ms = ms[:3]
 name = datetime.today().strftime('%Y:%m:%d_%H:%M:%S:')
 title_video = f'/home/pi/Desktop/VIDEOREG/{name}{ms}{number}.avi'
 print(title_video)
 os.system("ffmpeg -i " + video + " -vf setpts=PTS*2 " + title_video)
 ####################################################
 ms_1 = datetime.today().strftime('%f') + '0000'
 ms_1 = ms_1[:3]
 name_1 = datetime.today().strftime('%Y:%m:%d_%H:%M:%S:')
 title_video = f'/home/pi/Desktop/VIDEOREG/{name}{ms}{number}.avi'
 title_video_1 = f'/home/pi/Desktop/VIDEOREG/{name_1}{ms_1}{number}.avi'
 input_audio = ffmpeg.input(filename)
 input_video = ffmpeg.input(title_video)
 print(title_video_1)
 ffmpeg.concat(input_video, input_audio, v=1, a=1).output(title_video_1).run()



There are slight delays during video recording, because I print information from sensors on video, can this affect the concatenation of video with audio ? (Saved video is accelerated ? that's why at the beginning I used slowing video down.)


-
More problems with FFmpeg not recognizing the directory I'm sending it to
8 novembre 2019, par Requiem_7I am creating a program that takes an audio file, breaks it up into 30-second audio files, and sends those files to Google’s Speech Recognition API to transcribe the audio. I’m using FFmpeg to break up the original audio file and make the 30-second files. It was working for about 20 minutes and I didn’t change anything but now it’s giving me an error saying that no such file or directory exists.
Here is the error it gives me :
C:\Users\hmkur\Desktop\Python\Transcribing_Audio_GoogleAPI_Python>ffmpeg -i source/valve.flac -f segment -segment_time 30 -c copy parts/out%01d.flac
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'source/valve.flac':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.29.100
Duration: 00:11:42.54, start: 0.000000, bitrate: 129 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : ISO Media file produced by Google Inc.
[segment @ 000001f8e84bd100] Opening 'parts/out0.flac' for writing
[segment @ 000001f8e84bd100] Failed to open segment 'parts/out0.flac'
Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Last message repeated 1 timesBoth the folder "source" with "valve.flac" exists as well as the folder "parts" and the files "out0.flac", etc. I was originally trying in the wav file format, switched to flac and it worked for about 20 minutes then stopped working.
-
ffmpeg transcoding.c problems about 'dimensions not set'
26 octobre 2020, par Park Han WoolI am trying to solve this problem in
transcoding.c
example about FFMPEG. but I don't know how to approach it...

I am getting this error :


[libx264 @ 00000000022c7120] dimensions not set
Cannot open video encoder for stream #0
Error occurred: Invalid argument



Here is my code to fix the
transcoding.c
example a little bit

static int open_output_file(const char *filename)
{
 AVStream *out_stream;
 AVStream *in_stream;
 AVCodecContext *dec_ctx, *enc_ctx;
 AVCodec *encoder;
 int ret;
 unsigned int i;

 ofmt_ctx = NULL;

 avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, filename);

 if (!ofmt_ctx) {
 av_log(NULL, AV_LOG_ERROR, "Could not create output context\n");
 return AVERROR_UNKNOWN;
 }

 for (i = 0; i < ifmt_ctx->nb_streams; i++) {
 in_stream = ifmt_ctx->streams[i];
 out_stream = avformat_new_stream(ofmt_ctx, NULL);

 if (!out_stream) {
 av_log(NULL, AV_LOG_ERROR, "Failed allocating output stream\n");
 return AVERROR_UNKNOWN;
 }

 dec_ctx = avcodec_alloc_context3(in_stream->codec->codec);
 enc_ctx = avcodec_alloc_context3(out_stream->codec->codec);

 if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO || dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
 /* in this example, we choose transcoding to same codec */
 encoder = avcodec_find_encoder(dec_ctx->codec_id);
 
 if (!encoder) {
 av_log(NULL, AV_LOG_FATAL, "Necessary encoder not found\n");
 return AVERROR_INVALIDDATA;
 }

 /* In this example, we transcode to same properties (picture size,
 * sample rate etc.). These properties can be changed for output
 * streams easily using filters */
 if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {

 enc_ctx->height = dec_ctx->height;
 enc_ctx->width = dec_ctx->width;
 enc_ctx->sample_aspect_ratio = dec_ctx->sample_aspect_ratio;

 /* take first format from list of supported formats */
 enc_ctx->pix_fmt = AV_PIX_FMT_YUV420P;

 /* video time_base can be set to whatever is handy and supported by encoder */
 enc_ctx->time_base = dec_ctx->time_base;
 }

 else {
 enc_ctx->sample_rate = dec_ctx->sample_rate;
 enc_ctx->channel_layout = dec_ctx->channel_layout;
 enc_ctx->channels = av_get_channel_layout_nb_channels(enc_ctx->channel_layout);

 /* take first format from list of supported formats */
 enc_ctx->sample_fmt = encoder->sample_fmts[0];
 enc_ctx->time_base.num = 1;
 enc_ctx->time_base.den = enc_ctx->sample_rate;
 }

 /* Third parameter can be used to pass settings to encoder */
 ret = avcodec_open2(enc_ctx, encoder, NULL);
 
 if (ret < 0) {
 cout << "ret<0" << endl;
 av_log(NULL, AV_LOG_ERROR, "Cannot open video encoder for stream #%u\n", i);
 return ret;
 }
 }
 else if (dec_ctx->codec_type == AVMEDIA_TYPE_UNKNOWN) {
 av_log(NULL, AV_LOG_FATAL, "Elementary stream #%d is of unknown type, cannot proceed\n", i);
 return AVERROR_INVALIDDATA;
 }
 else {
 /* if this stream must be remuxed */
 ret = avcodec_copy_context(ofmt_ctx->streams[i]->codec, ifmt_ctx->streams[i]->codec);
 if (ret < 0) {
 av_log(NULL, AV_LOG_ERROR, "Copying stream context failed\n");
 return ret;
 }
 }
 if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
 enc_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
 }

 av_dump_format(ofmt_ctx, 0, filename, 1);

 if (!(ofmt_ctx->oformat->flags & AVFMT_NOFILE)) {
 ret = avio_open(&ofmt_ctx->pb, filename, AVIO_FLAG_WRITE);
 if (ret < 0) {
 av_log(NULL, AV_LOG_ERROR, "Could not open output file '%s'", filename);
 return ret;
 }
 }

 /* init muxer, write output file header */
 ret = avformat_write_header(ofmt_ctx, NULL);
 if (ret < 0) {
 av_log(NULL, AV_LOG_ERROR, "Error occurred when opening output file\n");
 return ret;
 }
 return 0;
}



Why doesn't
avcodec_open2
work in my code ?