
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (96)
-
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 (...) -
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 (6608)
-
Video overlay of several network inputs using ffmpeg
1er juin 2018, par Hristo IvanovI am writing my first program using the
FFMPEG
libraries, unfortunately it’s not a simple one.What I need is to :
- capture several network inputs(udp).
- demux the inputs.
- overlay the video streams.
- mix the audio(or some other logic).
- encode the resulting streams.
- remux the streams and write the result to file.
For now I am playing with the
ffmpeg.exe
tool trying achieve this functionality. The command I have looks like this :.\ffmpeg.exe -threads auto -y -i input0 -i input1 \
-filter_complex "[0:v]scale=1920x1080[v0];[1:v]scale=480x270[v1];[v0][v1]overlay=1440:810[v2]" \
-map [v2] -map 0:a -c:v libx264 -preset ultrafast -c:a copy output.mp4When
input0
andinput1
are files the resulting output is correct, on the other hand, when the inputs are udp streams the resulting output is not correct, the video freezes most of the time.The file inputs are generated from the udp streams, using the following command :
.\ffmpeg.exe -threads auto -y -i "udp://@ip:port" -c copy -f mpegts input1.mpg
Question 1
.
Why is the above command not producing good ouput for udp streams ? What are the differences between the original stream and the dump of that stream forffmpeg.exe
.Question 2
.
Is there some argument/s that can fix the command ?Question 3
.
What kind of logic/algorithm is needed to correctly overlay two network streams. -
FFmpeg, decode mp3 packet after sending by network
4 août 2022, par StanislavGood day, everyone.

Working with FFmpeg.

And have some issues with decoding, I cannot find in docs and forums.
The code is not simple, so I will try to explain firstly in words, may be someone really skilled in ffmpeg will understand the issue by words. But if the code really helps, i will try to post it.

So, firstly in general, what i want to do. I want to capture voice, encode to mp3, get packet, send to network, on the other side : accept the packet, decode and play. Why not to use ffmpeg streaming ? Well, because this packet will be modified a little bit, and may be encoded/crypted, so ffmpeg has no functions to do this, and i should do it manually.

Well, what i managed to do now. Now i can encode and decode via file. This code works fine, without any issues. So generally i can encode and decode mp3, and play, so i assume that my code for encoding/decoding works fine.

So, than i just change code, making no saving to file, and send packets via network instead.

This is the method, standard, well, i use to send packet to decoder on the accepting side.

result = avcodec_send_packet( codecContext, networkPacket );
 if( result < 0 ) {
 if( result != AVERROR(EAGAIN) ) {
 qDebug() << "Some decoding error occured: " << result;
 return;
 }
 }



networkPacket is the AVPacket restored from network.


AVPacket* networkPacket = NULL;
 networkPacket = av_packet_alloc();
 ...



And that is the way i restore it.


void FFmpegPlay::processNetworkPacket( MediaPacket* mediaPacket ) {

 qDebug() << "FFmpegPlay::processNetworkPacket start";

 int result;

 AVPacket* networkPacket = NULL;
 networkPacket = av_packet_alloc();

 networkPacket->size = mediaPacket->data.size();
 networkPacket->data = (uint8_t*) malloc( mediaPacket->data.size() + AV_INPUT_BUFFER_PADDING_SIZE );
 memcpy( networkPacket->data, mediaPacket->data.data(), mediaPacket->data.size() );
 networkPacket->pts = mediaPacket->pts;
 networkPacket->dts = mediaPacket->dts;
 networkPacket->flags = mediaPacket->flags;
 networkPacket->duration = mediaPacket->duration;
 networkPacket->pos = mediaPacket->pos;
 ...



And there i get -22, EINVAL, invalid argument.
Docs tell me :


AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush



Well, my codec really opened, this is decoder, and this is first call, so i think that flush is not required. So i assume, that issue is in packet and codec setup. I also tried different flags, and always get this error. Codec just doesn't want to accept packet.


So, now i have explained the situation.

And question is : Is there any special options or flags for ffmpeg mp3 decoder to implement what is explained above ? Which one of them i should change ?

Upd.
After some testing, i decided to make more clear test and check if i can decode immediately after encoding, without network, and it looks like i can do that.
So it looks like in network case the decoder should be initialized somehow special, or have some options.
Well, i'm dealing initialization by copying AVCodecParameters from original and sending them by network. Maybe i should change them some special way ?


I'm stuck on this one. And have no idea how to deal with it. So any help is appreciated.


-
Video overlay of several network streams using ffmpeg
24 avril 2018, par Hristo IvanovI am writing my first program using the
FFMPEG
libraries, unfortunately it is not a simple one.What I need is to :
- capture several network inputs(udp).
- demux the inputs.
- overlay the video streams.
- mix the audio(or some other logic).
- encode the resulting streams.
- remux the streams and write the result to file.
For now I am playing with the
ffmpeg.exe
tool trying achieve this functionality. The command I have looks like this :.\ffmpeg.exe -threads auto -y -i input0 -i input1 \
-filter_complex "[0:v]scale=1920x1080[v0];[1:v]scale=480x270[v1];[v0][v1]overlay=1440:810[v2]" \
-map [v2] -map 0:a -c:v libx264 -preset ultrafast -c:a copy output.mp4When
input0
andinput1
are files the resulting output is correct, on the other hand, when the inputs are udp streams the resulting output is not correct, the video freezes most of the time.The file inputs are generated from the udp streams, using the following command :
.\ffmpe_Last.exe -threads auto -y -i "udp://@ip:port" -c copy -f mpegts input1.mpg
Question 1
.
Why is the above command not producing good ouput for upd streams ? What are the differences between the original stream and the dump of that stream forffmpeg.exe
.Question 2
.
Is there some argument/s that can fix the command ?Question 3
.
What logic/algorithm is needed to correctly overlay two network streams.