Recherche avancée

Médias (0)

Mot : - Tags -/alertes

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (95)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (6462)

  • FileNotFoundError running ffmpeg on Windows from Python subprocess

    4 avril 2023, par mahmoudamintaha

    this is my code to convert mkv to mp4
i created both assets and results folders
i added ffmpeg to user and enviroment variables path

    


    import os
import subprocess

if not os.path.exists("assets"):
    raise Exception("Please create and put all MKV files in assets folder. ")

mkv_list = os.listdir("assets")

if not os.path.exists("results"):
    os.mkdir("results")

for mkv in mkv_list:
    name, ext = os.path.splitext(mkv)
    if ext != ".mkv":
        raise Exception("Please add MKV files only!")

    output_name = name + ".mp4"

    try:
        subprocess.run(
            ['ffmpeg', '-i', f"assets/{mkv}", "-codec", "copy", f"results/{output_name}"], check=True
        )

    except:
        raise Exception(
            "Please, download, install and Add the path FFMPEG to Enviroment variables ")

print(f"{len(mkv_list)} video/s have ben converted")
os.startfile("results")


    


    i get this error messages when i run it

    


    ---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[1], line 20
     19 try:
---> 20     subprocess.run(
     21         ['ffmpeg', '-i', f"assets/{mkv}", "-codec", "copy", f"results/{output_name}"], check=True
     22     )
     24 except:

File c:\Users\HP\anaconda3\envs\Projectvenv\Lib\subprocess.py:546, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
    544     kwargs['stderr'] = PIPE
--> 546 with Popen(*popenargs, **kwargs) as process:
    547     try:

File c:\Users\HP\anaconda3\envs\Projectvenv\Lib\subprocess.py:1022, in Popen.__init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize, process_group)
   1019             self.stderr = io.TextIOWrapper(self.stderr,
   1020                     encoding=encoding, errors=errors)
-> 1022     self._execute_child(args, executable, preexec_fn, close_fds,
   1023                         pass_fds, cwd, env,
   1024                         startupinfo, creationflags, shell,
   1025                         p2cread, p2cwrite,
   1026                         c2pread, c2pwrite,
   1027                         errread, errwrite,
   1028                         restore_signals,
   1029                         gid, gids, uid, umask,
   1030                         start_new_session, process_group)
   1031 except:
   1032     # Cleanup if the child failed starting.

File c:\Users\HP\anaconda3\envs\Projectvenv\Lib\subprocess.py:1491, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session, unused_process_group)
   1490 try:
-> 1491     hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
   1492                              # no special security
   1493                              None, None,
   1494                              int(not close_fds),
   1495                              creationflags,
   1496                              env,
   1497                              cwd,
   1498                              startupinfo)
   1499 finally:
   1500     # Child is launched. Close the parent's copy of those pipe
   1501     # handles that only the child should have open.  You need
   (...)
   1504     # pipe will not close when the child process exits and the
   1505     # ReadFile will hang.

FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Exception                                 Traceback (most recent call last)
Cell In[1], line 25
     20         subprocess.run(
     21             ['ffmpeg', '-i', f"assets/{mkv}", "-codec", "copy", f"results/{output_name}"], check=True
     22         )
     24     except:
---> 25         raise Exception(
     26             "Please, download, install and Add the path FFMPEG to Enviroment variables ")
     28 print(f"{len(mkv_list)} video/s have ben converted")
     29 os.startfile("results")

Exception: Please, download, install and Add the path FFMPEG to Enviroment variables 


    


    I checked adding ffmpeg to environment variable and it's added
I used jupyter to know the specific line the doesn't work and it's the subprocess line

    


  • How can I run an ffmpeg command in a python script ?

    24 juin 2022, par Nexion21

    I want to overlay a transparent video over top of an image using ffmpeg and python

    


    I am able to do this successfully through terminal, but I cannot get ffmpeg commands to work in python. The following command produces the result that I want in terminal when I am in the directory with the files there.

    


    ffmpeg -i head1.png -i hdmiSpitting.mov -filter_complex "[0:v][1:v] overlay=0:0" -pix_fmt yuv420p -:a copy output3.mov


    


    In python, my code is simple :

    


    import os
import subprocess
command = "ffmpeg -i head1.png -i hdmiSpitting.mov -filter_complex \"[0:v][1:v] overlay=0:0\" -pix_fmt yuv420p -c:a copy output3.mov"
subprocess.call(command,shell=True)


    


    The code runs, there is no indication of an error, but no output is produced.

    


    What am I missing here ?

    


  • Create Video Thumbnail of All Files in a Directory via FFmpeg and PHP

    2 février 2012, par Hashid Hameed

    I have searched all over the Google and StackOverFlow, but still did not find a solution for this.

    I want to generate video thumbnail of all mp4 video files in a directory and name the thumbnails as "filename.mp4".jpg

    I have ffmpeg and ffmpeg-php installed on my server. I also succeeded in creating thumbnails of one file at a time.

    So this is the situation, I have a directory named uploads which has lots of mp4 videos.
    Now, when I run the script, thumbnail of size 100x100 shoud be created automatically and placed in another folder "skrin". Eg : xxx.mp4 should have xxx.mp4.jpg has the thumb name.

    IMPORTANT : My filenames have spaces, single quotes, brackets etc in their file names. So the script should be able to handle this.

    Could some one help me ? I use the following shell command in php using exec to generate thumb of an individual video.

    exec("/usr/local/bin/ffmpeg -itsoffset -105 -i 'xxx haha.mp4' -vcodec mjpeg -vframes 1 -an -f rawvideo -s 100x100 'xxx haha.mp4.jpg'");