
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (106)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)
Sur d’autres sites (11709)
-
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.