
Recherche avancée
Médias (3)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
Autres articles (91)
-
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation" -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (5061)
-
When using libva* (ffmpeg) encoded GIF images, an error is reported when compiling the demo
10 août 2023, par yangjinhui2936issuse : I need to use the GIF encoding feature in FFMPEG to encode argb images as gifs.Because the encoding effect of using GIF library is not as good as the effect of FFMPEG.
However, several libraries like avcodec were too bulky, so I did some cropping.I just want to keep the functionality of GIF encoding.
Below is my makefile for cropping ffmpeg :


#!/bin/sh
# ./configure --prefix=$(pwd)/output --arch=arm --target-os=linux --enable-cross-compile --disable-asm --cross-prefix=arm-linux-gnueabihf- 
./configure --prefix=$(pwd)/output --target-os=linux --disable-asm \
--disable-gpl --enable-nonfree --enable-error-resilience --enable-debug --enable-shared --enable-small --enable-zlib \
--disable-ffmpeg --disable-ffprobe --disable-ffplay --disable-programs --disable-symver\
 --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-decoder=h264 --enable-avformat \
 --disable-txtpages --enable-avcodec --enable-avutil \
 --disable-avresample --disable-avfilter --disable-avdevice --disable-postproc \
 --disable-swscale --enable-decoder=gif --enable-demuxer=gif --enable-muxer=gif --disable-iconv \
 --disable-v4l2-m2m --disable-indevs --disable-outdevs

make clean
make -j8

make install



Then link the compiled so to the gif demo.
Blew is gif demo code(He was automatically generated by chatgpt, and I want to verify it) :


#include 
// #include "output/include/imgutils.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavutil/avutil.h"

int main() {
 AVCodec *enc_codec;
 AVCodecContext *enc_ctx = NULL;
 AVStream *stream = NULL;
 int ret;

 AVFormatContext *fmt_ctx = avformat_alloc_context();
 if (!fmt_ctx) {
 fprintf(stderr, "Could not allocate format context\n");
 return 1;
 }
 
 AVInputFormat *input_fmt = av_find_input_format("image2");
 if ((ret = avformat_open_input(&fmt_ctx, "input.bmp", input_fmt, NULL)) < 0) {
 fprintf(stderr, "Could not open input file %d\n", ret);
 return ret;
 }

 AVCodec *dec_codec = avcodec_find_decoder(AV_CODEC_ID_BMP);
 if (!dec_codec) {
 fprintf(stderr, "Decoder not found\n");
 return 1;
 }
 
 AVCodecContext *dec_ctx = avcodec_alloc_context3(dec_codec);
 if (!dec_ctx) {
 fprintf(stderr, "Could not allocate decoder context\n");
 return 1;
 }

 if ((ret = avcodec_open2(dec_ctx, dec_codec, NULL)) < 0) {
 fprintf(stderr, "Could not open decoder\n");
 return 1;
 }

 AVOutputFormat *out_fmt = av_guess_format("gif", NULL, NULL);
 if (!out_fmt) {
 fprintf(stderr, "Could not find output format\n");
 return 1;
 }

 AVFormatContext *out_ctx = NULL;
 if ((ret = avformat_alloc_output_context2(&out_ctx, out_fmt, NULL, NULL)) < 0) {
 fprintf(stderr, "Could not allocate output context\n");
 return 1;
 }

 stream = avformat_new_stream(out_ctx, NULL);
 if (!stream) {
 fprintf(stderr, "Could not create new stream\n");
 return 1;
 }

 enc_codec = avcodec_find_encoder(AV_CODEC_ID_GIF);
 if (!enc_codec) {
 fprintf(stderr, "Encoder not found\n");
 return 1;
 }

 enc_ctx = avcodec_alloc_context3(enc_codec);
 if (!enc_ctx) {
 fprintf(stderr, "Could not allocate encoder context\n");
 return 1;
 }

 if ((ret = avcodec_parameters_from_context(stream->codecpar, dec_ctx)) < 0) {
 fprintf(stderr, "Could not copy decoder parameters\n");
 return 1;
 }

 if ((ret = avcodec_open2(enc_ctx, enc_codec, NULL)) < 0) {
 fprintf(stderr, "Could not open encoder\n");
 return 1;
 }
 
 enc_ctx->pix_fmt = AV_PIX_FMT_RGB8; 
 enc_ctx->width = dec_ctx->width; 
 enc_ctx->height = dec_ctx->height; 
 enc_ctx->time_base = (AVRational){1, 25}; 

 avformat_init_output(out_ctx, NULL);

 if (!(out_fmt->flags & AVFMT_NOFILE)) {
 if ((ret = avio_open(&out_ctx->pb, "output.gif", AVIO_FLAG_WRITE)) < 0) {
 fprintf(stderr, "Could not open output file\n");
 return ret;
 }
 }

 avformat_write_header(out_ctx, NULL);

 AVFrame *frame = av_frame_alloc();
 AVPacket pkt;
 int frame_count = 0;

 while (av_read_frame(fmt_ctx, &pkt) >= 0) {
 avcodec_send_packet(dec_ctx, &pkt);
 while (avcodec_receive_frame(dec_ctx, frame) == 0) {
 avcodec_send_frame(enc_ctx, frame);
 while (avcodec_receive_packet(enc_ctx, &pkt) == 0) {
 pkt.stream_index = stream->index;
 av_interleaved_write_frame(out_ctx, &pkt);
 av_packet_unref(&pkt);
 }

 frame_count++;
 printf("Encoded frame %d\n", frame_count);
 }
 av_packet_unref(&pkt);
 }

 av_write_trailer(out_ctx);

 avcodec_close(enc_ctx);
 avcodec_free_context(&enc_ctx);
 avcodec_close(dec_ctx);
 avcodec_free_context(&dec_ctx);
 av_frame_free(&frame);

 avformat_close_input(&fmt_ctx);
 avformat_free_context(fmt_ctx);
 avio_close(out_ctx->pb);
 avformat_free_context(out_ctx);

 return 0;
}




