
Recherche avancée
Médias (1)
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (91)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (5859)
-
ffmpeg rtmp streaming process exit
12 août 2013, par SamsonI'm using ffmpeg to capture jpeg images from an rtmp stream. Here is the command I use :
/usr/local/bin/ffmpeg -threads 4 -i rtmp://..../chat/mp4:<variable>.mp4
-q:v 0.6 -r 15 -s 320x240 /frames/10021237_data/frame-%0999d.jpg
ffmpeg version N-55388-g9386f33 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 8 2013 14:07:38 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
configuration:
libavutil 52. 41.100 / 52. 41.100
libavcodec 55. 24.100 / 55. 24.100
libavformat 55. 13.102 / 55. 13.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
Input #0, flv, from 'rtmp://......./mp4:10021237.mp4':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1.92 tbr, 1k tbn, 40 tbc
Stream #0:1: Audio: nellymoser, 44100 Hz, mono, flt
[swscaler @ 0x1910000] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/frames/10021237_data/frame-%0999d.jpg':
Metadata:
encoder : Lavf55.13.102
Stream #0:0: Video: mjpeg, yuvj420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 15 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
</variable>However after a few minutes I get this line (before the process exits) :
video:5264kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000408%
What exactly is the "muxing overhead" and why is it causing a crash ? Can I solve this or get it some other way (by restarting the process when it exits) ?
EDIT :
Actually it's not a crash. I'm running this command from a PHP CLI when a stream starts :
$command = "/usr/local/bin/ffmpeg -i ".$rtmp." -q:v 0.6 -r 12 -s 320x240 ".__DIR__."/".$dir."/".$naming." >/dev/null 2>/dev/null &";
shell_exec($command);but when one stops streaming all the ffmpeg processes end. Is there a way to make them independent ?
Even opening 2 terminals and running the command (with different rtmp s)in each (for different streams), killing one of them closes the other one also.
Bottom line is : How can I make 2 ffmpeg instances independent so as killing one does not kill the other. Is this behaviour expected ?
-
FFMpeg outputs empty stream/file in C#
15 juin 2017, par Dark0MatterI’m making a bot for discord, and I’m currently trying to use ffmpeg to stream an audio file through voice chat. (Which, many other people succeeded in doing it)
So basically, I’m using libsodium.dll + opus.dll + ffmpeg.exe to turn an mp3 file into a stream using ffmpeg, and output it.
This is my "CreateStream" function which starts ffmpeg and turns the mp3 file into a stream/pipe.
private Process CreateStream(string path)
{
var ffmpeg = new ProcessStartInfo
{
FileName = "ffmpeg.exe",
//Arguments = $"-hide_banner -loglevel panic -i \"{path}\" -ac 2 -f s16le -ar 48000 pipe:1",
Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 pipe:1",
//Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 testingtesting.mp3",
UseShellExecute = false,
RedirectStandardOutput = true,
};
return Process.Start(ffmpeg);
}The commented arguments are the other arguments that I’ve tried. (e.g. the last commented arguments line was an attempt to output it to a file instead of a stream, and the file turned out to be empty)
So basically, my current arguments are
Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 pipe:1"
(where pipe:1 is replaceable by any filename such as test.wav)
and here’s my problem in case you didn’t catch it :
ffmpeg always outputs empty streams/files.
Here’s the output that I got in the console.
https://pastebin.com/zvGgsZZ6So my question is,
Am I using the wrong arguments ?
And if so, what other arguments can I try to get it fixed ?
Tl ;dr : ffmpeg outputs empty data to a stream, and it does the same thing when the pipe is replaced by a .wav/.mp3 file.
EDIT1 : After some time of waiting, I got this : https://pastebin.com/y8rjnsMb
EDIT2 : I searched for more argument combinations that worked for other people and stumbled upon Arguments = $"-i \"path\" -ab 48000 -f mp3 test.mp3",
when I tried writing to test.mp3, it worked, but the quality was low.
Then I tried replacing test.mp3 with pipe:1, but that didn’t work. Help ? -
ffmpeg x11grab moov atom not found
30 mars 2021, par Jintor2 FFMPEG process


(1) generating a ffmpeg x11grab to a .mp4
(2) take the .mp4 and restream it simultaneously to multiple rtmp endpoints


ISSUE the generated file in (1) have this error "moov atom not found"


This is the command that generate (1) :


ffmpeg -re -y -f x11grab -draw_mouse 0 -framerate 30 
-video_size $RESOLUTION -i :$DISPLAY_NUM -c:a aac -c:v libx264 
-movflags +faststart -preset ultrafast -crf 28 -refs 4 -qmin 4 
-pix_fmt yuv420p -filter:v fps=30 file.mp4



in the (2) => when I try to ffmpeg -i file.mp4 output somewhere : I get "moov atom not found" so the (2) can't read or open (1).


What I'm I missing


in (1)
-movflags +faststart
doesn't seem to fix the issue

••••••• EDIT : more details on the context ••••••


I'm using openvidu : webrtc with kurento and coturn.


The record feature creates a .mp4 on the fly as the chat is going on.


To start the recording, there is an API call i can make to my server and it automatically stops when all users leaves the chatroom OR do an other api call to stop. see composed video in this link https://docs.openvidu.io/en/2.17.0/advanced-features/recording/


openvidu have also webhooks.


My problem is not how to stop ffmpeg, but getting FFMPEG to encode while the mp4 or other is being generated "on the fly".


There is 2 options :


OPTION 1 : individual => 1 .webm per camare => this .webm ffmpeg can restream as hls or RTMP => it's working.


OPTION 2 : ** but the issue is with "Composed" video => it's using ffmpeg to x11grab the session... but it's mp4 without moov ato, so ffmpeg don't do anything with this.


see the composed.sh script here
https://github.com/OpenVidu/openvidu/blob/master/openvidu-server/docker/openvidu-recording/scripts/composed.sh