
Recherche avancée
Autres articles (86)
-
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 ;
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5745)
-
FFMPEG : alphaextract+split create transparent video in 1080 x 1920 pixels not working
30 juin 2021, par Karim ElhalloumiCreate your transparent video :
i found a solution to a problem of creating alpha from a video then put it next to original as an output it give one video with original+alpha
using this ffmpeg cmd :


ffmpeg -i video_name.video_extension -vf "split [a], pad=iw*2:ih [b], [a] alphaextract, [b] overlay=w" -y final_name_alpha.mp4



source :https://docs.minsar.app/create/howtos/transparentvideos/
the problem is This operation with Ffmpeg will not work if your video is not in 16:9 format, or has no alpha background.


Result :
CMD Result 
iwant put as input a template for phone size with black background and generate the 2 video in one


what Iam trying to get is video.mp4 :
Process here


I'm new to ffmpeg, is there any cmd to generate alpha next to original without having only black back ground and with 9:16 instead ?



ffmpeg version 4.4-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf57.83.100
 Duration: 00:00:14.02, start: 0.000000, bitrate: 797 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 540x960, 662 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[Parsed_alphaextract_2 @ 000001a9dae4bdc0] Requested planes not available.
[Parsed_alphaextract_2 @ 000001a9dae4bdc0] Failed to configure input pad on Parsed_alphaextract_2
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[aac @ 000001a9dadd4280] Qavg: 6441.061
[aac @ 000001a9dadd4280] 2 frames left in the queue on closing
Conversion failed!



cmd I'm using to merge video :


- filter_complexe "[2]split=2[color][alpha];[color]crop=iw/2:ih:0:0[color];[alpha]crop=iw/2:ih:iw/2:0[alpha];[color][alpha]alphamerge[ovrly];[0]scale=460:505,setsar=1[0_scaled];[1]scale=460:505,setsar=1[1_scaled];[3][0_scaled]overlay=x=80:y=175[base_img_1];[3][1_scaled]overlay=x=80:y=175[base_img_2];[base_img_1]zoompan=z='if(lte(zoom,1.0),1.2,max(1.001,zoom-0.0006))':d=25*14:s=540x960,fade=out:st=6:d=1:alpha=1,fade=t=in:st=0:d=1[video1];[base_img_2]zoompan=z='if(lte(on,25*6),1,if(lte(zoom,-1.0),1.2,min(zoom+0.0006,1.2)))':d=25*14:s=540x960[video2];[video2][video1]overlay[overlay_video1];[overlay_video1][ovrly]overlay=0:0[base_video];[base_video][4]overlay=enable='between(t,0,7)':x=30:y=30[watermarked_part1];[watermarked_part1][4]overlay=enable='between(t,7,14)':x=(main_w-overlay_w-30):y=(main_h-overlay_h-10)[final_video]"



-
FFmpeg compiling error(libavfilter/vf_scale_cuda.cu)
11 août 2021, par Amir Mousaviinstalled packages :




libx264 - cuda11.2 - cuda-toolkit - nvidia-driver-465




command :


./configure —enable-nonfree —enable-cuvid —enable-nvenc —enable-cuda-nvcc —enable-libx264 —enable-gpl —extra-cflags=-I/usr/local/cuda/include —extra-ldflags=-L/usr/local/cuda/lib64


here is latest lines errors :




libavfilter/vf_scale_cuda.cu(1123) : error : a template argument may not reference a non-external entity


libavfilter/vf_scale_cuda.cu(1123) : error : a template argument may not reference a non-external entity


libavfilter/vf_scale_cuda.cu(1124) : error : a template argument may not reference a non-external entity


libavfilter/vf_scale_cuda.cu(1124) : error : a template argument may not reference a non-external entity


libavfilter/vf_scale_cuda.cu(1124) : error : a template argument may not reference a non-external entity


libavfilter/vf_scale_cuda.cu(1124) : error : a template argument may not reference a non-external entity


Error limit reached.
100 errors detected in the compilation of >"/tmp/tmpxft_000032a1_00000000-7_vf_scale_cuda.cpp1.ii".
Compilation terminated.
ffbuild/common.mak:108 : recipe for target >'libavfilter/vf_scale_cuda.ptx' failed
make : *** [libavfilter/vf_scale_cuda.ptx] Error 4
make : *** Waiting for unfinished jobs....




I don't know where is the problem.


lines that error referenced :


EAREST_KERNELS(yuv420p)
NEAREST_KERNELS(nv12)
NEAREST_KERNELS(yuv444p)
NEAREST_KERNELS(p010le)
NEAREST_KERNELS(p016le)
NEAREST_KERNELS(yuv444p16le)



-
Windows batch with FFmpeg, error handling
26 mai 2021, par Neelfirst let me apologize as the question might not be clear ! Let me explain, in a folder i have a batch file every time i want to convert 1 or more videos i drop them in the folder and run the batch, this i guess is general scenario for most of the people, additionally i delete the file one by one once the ffmpeg process the file (i.e. within the for loop).


Now the problem is comes when ffmpeg fails to process the file because of an error, but as i am deleting the file i have no way of knowing which files failed, other than manually checking them.


i tried introducing errorlevel in the batch, but that doesn't seem to work with ffmpeg.


if !errorlevel! neq 0 move %%a ..\ProblemFiles



Now my question are :


- 

- Is there an alternative way of achieving the above with ffmpeg i.e.
if error converting move the file.
- Can i log the error / warning only in case if they occur !






Following is the pseudo batch file :


@echo off
echo -------------------------------------------------------------------------------->> ..\Log.txt
echo Batch Started at %time% >> ..\Log.txt
for %%G in (.mp4, .mov) do ( echo %%G
 for /f "delims=" %%a in ('forfiles /s /m *%%G /c "cmd /c echo @relpath"') do (
echo Original file MediaInfo : >> ..\Log.txt
"C:\utils\MediaInfo.exe" --Output=file://"C:\utils\custom.template" "%%a" >> ..\Log.txt

ffmpeg.exe -y -hide_banner -i "%%a" ...... "..\Output\%%~na_Out.mp4" 

echo Converted file MediaInfo : >> ..\Log.txt
"C:\utils\MediaInfo.exe" --Output=file://"C:\utils\custom.template" "..\Output\%%~na_Out.mp4" >> ..\Log.txt
timeout 10
echo Deleting File : "%%a" >> ..\Log.txt
del "%%a"
echo ------------------------------------------->> ..\Log.txt
)
)
echo Batch completed at %time% >> ..\Log.txt
echo -------------------------------------------------------------------------------->> ..\Log.txt 



Please assist and thanks in advance !