
Recherche avancée
Autres articles (71)
-
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 (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (9251)
-
Mix voiceover and background music with delay and volume
6 août 2019, par oldmanI don’t master ffmpeg but I really need to mix a voiceover with a background song.
The voiceover must start 5 seconds after the song, and must end 5 seconds before the song ends.
The music volume must be loud for the first 5 seconds and the last 5 seconds, but during the voiceover it should remain low.
Searching the internet, the closest I could come to my goal was this :
ffmpeg -i music.mp3 -i voiceover.mp3 -filter_complex "[0]asplit[a][b]; [a]atrim=duration=5,volume='1-max(0.25*(t-13),0)':eval=frame[pre]; [b]atrim=start=5,asetpts=PTS-STARTPTS[song]; [song][1]amix=inputs=2:duration=shortest:dropout_transition=0[post]; [pre][post]concat=n=2:v=0:a=1[mixed]" -map " "[mixed]" output.mp3
Could someone help me complete this script ?
-
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 -
How to pass a youtube video's audio url as ffmpeg source
8 janvier 2020, par CrystallVRIm trying to get my discord bot to play the audio from any youtube videos using the video’s url from youtube-dl (the audio url) as the ffmpeg path/source. I got it to work kind of but, while testing, the ffmpeg throws an error in the middle of the audio and the process ends. Here is the error :
https://i.imgur.com/uCy8SfK.pngI’ve tried to play the same exact song by downloading it and using the file’s path as ffmpeg source path and it worked fine.
Here is how i start the ffmpeg process :
return Process.Start(new ProcessStartInfo
{
FileName = "ffmpeg.exe",
Arguments = $"-xerror -i \"{path}\" -ac 2 -f s16le -ar 48000 pipe:1",
UseShellExecute = false,
RedirectStandardOutput = true
});path is the audio url from youtube-dl process. (can also see the url in the error screenshot)
And here is how i get the link from youtube-dl :
Process youtubedl;
ProcessStartInfo youtubedlGetTitle = new ProcessStartInfo()
{
FileName = "youtube-dl",
Arguments = $"--get-title --get-duration --get-url {url}",
CreateNoWindow = true,
RedirectStandardOutput = true,
UseShellExecute = false
};
youtubedl = Process.Start(youtubedlGetTitle);
youtubedl.WaitForExit();url is a normal youtube video link.
I just started working with ffmpeg and youtube-dl so there probably are some stupid rookie mistakes that i’m not aware of. I would appreciate any guidance and/or explanation of what I did wrong.