
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (55)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (3400)
-
FFmpeg scale and watermark filters with VAAP gives error "Cannot allocate memory." [closed]
8 février 2024, par Diz-XI'm attempting to transcode any uploaded video on our website into H.264 using an ARC GPU (VAAPI). While I've achieved functionality, ffmpeg crashes after a certain period, displaying the error message : "Error while filtering : Cannot allocate memory."


The following is the ffmpeg command is used transcode videos to H.264 :




ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD129 -y -i '/Media/001.mp4' -codec:v h264_vaapi -movflags +faststart -f mp4 -b:v 500k -maxrate 1000k -bufsize 500k -vf "movie=/Watermarks/video-watermark.png,hwupload [watermark] ; [in] scale_vaapi=trunc(iw/2)*2:trunc(ih/2)*2 [scale] ; [scale][watermark] overlay_vaapi=main_w-overlay_w:main_h-overlay_h [out]" -an -pass 1 -passlogfile /tmp/91f13b11b0ccd5195b588fb204da6626 -map_metadata -1 /dev/null




We ensure that the video is scaled to the appropriate video dimensions expected by H.264 codec , we use the "scale_vaapi=trunc(iw/2)*2:trunc(ih/2)*2" filter for this. We also apply a watermark to the video using the "overlay_vaapi=main_w-overlay_w:main_h-overlay_h" filter.


If I omit the ",hwupload" after the "movie=" statement, I encounter the following error : "Impossible to convert between the formats supported by the filter 'Parsed_movie_0' and the filter 'auto_scale_0'."


The "-filter-complex" results in the identical error : "Error while filtering : Cannot allocate memory.".


Does anyone have insights on how to enable hardware-accelerated transcoding for this ?


-
cv2/ffmpeg "grabFrame packet read max attempts exceeded" error after exactly reading certain number of frames
6 février, par banjaxingI am using OpenCV to extract frames from videos, run a segmentation AI model, and save the frames and masks to a folder. When I run my code to extract the frame from I encounter the error "grabFrame packet read max attempts exceeded" after processing a certain number of frames. This issue occurs consistently for the same videos across multiple environments.


Error message :


[ WARN:0@379.898] global cap_ffmpeg_impl.hpp:1541 grabFrame packet read max attempts exceeded, if your video have multiple streams (video, audio) try to increase attempt limit by setting environment variable OPENCV_FFMPEG_READ_ATTEMPTS (current value is 10000)



Minimum Reproducible Example


import os
import cv2

videofilename = "test.mp4"
capture = cv2.VideoCapture(videofilename)
frameNum = 0

createfolder = os.getcwd() + '/' + videofilename.split(".")[0] + '/'
if not os.path.exists(createfolder):
 os.makedirs(createfolder)
 os.makedirs(createfolder + "/frames/")

while True:
 success, frame = capture.read()
 if success is False:
 break
 frameNum += 1
 framedownloadname = videofilename.split(".")[0] + '-fr' + str(frameNum) + '.jpg'
 framedownloadloc = createfolder + '/frames/' + framedownloadname
 print(framedownloadloc)
 cv2.imwrite(framedownloadloc, frame)
 img = cv2.imread(framedownloadloc)
 img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

capture.release()



As suggested in error, I increased the OPENCV_FFMPEG_READ_ATTEMPTS env variable up to 10000. However, this seems to have little to no effect on the number of frames before the error appears.


-
the "non-monotonic DTS in output stream " error while concatenation even after reencoded input files
19 juin 2024, par nishhi I am trying to write a Python program that is trying to first edit different videos separately under the heading "intro" "story" and "byte" with the help of FFmpeg and Python subprocess module and then concatenate them in the function named "bind". At first, I encountered this "Non-monotonic DTS in output stream" then i reencoded the input files before concatenating them but i am still getting this error


# function to assemble all the videos 



def bind() :


bunch = ["final_intro.mp4","final_story.mp4","finalbite.mp4"]
new_bunch =[]
for video in bunch:
 name = f"re_{video}"
 re_command =[
 "ffmpeg", "-y",
 "-i", video,
 "-c:v", "libx264",
 "-c:a", "aac",
 "-strict", "experimental",
 "-b:a", "192k",
 name
 ]
 subprocess.run(re_command)
 new_bunch.append(name)
 

with open("concat_list_final.txt", "w") as f:
 for video in new_bunch:
 f.write(f"file './{video}'\n")
 
command_final = [ 
 "ffmpeg", "-y",
 "-f", "concat",
 "-safe", "0",
 "-i", "concat_list_final.txt",
 "-c", "copy",
 "done.mp4"
]
subprocess.run(command_final)
for video in new_bunch:
 os.remove(video)
os.remove("final.mp4")
os.remove("updated_final.mp4")
os.remove("concat_list_final.txt")


return "done.mp4"



for reference this is the error messages :-


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x14cf16040] Auto-inserting h264_mp4toannexb bitstream filter [mp4 @ 0x12ce06880] Non-monotonic DTS in output stream 0:0 ; previous : 152933, current : 127760 ; changing to 152934. This may result in incorrect timestamps in the output file. [mp4 @ 0x12ce06880] Non-monotonic DTS in output stream 0:0 ; previous : 152934, current : 128272 ; changing to 152935. This may result in incorrect timestamps in the output file..........