
Recherche avancée
Médias (2)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
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 (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (6521)
-
How to join AAC files with AVCONV CONCAT using an input txt file ?
26 mars 2015, par user27284I have a number of AAC files and want to concatenate them into one AAC file. When I do this with AVCONV at the command line and I am specific with the file names, it works. When I try to do this with a text file that holds a list of files, it fails. What led me here is the FFMPEG tutorial page at Concatenating media files. I get a variety of results depending on what I try and I cannot find any info on what I am doing wrong with the syntax.
My file list (list.txt in the same directory)...
file 'sr_program_2015_03_23_05_44_01.aac'
file 'sr_program_2015_03_23_07_44_58.aac'When I follow the example at the page I mentioned above, I get an error. I included both the use of ffmpeg AND avconv but the results are the same.
ffmpeg...
ffmpeg -f concat -i list.txt -c copy output
ffmpeg version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
The ffmpeg program is only provided for script compatibility and will be removed
in a future release. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
Unknown input format: 'concat'avconv...
avconv -f concat -i list.txt -c copy output
avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
Unknown input format: 'concat'When I remove the "-f" and use the filenames directly, it works. I have no idea why. The resulting file also plays as expected.
avconv -i concat:sr_program_2015_03_23_05_44_01.aac\|sr_program_2015_03_23_07_44_58.aac -c copy output.aac
avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
[aac @ 0xcb6cc0] channel element 3.5 is not allocated
[aac @ 0xcb4b20] max_analyze_duration reached
[aac @ 0xcb4b20] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'concat:sr_program_2015_03_23_05_44_01.aac|sr_program_2015_03_23_07_44_58.aac':
Duration: 01:58:34.29, bitrate: 65 kb/s
Stream #0.0: Audio: aac, 44100 Hz, stereo, s16, 65 kb/s
Output #0, adts, to 'output.aac':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Audio: aac, 44100 Hz, stereo, 65 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press ctrl-c to stop encoding
size= 57148kB time=7315.03 bitrate= 64.0kbits/s
video:0kB audio:57148kB global headers:0kB muxing overhead 0.000000%Noticing that the working approach does not use the ’-f’ option, I tried that again with my first attempt and got a completely different error.
avconv concat -i list.txt -c copy output.aac
avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
Unable to find a suitable output format for 'concat'The reason I want to process these ’broken stream’ aac files from a file list in a file is because I want to create the list from a script/code and then process it as part of a daily automated process. When the streams have broken, there are numerous files with the same date. When all goes well, there is only one file. It happens every other week or so. I want to automate the fix that I usually do manually. I have already accomplished creating the target file list, ironically, from examples on the same page mentioned above when I became stuck with this odd behavior.
I also want to know what it is I am doing wrong. I see the example I used first everywhere. I have tried this on two different machines running debian but different architectures (arm and x86) and received the same results.
Also, to make sure I had the latest ffmeg, I compiled it on each system using this page... Compile FFmpeg on Ubuntu, Debian, or Mint
Thank you for your time.
-
avfilter/avfilter : Add numbers of (in|out)pads directly to AVFilter
12 août 2021, par Andreas Rheinhardtavfilter/avfilter : Add numbers of (in|out)pads directly to AVFilter
Up until now, an AVFilter's lists of input and output AVFilterPads
were terminated by a sentinel and the only way to get the length
of these lists was by using avfilter_pad_count(). This has two
drawbacks : first, sizeof(AVFilterPad) is not negligible
(i.e. 64B on 64bit systems) ; second, getting the size involves
a function call instead of just reading the data.This commit therefore changes this. The sentinels are removed and new
private fields nb_inputs and nb_outputs are added to AVFilter that
contain the number of elements of the respective AVFilterPad array.Given that AVFilter.(in|out)puts are the only arrays of zero-terminated
AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads
are not zero-terminated and they already have a size field) the argument
to avfilter_pad_count() is always one of these lists, so it just has to
find the filter the list belongs to and read said number. This is slower
than before, but a replacement function that just reads the internal numbers
that users are expected to switch to will be added soon ; and furthermore,
avfilter_pad_count() is probably never called in hot loops anyway.This saves about 49KiB from the binary ; notice that these sentinels are
not in .bss despite being zeroed : they are in .data.rel.ro due to the
non-sentinels.Reviewed-by : Nicolas George <george@nsup.org>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>- [DH] libavfilter/aeval.c
- [DH] libavfilter/af_acontrast.c
- [DH] libavfilter/af_acopy.c
- [DH] libavfilter/af_acrossover.c
- [DH] libavfilter/af_acrusher.c
- [DH] libavfilter/af_adeclick.c
- [DH] libavfilter/af_adelay.c
- [DH] libavfilter/af_adenorm.c
- [DH] libavfilter/af_aderivative.c
- [DH] libavfilter/af_aecho.c
- [DH] libavfilter/af_aemphasis.c
- [DH] libavfilter/af_aexciter.c
- [DH] libavfilter/af_afade.c
- [DH] libavfilter/af_afftdn.c
- [DH] libavfilter/af_afftfilt.c
- [DH] libavfilter/af_aformat.c
- [DH] libavfilter/af_afreqshift.c
- [DH] libavfilter/af_afwtdn.c
- [DH] libavfilter/af_agate.c
- [DH] libavfilter/af_aiir.c
- [DH] libavfilter/af_alimiter.c
- [DH] libavfilter/af_amerge.c
- [DH] libavfilter/af_amix.c
- [DH] libavfilter/af_amultiply.c
- [DH] libavfilter/af_anequalizer.c
- [DH] libavfilter/af_anlmdn.c
- [DH] libavfilter/af_anlms.c
- [DH] libavfilter/af_anull.c
- [DH] libavfilter/af_apad.c
- [DH] libavfilter/af_aphaser.c
- [DH] libavfilter/af_apulsator.c
- [DH] libavfilter/af_aresample.c
- [DH] libavfilter/af_arnndn.c
- [DH] libavfilter/af_asetnsamples.c
- [DH] libavfilter/af_asetrate.c
- [DH] libavfilter/af_ashowinfo.c
- [DH] libavfilter/af_asoftclip.c
- [DH] libavfilter/af_asr.c
- [DH] libavfilter/af_astats.c
- [DH] libavfilter/af_asubboost.c
- [DH] libavfilter/af_asupercut.c
- [DH] libavfilter/af_atempo.c
- [DH] libavfilter/af_axcorrelate.c
- [DH] libavfilter/af_biquads.c
- [DH] libavfilter/af_bs2b.c
- [DH] libavfilter/af_channelmap.c
- [DH] libavfilter/af_channelsplit.c
- [DH] libavfilter/af_chorus.c
- [DH] libavfilter/af_compand.c
- [DH] libavfilter/af_compensationdelay.c
- [DH] libavfilter/af_crossfeed.c
- [DH] libavfilter/af_crystalizer.c
- [DH] libavfilter/af_dcshift.c
- [DH] libavfilter/af_deesser.c
- [DH] libavfilter/af_drmeter.c
- [DH] libavfilter/af_dynaudnorm.c
- [DH] libavfilter/af_earwax.c
- [DH] libavfilter/af_extrastereo.c
- [DH] libavfilter/af_firequalizer.c
- [DH] libavfilter/af_flanger.c
- [DH] libavfilter/af_haas.c
- [DH] libavfilter/af_hdcd.c
- [DH] libavfilter/af_headphone.c
- [DH] libavfilter/af_join.c
- [DH] libavfilter/af_ladspa.c
- [DH] libavfilter/af_loudnorm.c
- [DH] libavfilter/af_lv2.c
- [DH] libavfilter/af_mcompand.c
- [DH] libavfilter/af_pan.c
- [DH] libavfilter/af_replaygain.c
- [DH] libavfilter/af_rubberband.c
- [DH] libavfilter/af_sidechaincompress.c
- [DH] libavfilter/af_silencedetect.c
- [DH] libavfilter/af_silenceremove.c
- [DH] libavfilter/af_sofalizer.c
- [DH] libavfilter/af_speechnorm.c
- [DH] libavfilter/af_stereotools.c
- [DH] libavfilter/af_stereowiden.c
- [DH] libavfilter/af_superequalizer.c
- [DH] libavfilter/af_surround.c
- [DH] libavfilter/af_tremolo.c
- [DH] libavfilter/af_vibrato.c
- [DH] libavfilter/af_volume.c
- [DH] libavfilter/af_volumedetect.c
- [DH] libavfilter/asink_anullsink.c
- [DH] libavfilter/asrc_afirsrc.c
- [DH] libavfilter/asrc_anoisesrc.c
- [DH] libavfilter/asrc_anullsrc.c
- [DH] libavfilter/asrc_flite.c
- [DH] libavfilter/asrc_hilbert.c
- [DH] libavfilter/asrc_sinc.c
- [DH] libavfilter/asrc_sine.c
- [DH] libavfilter/avf_abitscope.c
- [DH] libavfilter/avf_ahistogram.c
- [DH] libavfilter/avf_aphasemeter.c
- [DH] libavfilter/avf_avectorscope.c
- [DH] libavfilter/avf_showcqt.c
- [DH] libavfilter/avf_showfreqs.c
- [DH] libavfilter/avf_showspatial.c
- [DH] libavfilter/avf_showspectrum.c
- [DH] libavfilter/avf_showvolume.c
- [DH] libavfilter/avf_showwaves.c
- [DH] libavfilter/avfilter.c
- [DH] libavfilter/avfilter.h
- [DH] libavfilter/buffersink.c
- [DH] libavfilter/buffersrc.c
- [DH] libavfilter/f_bench.c
- [DH] libavfilter/f_cue.c
- [DH] libavfilter/f_drawgraph.c
- [DH] libavfilter/f_ebur128.c
- [DH] libavfilter/f_graphmonitor.c
- [DH] libavfilter/f_interleave.c
- [DH] libavfilter/f_loop.c
- [DH] libavfilter/f_metadata.c
- [DH] libavfilter/f_perms.c
- [DH] libavfilter/f_realtime.c
- [DH] libavfilter/f_reverse.c
- [DH] libavfilter/f_segment.c
- [DH] libavfilter/f_select.c
- [DH] libavfilter/f_sendcmd.c
- [DH] libavfilter/f_sidedata.c
- [DH] libavfilter/f_zmq.c
- [DH] libavfilter/fifo.c
- [DH] libavfilter/internal.h
- [DH] libavfilter/setpts.c
- [DH] libavfilter/settb.c
- [DH] libavfilter/split.c
- [DH] libavfilter/trim.c
- [D
-
Assertion desc failed at src/libswscale/swscale_internal.h:764
18 avril 2022, par harsh bhatnagarI am trying to implement the ffmpeg code written in C++ language .


Tutorial link : https://www.youtube.com/watch?v=W6Yx3injNZs


Github Reference : https://github.com/bartjoyce/video-app/tree/master/src


When pass the filename or Rtsp Link in the avformat_open_input funcion. It shows the strange bug not able understand the issue in the C++ code or camera setting issue .


// av_err2str returns a temporary array. This doesn't work in gcc.
// This function can be used as a replacement for av_err2str.
#include "video_reader.hpp"
static const char* av_make_error(int errnum) {
 static char str[AV_ERROR_MAX_STRING_SIZE];
 memset(str, 0, sizeof(str));
 return av_make_error_string(str, AV_ERROR_MAX_STRING_SIZE, errnum);
}

static AVPixelFormat correct_for_deprecated_pixel_format(AVPixelFormat pix_fmt) {
 // Fix swscaler deprecated pixel format warning
 // (YUVJ has been deprecated, change pixel format to regular YUV)
 switch (pix_fmt) {
 case AV_PIX_FMT_YUVJ420P: return AV_PIX_FMT_YUV420P;
 case AV_PIX_FMT_YUVJ422P: return AV_PIX_FMT_YUV422P;
 case AV_PIX_FMT_YUVJ444P: return AV_PIX_FMT_YUV444P;
 case AV_PIX_FMT_YUVJ440P: return AV_PIX_FMT_YUV440P;
 default: return pix_fmt;
 }
}

bool video_reader_open(VideoReaderState* state, const char* filename) {

 // Unpack members of state
 auto& width = state->width;
 auto& height = state->height;
 auto& time_base = state->time_base;
 auto& av_format_ctx = state->av_format_ctx;
 auto& av_codec_ctx = state->av_codec_ctx;
 auto& video_stream_index = state->video_stream_index;
 auto& av_frame = state->av_frame;
 auto& av_packet = state->av_packet;

 // Open the file using libavformat
 av_format_ctx = avformat_alloc_context();
 if (!av_format_ctx) {
 printf("Couldn't created AVFormatContext\n");
 return false;
 }

 if (avformat_open_input(&av_format_ctx, filename, NULL, NULL) != 0) {
 printf("Couldn't open video file\n");
 return false;
 }

 // Find the first valid video stream inside the file
 video_stream_index = -1;
 AVCodecParameters* av_codec_params;
 AVCodec* av_codec;
 for (int i = 0; i < av_format_ctx->nb_streams; ++i) {
 av_codec_params = av_format_ctx->streams[i]->codecpar;
 av_codec = avcodec_find_decoder(av_codec_params->codec_id);
 if (!av_codec) {
 continue;
 }
 if (av_codec_params->codec_type == AVMEDIA_TYPE_VIDEO) {
 video_stream_index = i;
 width = av_codec_params->width;
 height = av_codec_params->height;
 time_base = av_format_ctx->streams[i]->time_base;
 break;
 }
 }
 if (video_stream_index == -1) {
 printf("Couldn't find valid video stream inside file\n");
 return false;
 }

 // Set up a codec context for the decoder
 av_codec_ctx = avcodec_alloc_context3(av_codec);
 if (!av_codec_ctx) {
 printf("Couldn't create AVCodecContext\n");
 return false;
 }
 if (avcodec_parameters_to_context(av_codec_ctx, av_codec_params) < 0) {
 printf("Couldn't initialize AVCodecContext\n");
 return false;
 }
 if (avcodec_open2(av_codec_ctx, av_codec, NULL) < 0) {
 printf("Couldn't open codec\n");
 return false;
 }

 av_frame = av_frame_alloc();
 if (!av_frame) {
 printf("Couldn't allocate AVFrame\n");
 return false;
 }
 av_packet = av_packet_alloc();
 if (!av_packet) {
 printf("Couldn't allocate AVPacket\n");
 return false;
 }

 return true;
}

bool video_reader_read_frame(VideoReaderState* state, uint8_t* frame_buffer, int64_t* pts) {

 // Unpack members of state
 auto& width = state->width;
 auto& height = state->height;
 auto& av_format_ctx = state->av_format_ctx;
 auto& av_codec_ctx = state->av_codec_ctx;
 auto& video_stream_index = state->video_stream_index;
 auto& av_frame = state->av_frame;
 auto& av_packet = state->av_packet;
 auto& sws_scaler_ctx = state->sws_scaler_ctx;

 // Decode one frame
 int response;
 while (av_read_frame(av_format_ctx, av_packet) >= 0) {
 if (av_packet->stream_index != video_stream_index) {
 av_packet_unref(av_packet);
 continue;
 }

 response = avcodec_send_packet(av_codec_ctx, av_packet);
 if (response < 0) {
 printf("Failed to decode packet: %s\n", av_make_error(response));
 return false;
 }

 response = avcodec_receive_frame(av_codec_ctx, av_frame);
 if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {
 av_packet_unref(av_packet);
 continue;
 } else if (response < 0) {
 printf("Failed to decode packet: %s\n", av_make_error(response));
 return false;
 }

 av_packet_unref(av_packet);
 break;
 }

 *pts = av_frame->pts;
 
 // Set up sws scaler
 if (!sws_scaler_ctx) {
 auto source_pix_fmt = correct_for_deprecated_pixel_format(av_codec_ctx->pix_fmt);
 sws_scaler_ctx = sws_getContext(width, height, source_pix_fmt,
 width, height, AV_PIX_FMT_RGB0,
 SWS_BILINEAR, NULL, NULL, NULL);
 }
 if (!sws_scaler_ctx) {
 printf("Couldn't initialize sw scaler\n");
 return false;
 }

 uint8_t* dest[4] = { frame_buffer, NULL, NULL, NULL };
 int dest_linesize[4] = { width * 4, 0, 0, 0 };
 sws_scale(sws_scaler_ctx, av_frame->data, av_frame->linesize, 0, av_frame->height, dest, dest_linesize);

 return true;
}

bool video_reader_seek_frame(VideoReaderState* state, int64_t ts) {
 
 // Unpack members of state
 auto& av_format_ctx = state->av_format_ctx;
 auto& av_codec_ctx = state->av_codec_ctx;
 auto& video_stream_index = state->video_stream_index;
 auto& av_packet = state->av_packet;
 auto& av_frame = state->av_frame;
 
 av_seek_frame(av_format_ctx, video_stream_index, ts, AVSEEK_FLAG_BACKWARD);

 // av_seek_frame takes effect after one frame, so I'm decoding one here
 // so that the next call to video_reader_read_frame() will give the correct
 // frame
 int response;
 while (av_read_frame(av_format_ctx, av_packet) >= 0) {
 if (av_packet->stream_index != video_stream_index) {
 av_packet_unref(av_packet);
 continue;
 }

 response = avcodec_send_packet(av_codec_ctx, av_packet);
 if (response < 0) {
 printf("Failed to decode packet: %s\n", av_make_error(response));
 return false;
 }

 response = avcodec_receive_frame(av_codec_ctx, av_frame);
 if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {
 av_packet_unref(av_packet);
 continue;
 } else if (response < 0) {
 printf("Failed to decode packet: %s\n", av_make_error(response));
 return false;
 }

 av_packet_unref(av_packet);
 break;
 }

 return true;
}

void video_reader_close(VideoReaderState* state) {
 sws_freeContext(state->sws_scaler_ctx);
 avformat_close_input(&state->av_format_ctx);
 avformat_free_context(state->av_format_ctx);
 av_frame_free(&state->av_frame);
 av_packet_free(&state->av_packet);
 avcodec_free_context(&state->av_codec_ctx);
}



Bug :


[rtsp @ 0x55def0b00ac0] getaddrinfo(): Name or service not known
[rtsp @ 0x55def0b00ac0] max delay reached. need to consume packet
[rtsp @ 0x55def0b00ac0] RTP: missed 10 packets
Assertion desc failed at src/libswscale/swscale_internal.h:764
Aborted (core dumped)