
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (100)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
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 (9283)
-
How to use AMD hardware acceleration VAAPI when using ffmpeg in qtcreator ? [closed]
28 décembre 2024, par Ling Yunffmpeg version:4.2.2
env:QT creator


I passed this command in terminal :


ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i input.mp4 -vf format=yuv420p,hwupload -c:v h264_vaapi -b:v 1000k output.mp4



This can be accelerated, the CPU usage is very low
But when I want to use code to implement hardware accelerated encoding, it prompts :


cannot allocate memory(-12)



my c++ code :


av_hwdevice_ctx_create = (&hw_device_ctx,AV_HWDEVICE_TYPE_VAAPI,"/dev/dri/renderD128");



print :-12


I can be sure that I compiled ffmpeg correctly because I can enable vaapi hardware acceleration through the command and my graphics card has enough video memory.


Possible causes :
I introduced -lavcodec -lavformat -lavutil -lswscale in my qt pro file libs, but did not add -lva -lva-drm


Is it correct to add -lva -lva-drm after libs ?
What should I do ?


-
How to use the ffmpeg overlay_cuda filter to make a SBS video ?
24 août 2020, par MaxtrixFFMPEG a few months ago launched the new version of FFMPEG with the new filter "overlay_cuda", this filter makes the same as the "overlay" but using an Nvidia card for applying it.


I found on the FFMPEG website description of the filter, but no examples of how to use it. The only examples I found are from the developer commits but are to put a video or a photo over another video.


I before the normal overlay filter to do this using a nullsrc image with the twice of width but now I don't know how to with this filter.


Commit description : https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200318071955.2329-1-yyyaroslav@gmail.com/
ffmpeg documentation webpage : https://ffmpeg.org/ffmpeg-filters.html#overlay_005fcuda-1


I hope you can help me.


Update :


I made this FFmpeg order that :


- 

- Input each video.
- The first video creates padding to the right and then is uploaded to the card's memory.
- With overlay Cuda, the other video puts on the right of the original video.








ffmpeg -y -loglevel info \
-i $video_1 \
-hwaccel cuda -hwaccel_output_format cuda -i $video_2 \
-filter_complex \
" \
[0:v]pad=w=2*iw:h=ih:x=0:y=0,hwupload_cuda[base];
[base][1:v]overlay_cuda=x=800:y=0" \
-an -c:v h264_nvenc overlay_test.mp4



But I get this error message :


[overlay_cuda @ 0x55fdec4b2ec0] Can't overlay nv12 on yuv420p 
[Parsed_overlay_cuda_2 @ 0x55fdec4b2d80] Failed to configure output pad on Parsed_overlay_cuda_2
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0



I have issues with the pixel formats, I hope you can help me.


Update 2 :


I finally solved the pixel format issue and now makes the overlay with the padding (adds space to the overlay video)


This is the command that succeeds :


ffmpeg -y -loglevel info \
-i $video_1 \
-hwaccel cuda -hwaccel_output_format cuda -i $video_2 \
-filter_complex \
" \
[0:v]pad=w=2*iw:h=ih:x=0:y=0,hwupload_cuda,scale_npp=format=nv12[base];
[base][1:v]overlay_cuda=x=800:y=0" \
-an -c:v h264_nvenc overlay_test.mp4




Now I want to change
x=800
to a variable likex=iw+1
but it seems this filter doesn't support that. Is there a way to set a global variable ?

-
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.