
Recherche avancée
Autres articles (57)
-
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 ) (...) -
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 (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (6669)
-
ffmpeg audio decoding providing half the data from original audio in C++
3 mai 2016, par hockeyislifeI am trying to write a simple program in C++ that captures audio from a microphone on the computer and encodes it into mp2. Which I was successful in doing, I verified this by saving a mp2 audio file and playing it back in VLC.
I then decided to see if I could take the encoded audio packets from ffmpeg and convert them back to raw PCM format, and this is where I am having trouble.
So below is my decoder settings :
AVCodecID audio_codec_id = AV_CODEC_ID_MP2;
AVCodec * audio_decodec = avcodec_find_decoder(audio_codec_id);
if (!audio_decodec)
{
return -1;
}
audio_decodec_ctx = avcodec_alloc_context3(audio_decodec);
audio_decodec_ctx->bit_rate = 64000;
audio_decodec_ctx->channels = 2;
audio_decodec_ctx->channel_layout = AV_CH_LAYOUT_STEREO;
audio_decodec_ctx->sample_rate = 44100;
audio_decodec_ctx->sample_fmt = AV_SAMPLE_FMT_S16;
int retval;
if ((retval = avcodec_open2(audio_decodec_ctx, audio_decodec, NULL)) < 0)
{
return -1;
}Here is my encoder settings, which I made identical :
AVCodecID audio_codec_id = AV_CODEC_ID_MP2;
AVCodec* audio_codec = avcodec_find_encoder(audio_codec_id);
if (!audio_codec)
{
return -1;
}
// Initialize codec.
AVCodecContext* audio_codec_ctx = avcodec_alloc_context3(audio_codec);
audio_codec_ctx->bit_rate = 64000;
audio_codec_ctx->channels = 2;
audio_codec_ctx->channel_layout = AV_CH_LAYOUT_STEREO;
audio_codec_ctx->sample_rate = 44100;
audio_codec_ctx->sample_fmt = AV_SAMPLE_FMT_S16;
int audio_retval;
if ((audio_retval = avcodec_open2(audio_codec_ctx, audio_codec, NULL)) < 0)
{
return -1;
}As stated previously, the encoding of the audio signal works perfectly, when I try to take the packets that are encoded and attempt to convert them back I am getting only half the data.
avcodec_encode_audio2(audio_codec_ctx, &audio_pkt, pOutAudioFrame, &got_output);
if (got_output)
{
fwrite(audio_pkt.data, 1, audio_pkt.size, f); // MP2 file write which, sounds very nice, which leads me to believe encoding is being done correctly
AVFrame * audio_frame_decode = av_frame_alloc();
avcodec_get_frame_defaults(audio_frame_decode);
int frame_finished = 0;
avcodec_decode_audio4(audio_decodec_ctx, audio_frame_decode, &frame_finished, &audio_pkt );
if (frame_finished)
{
decoded_size += audio_frame_decode->linesize[0]; // only getting 2304 bytes
av_free_packet(&audio_pkt);
}
}The amount of PCM data being taken is 4608 but after decoding the encoder version I am getting only 2304 bytes. Seems like I have something incorrect but I can’t put my finger on it. Any help would be greatly appreciated.
Thanks in advance.
-
ffmpeg concat converts multiple videos to chipmunk version with half the video silence
27 mai 2020, par inselmenschi try to concat multiple videos to one video and add an background music to it.



for some reason the background music is perfectly added to the output video but the audio of each part of the output is speed up to a chipmunk version of the video itself. this results in an output video of 7 minutes with about 5 minutes of silence since everything is so fast that all the audio finishes after about 2 minutes.



my command is :



ffmpeg -safe 0 -i videolist.ffconcat -i bg_loop.mp3 -y -filter_complex "[1:0]volume=0.3[a1];[0:a][a1]amix=inputs=2" -vcodec libx264 -r 25 -filter:v scale=w=1920:h=1080 -map 0:v:0 output.mp4



i tried to remove the background music (since i wasn't able to loop it through the video i thought maybe that's the issue) and still.. all the audio of the video clips is still speed up resulting in chaotic audio at the beginning and silence at the end.



my video list looks like this :



ffconcat version 1.0
file intro.mp4
file clip-x.mp4
file clip-y.mp4
file clip-x.mp4
file clip-y.mp4
[... and so on]




i hope somebody can tell me what i'm doing wrong here (and maybe how to adjust my command to loop the background music through all the clips)



i googled a bit and found the adjustment of my command to add
amix=inputs=2:duration=first
but that doesn't do the trick and if i addduration=shortest
orduration=longest
nothing changes the output audio

-
Linux : Webcam capture not fast enough. Ffmpeg dies half way
19 août 2013, par user763410I am trying to capture webcam output in liux/ubuntu. I have a chico webcam (lenovo laptop). I am running inside a VMWARE virtual machine. The capture is not proceeding beyond 10 seconds. can you please help.
The command I used is :
$ ffmpeg -y -f video4linux2 -r 20 -s 160x120 -i /dev/video0 -acodec libfaac -ab 128k /tmp/web.avi
The most important message I am getting is :
[video4linux2,v4l2 @ 0x9e43fa0] The v4l2 frame is 46448 bytes, but 153600 bytes are expected
Complete message from ffmpeg :
ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 18 2013 09:09:13 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-libass --prefix=/opt/ffmpeg --enable-debug --enable-libfreetype
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
[video4linux2,v4l2 @ 0x9e43fa0] The V4L2 driver changed the video from 160x120 to 320x240
[video4linux2,v4l2 @ 0x9e43fa0] The driver changed the time per frame from 1/20 to 1/15
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 6424.338678, bitrate: 18432 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 18432 kb/s, 15 fps, 15 tbr, 1000k tbn, 1000k tbc
Codec AVOption ab (set bitrate (in bits/s)) specified for output file #0 (/tmp/web.avi) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Output #0, avi, to '/tmp/web.avi':
Metadata:
ISFT : Lavf55.12.102
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240, q=2-31, 200 kb/s, 20 tbn, 20 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x9e43fa0] The v4l2 frame is 46448 bytes, but 153600 bytes are expected
/dev/video0: Invalid data found when processing input
frame= 29 fps= 14 q=3.5 Lsize= 87kB time=00:00:01.45 bitrate= 490.0kbits/s
video:80kB audio:0kB subtitle:0 global headers:0kB muxing overhead 7.760075%
[video4linux2,v4l2 @ 0x9e43fa0] Some buffers are still owned by the caller on close.