
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (35)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6464)
-
Python subprocess.Popen + ffmpeg breaks terminal input
16 décembre 2020, par Barney SuitI was writing a module to create random screenshots from a video and used
subprocess.Popen
to run multiple commands in parallel but this leads to terminal refusing from showing any input once the python program is finished running. But it still accepts most inputs given from the keyboard it just doesn't display it.

Only if I type the
reset
command terminal starts working fine
This happened on ssh with putty and other ssh clients even ssh with powershell on windows and directly running on terminal with VNC

But without ssh directly running the same command on windows ssh works fine and and inputs are visible


here's a gif example for whats happening



and code to replicate it


#!/usr/bin/env python3.8
from subprocess import Popen

def create_screenshots():

 commands = ['ffmpeg -hide_banner -loglevel panic -ss 329 -i "/home/user/file.mkv" -y -vframes 1 "/home/user/file.329.frame.png"',
 'ffmpeg -hide_banner -loglevel panic -ss 312 -i "/home/user/file.mkv" -y -vframes 1 "/home/user/file.312.frame.png"',
 'ffmpeg -hide_banner -loglevel panic -ss 533 -i "/home/user/file.mkv" -y -vframes 1 "/home/user/file.533.frame.png"',
 'ffmpeg -hide_banner -loglevel panic -ss 444 -i "/home/user/file.mkv" -y -vframes 1 "/home/user/file.444.frame.png"',
 'ffmpeg -hide_banner -loglevel panic -ss 411 -i "/home/user/file.mkv" -y -vframes 1 "/home/user/file.411.frame.png"',
 'ffmpeg -hide_banner -loglevel panic -ss 413 -i "/home/user/file.mkv" -y -vframes 1 "/home/user/file.413.frame.png"']
 screenshot_files = []
 processes = [Popen(command, shell=True) for command in commands]
 for process in processes:
 process.wait()
 
 return screenshot_files


create_screenshots()



-
Programmatically using terminal in linux escapes my command
21 février 2023, par David ChavezUsing nodeJS exec function which runs my command from a new process overwrites my backslashes which makes my command invalid. How can I prevent this or use a workaround ?


I need the final command to look like this :

...drawtext=text='timestamp \: %{pts \: localtime...


With that code,
\:
is escaped into:
.

Using\\:
is escaped into\\:
while I'm expecting\:


How do I get
...drawtext=text='timestamp \: %{pts \: localtime...
to be ran ?

// This command works if pasted directly into terminal
const ffmnpegCode = `ffmpeg -i /path/input.mp4 -y -r 25 -ss 0 -to 124 -c:v libx264 -c:a aac -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,drawtext=text='timestamp \: %{pts \: localtime \: 1665679092.241 \: %m-%d-%Y %H\\\\\:%M\\\\\:%S}': x=(w-text_w-10): y=(h-text_h-5): fontsize=45: fontcolor=white@0.9: box=1: boxcolor=black@0.6: fontfile='/path/OpenSans-Regular.ttf'" /path/output.mp4`
const encode = async ffmpegCode => {
 try {
 await execPromise(ffmpegCode);
 return 200
 } catch (err) {
 console.log(err)
 }
}



JS adds extra
\
which breaks my command

-
C run linux shell command(fmpeg) 10x slower than typing directly in terminal
14 novembre 2014, par dadylonglegsCLOSED
I’m writing an application that execute a linux shell command (ffmpeg) from my C code. Such as :
char command[2000];
sprintf(command, "ffmpeg -i %s/%s -r 1 -vf scale=-1:120 -vframes 1 -ss 00:00:00 %s.gif", publicFolder, mediaFile, mediaFile);
system(command);To extract video thumbnail from a specific video. But the strange that it is too much slower when executing shell command form C compare to typing directly to the terminal. I have no idea about this.
Can anybody help me pls ?. Thanks in advance.