
Recherche avancée
Autres articles (13)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (3084)
-
How can I capture audio AND video simultenaous with ffmpeg from an USB capture device
22 octobre 2018, par obanI’m capturing a video by means of an USB Terratec Grabster AV350 (which is based on the em2860 chip).
I don’t succeed to get the audio when it is played . If I play the captured video with vlc or with ffplay I got only 3 seconds sound and then a silence for the rest of the video ...
During the capturing I don’t get any errors. At the end it indicates the size of the video and audio captured ....
I’m using the ffmpeg command for this :
ffmpeg -f alsa -ac 2 -i hw:3 -f video4linux2 -i /dev/video0 -acodec ac3 -ab 128k -vcodec mpeg4 -b 6000k -r 25 test5.avi
The log is :
[alsa @ 0x9bcd420]Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'hw:3':
Duration: N/A, start: 69930.998994, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[video4linux2 @ 0x9bf5d30]Estimating duration from bitrate, this may be inaccurate
Input #1, video4linux2, from '/dev/video0':
Duration: N/A, start: 1307111377.654173, bitrate: -2147483 kb/s
Stream #1.0: Video: rawvideo, yuyv422, 720x576, -2147483 kb/s, 1000k tbr, 1000k tbn, 1000k tbc
[ac3 @ 0x9bf9590]No channel layout specified. The encoder will guess the layout, but it might be incorrect.
Output #0, avi, to 'test5.avi':
Metadata:
ISFT : Lavf52.64.2
Stream #0.0: Video: mpeg4, yuv420p, 720x576, q=2-31, 6000 kb/s, 25 tbn, 25 tbc
Stream #0.1: Audio: ac3, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
frame= 1283 fps= 25 q=2.3 Lsize= 38677kB time=51.32 bitrate=6173.9kbits/s
**video:37755kB audio:846kB** global headers:0kB muxing overhead 0.198922%If I reduce the command for only capturing audio, then the audio file can be played successfully :
ffmpeg -f alsa -ac 2 -i hw:3,0 -acodec ac3 -ab 128k test5.avi
[alsa @ 0x8ede420]Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'hw:3,0':
Duration: N/A, start: 70395.998935, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[ac3 @ 0x8eebac0]No channel layout specified. The encoder will guess the layout, but it might be incorrect.
Output #0, avi, to 'test5.avi':
Metadata:
ISFT : Lavf52.64.2
Stream #0.0: Audio: ac3, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
size= 227kB time=13.62 bitrate= 136.8kbits/s
**video:0kB audio:213kB** global headers:0kB muxing overhead 6.902375%If I run the command for only video capturing then vlc or ffplay can play the video successfully :
ffmpeg -f video4linux2 -i /dev/video0 -vcodec mpeg4 -b 12000k -r 25 test5.avi
[video4linux2 @ 0x91d6420]Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
Duration: N/A, start: 1307112044.025687, bitrate: -2147483 kb/s
Stream #0.0: Video: rawvideo, yuyv422, 720x576, -2147483 kb/s, 1000k tbr, 1000k tbn, 1000k tbc
Output #0, avi, to 'test5.avi':
Metadata:
ISFT : Lavf52.64.2
Stream #0.0: Video: mpeg4, yuv420p, 720x576, q=2-31, 12000 kb/s, 25 tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 388 fps= 25 q=2.0 Lsize= 12963kB time=15.52 bitrate=6842.5kbits/s
**video:12949kB audio:0kB** global headers:0kB muxing overhead 0.114584%Strange behaviour I noticed is that when I tried capturing video and audio, I can not capture the audio afterwards any more,
unless I unplug the AV350 first.The G350 is located at card 3 :
htpc@htpc-01:/proc/asound/G350/pcm0c$ more info
card: 3
device: 0
subdevice: 0
stream: CAPTURE
id: USB Audio
name: USB Audio
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1The OS is a Linux 2.6.38-8-generic with the Ubuntu Natty Narwhal version
Any help on how to tackle this issue would be great ....
Thanks !
-
ffmpeg disconnects with different audio sample rate
11 juillet 2017, par HRGAm using ffmpeg transcoder tool to convert a streaming audio input to another format.The raw audio data comes from a input device in wav format (.wmv) which can be accessed via server port (ex.8080) . The audio format is in wav with 16bits/sample and sample rate of 6000 hz.
When I use ffmpeg to read this audio input with above specs and convert to another format it works fine.Ex.
ffmpeg -f s16le -ar 6000 -ac 1 -i http://local:8080/sampleaudio.wmv -f webm out.webmBut if i use fmmpeg to read the audio input at sample rate of 4000hz (other than the actual rate) ,it disconnects from the server always .
Ex.
ffmpeg -f s16le -ar 4000 -ac 1 -i http://local:8080/sampleaudio.wmv -f webm out.webmThe error in the ffmpeg console is "Stream ends prematurely at 194604, should be 4800044"
I know the input rate at which ffmpeg is reading and the actual audio output is different .But am curious to know
why ffmpeg is disconnecting from the server ,what is happening behind the scene.
Also how to enable logs for network connections(http,sockets..)
Thanks
-
Why does avcodec_fill_audio_frame return -22 when only sample count is different ?
24 juillet 2017, par N0unMy problem is very fast to explain : I have to encode audio samples using FFmpeg (raw PCM to G.711 mu-law). This is the guilty part of my code (I put raw parameters in this example to be explicit) :
AVFrame* frame = av_frame_alloc();
frame->nb_samples = 8000;
frame->format = AV_SAMPLE_FMT_S16;
frame->channels = 1;
frame->channel_layout = AV_CH_LAYOUT_MONO;
frame->sample_rate = 8000;
frame->quality = 1;
int res = avcodec_fill_audio_frame(frame, 1, AV_SAMPLE_FMT_S16, /*my samples data*/, 16000, 0);
// If res >= 0, continue with avcodec_encode_audio2And it works :) ... Well, I mean...
When my input is 8000 audio samples (S16 format so 16000 bytes), it works. But when I have 6000 audio samples (still S16 format so 12000 bytes), it fails with a -22 (invalid parameters). Any idea ?
PRECISION : This sample count is not dynamically changing. I have sessions with data always composed by 8000 sample (and it works), and other sessions with data always composed by 6000 sample (and it fails). Sample count and data size are the only parameters that are not the same between these sessions.
EDIT : If I set or not the
frame_size
field inAVCodecContext
, it returns to 0 afteravcodec_open2
but the mu-law encoder selected has theAV_CODEC_CAP_VARIABLE_FRAME_SIZE
capability so it sounds normal.