
Recherche avancée
Médias (1)
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (49)
-
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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
Sur d’autres sites (7110)
-
Why is there not enough RAM when processing video in fmpeg ?
26 mai 2022, par Mikhail EliseevI run ffmpeg through .bat file , which overlays the HUD video on top of the other (overlay). I saw this method here : FFmpeg - Overlay one video onto another video ?


When you run the batch file, ffmpeg starts "rendering it" and in 1-2 minutes my computer begins to show terrible lags. In the task manager I see that 12 GB of the available 16 GB of RAM is gobbled up.


Code :


@echo off
setlocal EnableExtensions DisableDelayedExpansion
for %%i in (*.mov *.mp4 *.mts) do (
 md "result_%%~ni"
ffmpeg -i "%%i" -i "res/intro 2018.mp4" -filter_complex "[1:v]setpts=PTS-10/TB[a]; [0:v][a]overlay=enable=gte(t\,5):shortest=1[out]" -map [out] -map 0:a -c:v libx264 -crf 18 -pix_fmt yuv420p -c:a copy -y result_%%~ni\%%~ni%%03d.mp4

) 
pause



After 2 minutes, the error that the memory is not enough :



Here are the specs of the computer :



This is the size of the swap file (by system choice) :



Example of video-file :




-
FFMPEG File Output is Still in Use By a Process
6 mai, par Tyler BaconI am trying to complete this part of my program. In this section, I am trying to speed up or slow down a video based on a factor variable. Once it's done, I use moviepy to turn it into a VideoFileClip, then I delete the file.


if factor <= 2:
 system("ffmpeg -i " + paths[dex] + " -vf setpts=" + str(vfactor) + "*PTS -an ./Media/Videos/temp.mp4")
 system("ffmpeg -i " + paths[dex] + " -filter:a atempo=" + str(factor) + " -vn ./Media/ShortSounds/temp.mp3")
 elif 2 < factor < 4:
 factor = round(sqrt(factor), 1)
 system("ffmpeg -i " + paths[dex] + " -vf setpts=" + str(vfactor) + "*PTS,setpts=" + str(vfactor) + "*PTS -an ./Media/Videos/temp.mp4")
 system("ffmpeg -i " + paths[dex] + " -filter:a atempo=" + str(factor) + ",atempo=" + str(factor) + " -vn ./Media/ShortSounds/temp.mp3")
 elif factor > 4:
 raise Exception("File " + paths[dex] + " is too long.")
 t = VideoFileClip("./Media/Videos/temp.mp4")
 t.audio = AudioFileClip("./Media/Videos/temp.mp3")
 templist.append(t)
 remove("./Media/Videos/temp.mp4")



However, when the code gets to the deletion command, it has the following error :


PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: './Media/Videos/temp.mp4'



What's strange is, I can see the temp.mp4 file, and it runs just fine. I never get this error while manually running the temp.mp4 file.


I have tried the following :


- 

- Waiting 5, 10, and 20 seconds before deleting the file.
- Running "taskkill -f -im ffmpeg.exe" before deleting the file
- I went through the debugger, and right before the deletion, I checked in task manager to see if ffmpeg was still running, and it wasn't.








Do you guys have any idea what could be holding this up ? My code worked previously when I was trying to just do audio, but I am trying it with video and this is happening.


-
How can I install FFmpeg so that pkg-config can find it ?
11 octobre 2024, par Project PowerPointI want to use the ffmpeg libraries in my program. These are libavformat and libavcodec. To link them, I'm trying to use pkg-config.


I cannot get pkg-config to find these libraries.


When I run

pkg-config --modversion libavcodec

I get
Can't find libavcodec.pc in any of C:/Strawberry/c/lib/pkgconfig


Which should mean that I don't have ffmpeg installed.


However, I did install ffmpeg.
I'm using Windows so I installed ffmpeg with the Chocolatey package manager. This seems to have only given me the ffmpeg program and not its libraries.


On MacOS simply using homebrew to install ffmpeg installs all the right files.


Is there a difference on Windows ? How can I get the dev package ?


SOME MORE INFO :


I'm compiling this using CMake-js as a node addon. This is my CMakeLists.txt file :


cmake_minimum_required(VERSION 3.9)
project(FFMpeg)

find_package(PkgConfig REQUIRED)
pkg_check_modules(AVCODEC REQUIRED IMPORTED_TARGET libavcodec)
pkg_check_modules(AVFILTER REQUIRED IMPORTED_TARGET libavformat)
pkg_check_modules(AVDEVICE REQUIRED IMPORTED_TARGET libavdevice)
pkg_check_modules(AVUTIL REQUIRED IMPORTED_TARGET libavutil)
pkg_check_modules(SWRESAMPLE REQUIRED IMPORTED_TARGET libswresample)
pkg_check_modules(SWSCALE REQUIRED IMPORTED_TARGET libswscale)

add_library(FFMpeg INTERFACE IMPORTED GLOBAL)

target_include_directories(
 FFmpeg INTERFACE
 ${AVCODEC_INCLUDE_DIRS}
 ${AVFILTER_INCLUDE_DIRS}
 ${AVDEVICE_INCLUDE_DIRS}
 ${AVUTIL_INCLUDE_DIRS}
 ${SWRESAMPLE_INCLUDE_DIRS}
 ${SWSCALE_INCLUDE_DIRS}
)

target_link_options(
 FFmpeg INTERFACE
 ${AVCODEC_LDFLAGS}
 ${AVFILTER_LDFLAGS}
 ${AVDEVICE_LDFLAGS}
 ${AVUTIL_LDFLAGS}
 ${SWRESAMPLE_LDFLAGS}
 ${SWSCALE_LDFLAGS}



I also found this in the output, which might explain why pkg-config is looking in
C:\Strawberry?


-- Found PkgConfig: C:/Strawberry/perl/bin/pkg-config.bat (found version "0.26")
-- Checking for module 'libavcodec'
-- Can't find libavcodec.pc in any of C:/Strawberry/c/lib/pkgconfig