
Recherche avancée
Autres articles (49)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (4427)
-
How to find the offset by which the each video must be delayed to sync them perfectly ?
19 janvier 2023, par PirateApp

Let me explain my use case a bit here


- 

-
We are 4 of us playing the same game


-
3 of us recording mkv using OBS studio at 60 fps, 4th guy recording with some other tool at 30 fps


-
Each mission starts at a cutscene and ends with a cutscene


-
I would like to create a video like the image you see above starting at ending at the same points but the intermediate stuff is basically what each player is doing in the game


-
Currently, I follow a process slightly complicated to achieve this and was wondering if there is an easier way to do this


-
My current process


-
Take a screenshot from one of the videos of the cutscene


















Run a search for this screen inside the other videos using the command below


ffmpeg 
 -i "video1.mkv"
 -r 1
 -loop 1
 -i 1.png
 -an -filter_complex "blend=difference:shortest=1,blackframe=90:32"
 -f null -



- 

-
It gives me a result like this in each video


[Parsed_blackframe_1 @ 0x600000c9c000] frame:263438 pblack:91 pts:4390633 t:4390.633000 type:P last_keyframe:263400






Use the start time from each of the results to create a split screen video using the command below


ffmpeg 
 -i first.mkv
 -i second.mkv
 -i third.mkv
 -i fourth.mp4
 -filter_complex " 
 nullsrc=size=640x360 [base];
 [0:v] trim=start=35.567,setpts=PTS-STARTPTS, scale=320x180 [upperleft]; 
 [1:v] trim=start=21.567,setpts=PTS-STARTPTS, scale=320x180 [upperright];
 [2:v] trim=start=41.233,setpts=PTS-STARTPTS, scale=320x180 [lowerleft]; 
 [3:v] trim=start=142.933333,setpts=PTS-STARTPTS, scale=320x180 [lowerright];
 [0:a] atrim=start=35.567,asetpts=PTS-STARTPTS [outa]; [base][upperleft] overlay=shortest=1 [tmp1];



- 

-
As you can see, it is a complex process and depends completely a lot on what image I am capturing. Sometimes, I find out that stuff is still slightly off in the beginning or end because the images dont match a 100%. My guess is that the frame rate is different for each video not to mention 3 of them are mkv inputs and one is an mp4 input


-
Is there a better way to get the offset by how much each video should be moved to sync them perfectly ?


-
The only way that I can think of is to take 1 video


-
Take a starting timestamp and an ending timestamp, say with a total duration of 30s


-
Take the second video


-
Start from 0 to 30s and compare the frames in both videos, set a score


-
start from 0.001 to 30.001 and compare the frames, set a score


-
start from 0.002 to 30.002 and compare the frames, set a score


-
Basically increment the second video by 0.001 second each time and find out the part with the highest score


-
Any better way of doing this ? I need to run this on 100s if not 1000s of videos
























-
-
how to stop the FFmpeg process programmatically without using Ctrl + C ?
30 septembre 2024, par beeconst shell = require("shelljs");

const processShell = shell.exec(
 `ffmpeg -i "https://pull-hls-f16-va01.tiktokcdn.com/game/stream-2998228870023348312_or4/index.m3u8?expire=1728629296&session_id=000-2024092706481532076B1319E1100113F8&sign=1016b521d08053bc0ae8eddb0881b029" -movflags use_metadata_tags -map_metadata 0 -metadata title="Chill chill kiếm kèo Warthunder" -metadata artist="bacgaucam" -metadata year="2024" -c copy "downloads/bacgaucam-927202491939.mp4" -n -stats -hide_banner -loglevel error`,
 { async: true }
);

setTimeout(() => {
 // processShell.kill();
 process.exit();
}, 20000);



my video only works when I use Ctrl+C to stop it. I’ve tried using
process.exit()
,.kill(pid, "SIGINT")
, and the.kill()
method from theshell.exec()
ffmpeg()
of fluent-ffmpeg orspawn()
of child_process reference, but none of them work

If you want to test it directly, please message me to get a new live url in case it expires (https://t.me/ppnam15) or clone this :
https://github.com/loo-kuhs/tiktok-live-downloader


can anyone help ? Thanks !


-
`ffmpet -f concat` don't work when all input streams appear to have the same spec
9 mars 2023, par RoyMy
ffmpeg
command :

ffmpeg -safe 0 -f concat -i list.txt -c copy out.mp4



My 1st input file :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Applications\ffmpeg_6.0_full\a.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:04.97, start: 0.000000, bitrate: 40 kb/s
 Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 27 kb/s, 30 fps, 30 tbr, 30k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264



My 2nd input file :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Applications\ffmpeg_6.0_full\b.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp41isom
 creation_time : 2023-03-08T06:47:13.000000Z
 artist : Microsoft Game DVR
 title : PUBG: BATTLEGROUNDS
 Duration: 00:10:00.16, start: 0.000000, bitrate: 20885 kb/s
 Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 20739 kb/s, 30 fps, 30 tbr, 30k tbn (default)
 Metadata:
 creation_time : 2023-03-08T06:47:13.000000Z
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 131 kb/s (default)
 Metadata:
 creation_time : 2023-03-08T06:47:13.000000Z
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]



The above command outputs some warning signals :


[mov,mp4,m4a,3gp,3g2,mj2 @ 0000025239902d40] Auto-inserting h264_mp4toannexb bitstream filter
[mp4 @ 00000252396fe5c0] Non-monotonous DTS in output stream 0:1; previous: 218112, current: 150024; changing to 218113. This may result in incorrect timestamps in the output file.
...
a lot of them
...
frame=25992 fps=21754 q=-1.0 Lsize= 1519621kB time=00:14:49.39 bitrate=13996.8kbits/s speed= 744x
video:9649kB audio:1519216kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown



The resultant video can play the first part of the video correctly, then the video players either skips directly to the end of the video (MPC-HC), or don't render anything at all while timer passes as normal (VLC).


My impression of the concat is that it requires all videos to have the same spec, which I think my input achieved (all the "Steam #0:0", etc, line matches). I only see the following difference, which I assumed that should be okay :


- 

- Metadata are different both for the whole input (e.g. "major_brand") and for each stream (e.g. "encoder"). I assumed that metadata won't affect the processing.
- The order of video/audio streams are different in the two inputs : the 1st input file has audio then video ; the 2nd input file has video then audio. I assumed that ffmpeg knows the difference and won't concat a video stream to an audio stream.






The full output of the command can be found in this pastebin : https://pastebin.com/Z5q97Uyg