
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 (112)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)
Sur d’autres sites (10598)
-
Publishing an RTSP stream from my IP camera to a remote MediaMTX / RTSP Simple Server using FFmpeg and Azure [closed]
28 janvier 2024, par cmdUsing
FFmpeg
, I am trying to publish theRTSP
stream from my IP camera to an Azure VM running a MediaMTX instance https://github.com/bluenviron/mediamtx. My intention is for the stream to be accessible from other remote connections by connecting to the VM.

I was able to setup a local
MediaMTX
server on my laptopm, and publish the stream using thisFFmpeg
command :

ffmpeg -i rtsp://<camera username="username">:<camera password="password">@<camera local="local" ip="ip">:554 -c:v copy -c:a copy -f rtsp rtsp://<laptop local="local" ip="ip">:8554/stream/mystream
</laptop></camera></camera></camera>


This worked fine, as I was able to connect to the
MediaMTX
server inVLC
player to view the stream. However, I have setup anAzure VM
running Windows 10, and run the sameMediaMTX
instance on it. I have attempted to publish theRTSP
stream from the IP camera using the same command, but with the Laptop IP replaced with the address of theVM
, but this doesn't work.

I have disabled the Windows Firewall on my laptop and the VM, but the stream can still not be published. I have also tried the same approach by running the
MediaMTX
server on my friend's computer on his network, and adding the necessary port forwarding rules to his router. I am unable to edit any rules on the router where I am living however.

What else might be causing this issue, and is there any way to publish the IP camera's RTSP to a remote server where it could then be read ?


-
FFMPEG : How do I maintain the aspect ratio of various images used in a slideshow ?
7 mars 2019, par Kimberly WI’m just starting out with FFMPEG and trying to use it to make a slideshow. Ideally, I’d like to get it where I can input an arbitrary number of images, and each image is shown for (example) 2 seconds and them moves on to the next. Each image also maintains it’s original aspect ratio and is not stretched in any way (they can of course be scaled up/down to fit the resolution of the output video).
I started off with a basic command like the following.
ffmpeg -r 1/9 -pattern_type glob -i "*.jpg" -c:v libx264 -y -pix_fmt yuv420p -vf scale="720:trunc(ow/a/2)*2" out.mp4
In this example, the first image is a wide (landscape) image and some of the others are tall (portrait) images. The portrait ones get squished in output video. Also the images aren’t displayed for equal amount of times.
A couple of problems I’ve been running into :
- There’s an error for
width not divisible by 2
, because the images can be literally any random width. To resolve that, I’ve been trying various-vf
options I’ve found through googling (like the one above). They take care of the error, but don’t solve my aspect ratio issue. - All the images seem to be stretch or squished to fit the dimensions of the first input image. In reality, the images are of various different dimensions (like frames in a comic book). There’s no pattern to them.
Is there a
ffmpeg
command for just taking images and creating as slideshow, while preserving their original aspect ratios ? - There’s an error for
-
av_read_frame() in ffmpeg returns -5 while receiving UDP data [closed]
26 février 2024, par zttangI'm working on an app which is using ffmpeg lib. There is a living source keep sending TS stream thru udp. Then I allocated a thread use ffmpeg receive the TS packets. the code for this thread is like :


void* av_source_thread(void *data) {
 char udp_url[50];
 snprintf(udp_url, sizeof(udp_url), "udp://127.0.0.1:12345");
 AVDictionary* options = NULL;
 av_dict_set(&options, "timeout", "500000", 0); // timeout=0.5s
 av_dict_set(&options, "overrun_nonfatal", "1", 0);
 av_dict_set(&options, "fifo_size", "278876", 0); //50MB

 AVFormatContext *ffmpeg_source = avformat_alloc_context();
 while (running) {
 if (avformat_open_input(&ffmpeg_source, udp_url, NULL, &options) != 0) {
 continue;
 } else {
 break;
 }
 }
 // Some code fill codec type and alloc context here

 av_format_inject_global_side_data(ffmpeg_source);
 AVPacket *packet = av_packet_alloc();
 while (running) {
 ret = av_read_frame(ffmpeg_source, packet);
 if (ret < 0) {
 char errbuf[AV_ERROR_MAX_STRING_SIZE];
 av_strerror(ret, errbuf, AV_ERROR_MAX_STRING_SIZE);
 usleep(10000);
 log("av_read_frame failed, Exit, %s, %d", errbuf, ret);
 continue;
 }
 putPkt2Q(packet); 
 }
 av_packet_free(&packet);
 avformat_close_input(&ffmpeg_source);
 av_dict_free(&options);
 return nullptr;
}



Then the packets will be sent to Q and other thread will process them. but when I run the program, the av_read_frame will return -5(I/O error) from time to time. and once it returned -5, it can not recover unless I restart this thread.


since this is a real time source, so lost some frames are acceptable, I just want to know how to avoid this kind of issue or how to recover without restart the whole thread. I tried to increase the fifo_size in options, but it does not work.