
Recherche avancée
Autres articles (91)
-
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 (...) -
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 -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (9809)
-
Download a part of youtube video using a powershell script
26 octobre 2024, par Nguyễn Đức MinhI'm writing this Powershell script :


$URL = "https://www.youtube.com/watch?v=KbuwueqEJL0"
$from = 00:06:15
$to = 00:09:17

$cmdOutput = (youtube-dl --get-url $URL) 

ffmpeg -ss $from -to $to -i -ss $from -to $to -i output.mkv



This script's purpose is to download a part of a Youtube video. I've set the variable $URL to specify the Youtube URL, while
$from
and$to
is the start and end time of the part I want to download.

$cmdOutput
is used to output the stream URL. The output would have two lines : the first one is the URL for the video stream, while the second one is the audio stream URL.

Currently, I don't know how to use the output as a variable and specify the line number of $cmdOutput to put it into the correct stream. I guess
and
would be replaced by something like
$cmdOutput[line 1]
, and$cmdOutput[line 2]
, though I know that those are incorrect.

I've consulted this answer, and it is handy for me to write this script. I've also read Boris Lipschitz's answer on how to do the same thing with Python, but his answer does not work.


In that script, the
-ss
flag inputs the seeking point, and the-t <duration></duration>
flag tells FFmpeg to stop encoding after the specified duration. For example, if the start time is 00:02:00 and the duration is 00:03:00, FFmpeg would download from 00:02:00 to 00:05:00, which is not the expected outcome. For some reason, his Python script skips the first 5 seconds of output, even if I replace the-t
flag with-to
. I've tried to edit his script, but it does not work unless you explicitly specify the time for both video and audio stream, as well as their respective stream URL.

-
can not split video into smaller part
13 juillet 2021, par davidI want to split some videos into 2 sec parts and for this aim, I am trying to use the following code :


ffmpeg -i invid.264 -threads 3 -vcodec copy -f segment -segment_time 2 cam_out_h264%04d.264



but it cannot work properly and it produces this error in the command line :


[h264 @ 000001b4caf5f580] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, h264, from 'output.264':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1200k tbn, 60 tbc
[segment @ 000001b4cb0e3600] Opening 'cam_out_h2640000.h264' for writing
Output #0, segment, to 'cam_out_h264%04d.h264':
 Metadata:
 encoder : Lavf58.77.100
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[segment @ 000001b4cb0e3600] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame= 600 fps=0.0 q=-1.0 Lsize=N/A time=00:00:19.93 bitrate=N/A speed= 234x
video:19039kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown



what is the problem ? this video has 600 frames and it is 19.93 sec. hence, it should not have any problem for splitting into 2 sec videos.do you know what is the problem ? please help me with this issue.


-
Detect scene change on part of the frame
16 juin 2021, par user18130814200115I have a video file of an online lecture cosisting of a slideshow with audio in the background.

I want to save images of each slide as well as the timestamp of that slide.
I do this using the scene and metadata filters :

ffmpeg -i week-01.mp4 -filter_complex "select='gt(scene,0.011)',metadata=print:file=frames/time.txt" -vsync vfr frames/img%03d.jpg



This works fine exept for one thing, there is a timer onscreen on the right in the video file.
If i set the thershold small enough to pick up all the slide changes, it also picks up the timer changes.


So here is my question, Can I ask ffmpeg to :


- 

- analize part of the frame (only the right side till roughly 75% to the left).
- Then, on detecting a scene change in this area, save the entire frame and the timestamp.






I though of making a script that


- 

- crops the video and saves it alongside the origional
- analize the cropped video for scene changes and save the timestamps
- extract the frames from the origional video using the timestamps








Is there a better/faster/shorter way to do this ?
Thanks in advance !