
Recherche avancée
Autres articles (93)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (11334)
-
Avoid using the term "file" and prefer "url" in some docs and comments
5 décembre 2016, par Michael Niedermayer -
FFmpeg cannot find the file which is in the same directory as the python script [duplicate]
8 octobre 2023, par N_ViofileBoth of the input and output are in the folder, but python does not know where they are ?


import subprocess
import pathlib

def convert_video_to_mp4(input_file, output_file):
print(pathlib.Path(__file__).parent.resolve())
ffmpeg_cmd = [
"ffmpeg"
"-i", input_file,
output_file
]

 try:
 subprocess.run(ffmpeg_cmd, check=True)
 print("Successfully converted")
 except subprocess.CalledProcessError as e:
 print("Conversion failed!")

convert_video_to_mp4("Media.ts", "video.mp4")



First I was trying to convert a file on a website to mp4, that did not work, So I tried downloading the file to see if it would work and it still did not work.


Full Error


C:\Users\viofi\PycharmProjects\FFMPEGSERVER\venv\Scripts\python.exe C:\Users\viofi\PycharmProjects\FFMPEGSERVER\ffmpeg.py 
C:\Users\viofi\PycharmProjects\FFMPEGSERVER
Traceback (most recent call last):
 File "C:\Users\viofi\PycharmProjects\FFMPEGSERVER\ffmpeg.py", line 21, in <module>
 convert_video_to_mp4("Media.ts", "video.mp4")
 File "C:\Users\viofi\PycharmProjects\FFMPEGSERVER\ffmpeg.py", line 15, in convert_video_to_mp4
 subprocess.run(ffmpeg_cmd, check=True)
 File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 548, in run
 with Popen(*popenargs, **kwargs) as process:
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1026, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1538, in _execute_child
 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

Process finished with exit code 1
</module>


-
FFMPEG batch file to re-encode movies that don't contain string "h265" in file name ?
11 juillet 2017, par gregmI have a batch file that uses FFMPEG to re-encode movies to h265 to reduce file size. I have a few videos that I previously re-encoded over the past couple of years. I want to skip those and at the moment I just manually move them from subfolders before running my script, but this is getting tedious. I’d like to add a command to my batch file that skips those files automatically. All files that have been re-encoded in the past have h265 appended before the file extension. My batch file looks like this, but it isn’t skipping the files with h265 in them :
for %%a in ("*.*") do findstr /v /c:"h265" "%%a" >nul && \
ffmpeg -i "%%a" -c:v libx265 -preset ultrafast \
-x265-params [parameters] -c:a copy "%%~na.h265.mp4"
pauseWhat do I need to change to get this to work ?