
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (84)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (6036)
-
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 concatenated file does not play as expected
28 janvier 2018, par TrewqI am trying create a video by concatenating in this order :
video1.mp4
&video_from_static_image.mp4
&video1.mp4
video1.mp4
is a simple video file.video_from_static_image.mp4
was created from thea.png
image like this :ffmpeg -y -framerate 25 -f image2 -loop 1 -i a.png -c:v libx264 -profile:v main -pix_fmt yuv420p -t 2 -r 25 video_from_static_image.mp4
I create the final concatenated file through this command :
ffmpeg -y -f concat -safe 0 -i mylist.txt -c copy final_concat.mp4
I get the following message during the concat process :
[mp4 @ 0x7fee6b815e00] Non-monotonous DTS in output stream 0:0; previous: 120678, current: 65722; changing to 120679. This may result in incorrect timestamps in the output file.
The complete output when running the above command is here
When I play
final_concat.mp4
it has problems with video_from_static_image.mp4 and it seems to skip it (and other variations resulted in playing for a short while). I’ve tried a bunch of things, but I believe they all point to the DTS error above.BTW, all the video files are pretty small (< 1MB). Here are details about the version I am using :
$ ffmpeg -version
ffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.31)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100 -
FFmpeg : Frame sizes of the generated video are extremely larger than the expected [closed]
8 février 2021, par bbasaranI am recording frames (screen buffer) as NumPy arrays during the game which runs on the resolution of "400x225". Each frame array is a size of 270.1 kB.


After saving those frames, I create an mp4 file with the following bash command (The game runs in 35 FPS (frames/second)) :


ffmpeg -r 35 -f image2 -i frame%05d.png -vcodec libx264 -crf 1 video.mp4



Then I have used a tool to generate a CSV file of frame data from the video created with the command above. The output is here below. The weird this is that, if we sum those first 35 frames (video was recorded with "-r 35" parameter because game runs in 35 FPS), we get approximately 18k kbit.


18k kbit/sec bitrate is super high for a 400x225 video. What am I doing wrong while generating the video ? I appreciate any help, thanks !