Belw is shell of compile script for gif :


#!/bin/sh
gcc -o x2gif x2gif.c -L ./output/lib/ -l:libavformat.a -l:libavcodec.a -l:libavutil.a -lz -I ./output/include/



Unfortunately, the compilation did not pass.
How can I troubleshoot and resolve this issue ?


./output/lib/libavutil.a(lfg.o): In function `av_bmg_get':
/data1/yang/tool/ffmpeg-3.4.4/libavutil/lfg.c:59: undefined reference to `log'
./output/lib/libavutil.a(hwcontext_cuda.o): In function `cuda_free_functions':
/data1/yang/tool/ffmpeg-3.4.4/./compat/cuda/dynlink_loader.h:175: undefined reference to `dlclose'
./output/lib/libavutil.a(hwcontext_cuda.o): In function `cuda_load_functions':
/data1/yang/tool/ffmpeg-3.4.4/./compat/cuda/dynlink_loader.h:192: undefined reference to `dlopen'
/data1/yang/tool/ffmpeg-3.4.4/./compat/cuda/dynlink_loader.h:194: undefined reference to `dlsym'
/data1/yang/tool/ffmpeg-3.4.4/./compat/cuda/dynlink_loader.h:195: undefined reference to `dlsym'
/data1/yang/tool/ffmpeg-3.4.4/./compat/cuda/dynlink_loader.h:196: undefined reference to `dlsym'
/data1/yang/tool/ffmpeg-3.4.4/./compat/cuda/dynlink_loader.h:197: undefined reference to `dlsym'
/data1/yang/tool/ffmpeg-3.4.4/./compat/cuda/dynlink_loader.h:198: undefined reference to `dlsym'
./output/lib/libavutil.a(hwcontext_cuda.o):/data1/yang/tool/ffmpeg-3.4.4/./compat/cuda/dynlink_loader.h:199: more undefined references to `dlsym' follow
./output/lib/libavutil.a(rational.o): In function `av_d2q':
/data1/yang/tool/ffmpeg-3.4.4/libavutil/rational.c:120: undefined reference to `floor'
./output/lib/libavutil.a(eval.o): In function `eval_expr':
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:184: undefined reference to `exp'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:185: undefined reference to `exp'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:189: undefined reference to `floor'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:190: undefined reference to `ceil'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:191: undefined reference to `trunc'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:192: undefined reference to `round'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:263: undefined reference to `pow'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:300: undefined reference to `floor'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:309: undefined reference to `pow'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:315: undefined reference to `hypot'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:316: undefined reference to `atan2'
./output/lib/libavutil.a(eval.o): In function `ff_exp10':
/data1/yang/tool/ffmpeg-3.4.4/libavutil/ffmath.h:44: undefined reference to `exp2'
./output/lib/libavutil.a(eval.o): In function `parse_primary':
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:417: undefined reference to `sinh'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:418: undefined reference to `cosh'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:419: undefined reference to `tanh'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:420: undefined reference to `sin'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:421: undefined reference to `cos'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:422: undefined reference to `tan'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:423: undefined reference to `atan'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:424: undefined reference to `asin'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:425: undefined reference to `acos'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:426: undefined reference to `exp'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:427: undefined reference to `log'
/data1/yang/tool/ffmpeg-3.4.4/libavutil/eval.c:428: undefined reference to `fabs'



-
How To Write An Oscilloscope
I’m trying to figure out how to write a software oscilloscope audio visualization. It’s made more frustrating by the knowledge that I am certain that I have accomplished this task before.
In this context, the oscilloscope is used to draw the time-domain samples of an audio wave form. I have written such a plugin as part of the xine project. However, for that project, I didn’t have to write the full playback pipeline— my plugin was just handed some PCM data and drew some graphical data in response. Now I’m trying to write the entire engine in a standalone program and I’m wondering how to get it just right.
This is an SDL-based oscilloscope visualizer and audio player for Game Music Emu library. My approach is to have an audio buffer that holds a second of audio (44100 stereo 16-bit samples). The player updates the visualization at 30 frames per second. The o-scope is 512 pixels wide. So, at every 1/30th second interval, the player dips into the audio buffer at position ((frame_number % 30) * 44100 / 30) and takes the first 512 stereo frames for plotting on the graph.
It seems to be working okay, I guess. The only problem is that the A/V sync seems to be slightly misaligned. I am just wondering if this is the correct approach. Perhaps the player should be performing some slightly more complicated calculation over those (44100/30) audio frames during each update in order to obtain a more accurate graph ? I described my process to an electrical engineer friend of mine and he insisted that I needed to apply something called hysteresis to the output or I would never get accurate A/V sync in this scenario.
Further, I know that some schools of thought on these matters require that the dots in those graphs be connected, that the scattered points simply won’t do. I guess it’s a stylistic choice.
Still, I think I have a reasonable, workable approach here. I might just be starting the visualization 1/30th of a second too late.
-
ffmpeg segments only the first part of my audio file
30 juin 2012, par hammatI'm implementing a http live streaming server to send audio file to iOS devices.
No problem with Apple's tools, mediafilesegmenter, my files are valid and it works fine.I'm trying now to segment the same file using ffmpeg. I've downloaded the last stable version which is the 0.10.2 for now.
Here is how I try to segment my mp3 file :
./ffmpeg -re -i input.mp3 -f segment -segment_time 10 -segment_list outputList.m3u8 -acodec libmp3lame -map 0 output%03d.mp3
It starts the mapping like expected but finish with only one .mp3 file.
Did I miss something in the process ?
Thanks in advance.edit
Ok here is my latest command line :
ffmpeg -i input.mp3 -c:a libmp3lame -b:a 128k -map 0:0 -f segment -segment_time 10 -segment_list outputlist.m3u8 -segment_format mp3 'output%03d.mp3'
It still gives me only one file but the file is the hole song, not only one part.
Here is the output of ffmpeg :ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
built on Apr 20 2012 07:08:29 with gcc 4.5.2
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libmp3lame
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 /
53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[mp3 @ 0x8e4f120] max_analyze_duration 5000000 reached at 5015510
Input #0, mp3, from 'BeachHouse-Myth.mp3':
Metadata:
title : Myth
artist : Beach House
track : /
album : Bloom
disc : /
genre : Alternative
TSRC : USSUB1296501
Duration: 00:04:18.69, start: 0.000000, bitrate: 320 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 320 kb/s Output #0, segment, to 'stream%03d.mp3': Metadata:
title : Myth
artist : Beach House
track : /
album : Bloom
disc : /
genre : Alternative
TSRC : USSUB1296501
encoder : Lavf53.32.100
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 -> libmp3lame)
Press [q] to stop, [?] for help
Truncating packet of size 1024 to 105ate= 0.0kbits/s
Truncating packet of size 1024 to 1
size= 0kB time=00:04:18.71 bitrate= 0.0kbits/s video:0kB audio:4042kB global headers:0kB muxing overhead -100.000000%