
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (111)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (9134)
-
How to silent the MP3 decoding process
3 août 2019, par GoluI am learning ffmpeg and I made a MP3 decoder but when I am executing it , some kind of information is printing on my terminal but I don’t want it. So how to silent it ?
Here is code (full code)
/* FFmpeg Usage Example
* Date : 28 July 2019
*/
#include
#include <libavformat></libavformat>avformat.h>
#include <libavcodec></libavcodec>avcodec.h>
#include <libavutil></libavutil>avutil.h>
#include
int decode_packet(AVCodecContext*, AVPacket*, AVFrame*);
int main(void) {
AVFormatContext *pFormatContext = avformat_alloc_context();
AVCodecParameters *pCodecParameters = NULL;
if(avformat_open_input(&pFormatContext,"song.mp3",NULL,NULL)!=0) {
fprintf(stderr,"Could not open file\n");
return -1;
}
if(avformat_find_stream_info(pFormatContext,NULL)<0) {
fprintf(stderr,"Could not find stream\n");
return -1;
}
size_t stream_index = 0;
for(;stream_indexnb_streams;stream_index++) {
if(pFormatContext->streams[stream_index]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
pCodecParameters = pFormatContext->streams[stream_index]->codecpar;
}
break;
}
if(stream_index == -1) {
fprintf(stderr,"could not retrive stream info from file\n");
return -1;
}
AVStream *stream = pFormatContext->streams[stream_index];
pCodecParameters = stream->codecpar;
AVCodec *cdc = avcodec_find_decoder(pCodecParameters->codec_id);
AVCodecContext *cdc_ctx = avcodec_alloc_context3(cdc);
assert(pCodecParameters);
if(avcodec_parameters_to_context(cdc_ctx,pCodecParameters) < 0) {
fprintf(stderr,"Can't copy params to codec context\n");
return -1;
}
if(avcodec_open2(cdc_ctx,cdc,NULL) < 0) {
fprintf(stderr,"Failed to open decoder for stream\n");
return -1;
}
AVFrame *frame = av_frame_alloc();
if(!frame) {
fprintf(stderr,"could not allocate memory for frame\n");
return -1;
}
AVPacket *packet = av_packet_alloc();
// av_init_packet(&packet);
if(!packet) {
fprintf(stderr,"could not allocate memory for packet");
return -1;
}
packet->data=NULL;
packet->size=0;
// lets read the packets
while(av_read_frame(pFormatContext,packet) >= 0) {
if(packet->stream_index==stream_index) {
int response = 0 ;
response = decode_packet(cdc_ctx,packet,frame);
if(response < 0)
continue;
}
av_packet_unref(packet);
}
return 0;
}
int decode_packet(AVCodecContext *cdc_ctx , AVPacket *pkt, AVFrame *frm) {
int response = avcodec_send_packet(cdc_ctx,pkt);
if(response < 0)
return response;
while(response >= 0) {
response = avcodec_receive_frame(cdc_ctx,frm);
if(response == AVERROR(EAGAIN) || response == AVERROR_EOF)
return -1;
else if(response < 0)
return response;
}
return 0;
}Expected behaviour : nothing should be printed on screen
Actual behaviour : some kind of logs are printing automatically
Here is output logs ( some of them )
[mp3float @ 0x75172e7400] overread, skip -6 enddists: -5 -5
[mp3float @ 0x75172e7400] overread, skip -7 enddists: -6 -6
[mp3float @ 0x75172e7400] overread, skip -6 enddists: -5 -5
[mp3float @ 0x75172e7400] overread, skip -6 enddists: -4 -4 -
split quadri audio file into 4 monos
23 août 2019, par user2216280I have a quadri audio file (one stream of 4tracks) and I would like to make 4 monos track from that stream/
ffmpeg -i TRACK-026.wav -filter_complex "channelsplit=channel_layout=4[Perche][MixHf][hf1][hf2]" -map "[Perche]" perche.wav -map "[MixHF]" MixHF.wav -map "[hf1]" hf1.wav -map "[hf2]" hf2.wav
here’s the full log :
Guessed Channel Layout for Input Stream #0.0 : 4.0
Input #0, wav, from 'TRACK-026.wav':
Metadata:
comment : sSPEED=030.000-ND
: sTAKE=026
: sUBITS=$00000000
: sSWVER=2.10.71
: sSCENE=Track
: sFILENAME=TRACK-026.WAV
: sTAPE=190822
: sCIRCLED=FALSE
: sTRK1=Perche
: sTRK2=MixHF
: sTRK4=hf1
: sTRK5=hf2
: sNOTE=
:
encoded_by : SoundDev: MixPre-10T QD031734201
originator_reference: USSDVQD0317342017190822DQR000101
date : 2019-08-22
creation_time : 13:26:54
time_reference : 0
coding_history : A=PCM,F=48000,W=24,M=multi,R=48000,T=4 Ch
:
Duration: 00:32:19.35, bitrate: 4608 kb/s
Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 4.0, s32 (24 bit), 4608 kb/s
[AVFilterGraph @ 000002293f28d500] No output pad can be associated to link label 'MixHf'.
Error initializing complex filters.
Invalid argument -
Using Unicast RTSP URIs via ffmpeg
6 août 2019, par Chris MarshallI’m fairly new to ffmpeg, so I’d certainly appreciate being given an "M" to "RTFM." The ffmpeg docs are...not-so-easy...to navigate, but I’m trying.
The goal is to develop a compiled server that incorporates ffmpeg, but first, I need to get it working via CLI.
I have a standard AXIS Surveillance camera (AXIS M5525-E), set up as an ONVIF device (but that isn’t really relevant to this issue).
When I query it, I get the following URI as its video streaming URI :
rtsp://192.168.4.12/onvif-media/media.amp?profile=profile_1_jpeg&streamtype=unicast
The IP is local to a sandboxed network.
I add the authentication parameters to it, like so :
rtsp://<login>:<password>@192.168.4.12/onvif-media/media.amp?profile=profile_1_jpeg&streamtype=unicast
</password></login>(Yeah, I know that’s not secure, but this is just for testing and feasibility study. The whole damn sandbox is an insecure mess).
Now, if I use VLC to open the URI, it works great (of course). Looking at it with a packet analyzer, I see the following negotiation between the device and my computer (at .2 - Clipped for brevity) :
Id = 11
Source = 192.168.4.12
Destination = 192.168.4.2
Captured Length = 82
Packet Length = 82
Protocol = TCP
Date Received = 2019-08-06 12:18:37 +0000
Time Delta = 1.342024087905884
Information = 554 -> 53755 ([ECN, ACK, SYN], Seq=696764098, Ack=3139240483, Win=28960)
°
°
°
Id = 48
Source = 192.168.4.12
Destination = 192.168.4.2
Captured Length = 366
Packet Length = 366
Protocol = TCP
Date Received = 2019-08-06 12:18:38 +0000
Time Delta = 2.09382700920105
Information = 554 -> 53755 ([ACK, PUSH], Seq=696765606, Ack=3139242268, Win=1073)Followed immediately by UDP stream packets.
If, however, I feed the same URI to ffmpeg :
ffmpeg -i rtsp://<login>:<password>@192.168.4.12/onvif-media/media.amp?profile=profile_1_jpeg&streamtype=unicast -c:v libx264 -crf 21 -preset veryfast -g 30 -sc_threshold 0 -f hls -hls_time 4 /Volumes/Development/webroot/fftest/stream.m3u8
</password></login>I get nothing. No negotiation at all between the device and my computer.
After that, if I then remove the
&streamtype=unicast
argument, I get a negotiation, and a stream :Id = 10
Source = 192.168.4.12
Destination = 192.168.4.2
Captured Length = 82
Packet Length = 82
Protocol = TCP
Date Received = 2019-08-06 10:37:48 +0000
Time Delta = 3.047425985336304
Information = 554 -> 49606 ([ECN, ACK, SYN], Seq=457514925, Ack=2138974173, Win=28960)
°
°
°
Id = 31
Source = 192.168.4.12
Destination = 192.168.4.2
Captured Length = 345
Packet Length = 345
Protocol = TCP
Date Received = 2019-08-06 10:37:49 +0000
Time Delta = 3.840152025222778
Information = 554 -> 49606 ([ACK, PUSH], Seq=457516393, Ack=2138975704, Win=1039)I will, of course, be continuing to work out why this is [not] happening, and will post any solutions that I find, but, like I said, I’m fairly new to this, so it’s entirely possible that I’m missing some basic stuff, and would appreciate any guidance.
Thanks !