
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (13)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)
Sur d’autres sites (2960)
-
What is the optimal way to synchronize frames in ffmpeg c/c++ ?
16 septembre 2022, par TurgutI made a program that read's n number of video's as input, draws those videos to the GLFW window and finally encodes it all as a singular video output. The problem is frames of each video in question can be different, it's dependent on the user's input.


For example : the user can put two video's which has an FPS of 30 and 59, and can want an output 23,797. The problem is those video's are not in sync with each other, thus on the output we can see that the input video's are either faster or slower.


Duration of each video is also dependent on the input. For example, in accordance to the previous example, the first input might be 30 second and the second can be 13 second, while the output is 50 seconds.


I mostly read the frames similar to a moving png rather than a solid video since there are no iframe and bframes. There are just data I get from the GLFW window.


As an example, let's say we give one video as input which has an FPS of 30 and duration of 30, and our output has an FPS of 23.797 and duration of 30. I have 2 function's
skip_frame
andwait_frame
which respectively either read's a frame twice so we skip a frame or don't read the frame on that iteration. Those function's are used depending on the situation, whether it's output < input or output > input.

Here is what my code roughly looks like :


while(current_time < output_duration){
 for(auto input_video: all_inputs){
 for(int i = 0; i < amount_to_read_from_input(); i++){
 frame = input_video.read_frame();
 }
 }
 
 GLFW_window.draw_to_screen(frame);

 encoder.encode_one_video_frame(GLFW_window.read_window());
}



Basically
skip_frame
andwait_frame
are both insideamount_to_read_from_input()
and return 2 or 0 respectively.

So far I have tried multiplying duration with fps for both input and output. Then getting the result of their subtraction. Going from our previous example we get 900 - 714 = 186.
Then I divide the result to the output fps like so : 714 / 186 = 3.8. Meaning that I have to skip a frame every 3.8 iterations. (I skip a frame every 3 iterations and save the residual 0.8 for the next iter.)


But it's still a seconds or two behind. (Like it ends at 29 seconds for a 30 second output.) and the audio is out-of-sync. Ffmpeg handles my audio so there are no errors on that part.


Also seen this question but I don't think I can utilize ffmpeg's function's here since im reading from a glfw window and it comes down to my algorithm.


The problem is what is the math here ?


What can I do to make sure these frames are stabilized on almost every input/output combination ?


-
FFMPEG RTMP STREAM RECORDING TIMEOUT
11 novembre 2020, par abreski[SOLVED] — solution in FINAL EDIT
i am recording an rtmp livestream with ffmpeg, and looking to add a flag that will automatically stop processing the moment new data stops arriving.


If i start and stop the script (stop by killing the process on demand), everything is fine, recording is saved and can be played.
However, when the stream is stopped from the source without a manual call to STOP, the script will still run for a bit and the resulting file will be corrupted (tested with manual stop call - works , and with stopping the stream before the recording , simulating browser/tab close or disconnect - fails)


the command i'm running


$command = "ffmpeg -i {$rtmpUrl} -c:v copy -c:a copy -t 3600 {$path} >/dev/null 2>/dev/null &";
$res = shell_exec($command)



i tried adding -timeout 0 option before and after the input like this


$command = "ffmpeg -timeout 0 -i {$rtmpUrl} -c:v copy -c:a copy -t 3600 {$path} >/dev/null 2>/dev/null &"; 



and


$command = "ffmpeg -i {$rtmpUrl} -c:v copy -c:a copy -timeout 0 -t 3600 {$path} >/dev/null 2>/dev/null &";



but no improvement.


What am i missing here ? is there any way to automatically stop the script when new data stops ariving from the livestream (meaning that stream is stopped and recording should stop aswell).


Note $rtmpUrl and $path have been checked and everything works fine as long as the script is stopped before the livestream ends.


Any suggestions are highly appreciated


LATER EDIT : realised timeout was set in the wrong place, added it first but result was still the same, so still looking for any suggestions


$command = "timout 0 ffmpeg -i {$rtmpUrl} -c:v copy -c:a copy -t 3600 {$path} >/dev/null 2>/dev/null &";



FINAL EDIT
in case someone finds this thread looking for a solution in a similar case,
solved, timeout was not what i was looking for, instead using the
-re
flag fixed it for us.
Now script stops when no more new frames come in

$command = "ffmpeg -re -i {$rtmpUrl} -c:v copy -c:a copy -t 3600 {$path} >/dev/null 2>/dev/null &";



-
Output a video with "slide up" transition using more than 100 images in FFMPEG ?
9 juillet 2021, par Joseph Ladera FugataI have more than a hundred images of the same size and format that my company wants to display at the big 9:16 (rotated 16:9) screen outside the front gate. It's supposed to be easy but they required me to have it slide from top to bottom, meaning that it should look like a smooth auto scroll effects. I searched here and there but no luck.


I have tried xfade like this :


ffmpeg -loop 1 -i input.txt -filter_complex
"xfade=transition=slideup:duration=10:offset=0,format=yuv420p" output.mp4



It didn't do anything just a bunch of error referring to the inputs. Which is supposed to be just 2 images in the first place.


The next thing I tried was using Concat from someone named @Gyan at his reply HERE and here's my version of the code :


ffmpeg -y -f concat -safe 0 -i input.txt
-vf tile=1x%img_count%,loop=%_my_loop_count_var%:1:0,
crop=iw:ih/%img_count%:0:clip((t-%_start_time%)/%sec_per_img%*ih/%img_count%\,0\,ih*%img_count_minus_one%/%img_count%)
-r 25 -c:v libx264 -preset ultrafast output.mp4



When I played with it, it gives a different output even do the image are all the same dimensions.


I found someone on youtube used this but it is using bash and I am on windows. Unless someone here can convert it to a batch script would be great. I look into it and it seems like he's just V-stacking them kinda like what I did but there's more. I know I could have gone through win bash but I doubt the script will run on a non-Unix environment just by having bash, and I'm not yet familiar with Cygwin either.


I also did tried other options posted by others here, I just forgot to bookmark them, but non of them works on more than a hundred images.


I love to hear a response if anyone can help.