
Recherche avancée
Autres articles (81)
-
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 (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)
Sur d’autres sites (4846)
-
Changing bit-rate with timestamp copy still offsets events by 1 or 2 frames
10 avril 2018, par harkmugAs a novice user, I am trying to understand the following. I have an mp4 (encoder=Lavf57.66.104) that is 127 MB in size and I use the following to reduce its size :
ffmpeg -i original.mp4 -start_at_zero -copyts -b:v 1000k -c:a copy output.mp4
The
duration
and number of frames stay the same after this process, however, when I annotate (using ELAN) the same events (at millisecond level, e.g. a blink) the output video (encoder=Lavf57.55.100) seems to be offset relative to the original by 1 or 2 frames.Can someone help me understand this shift ? Thanks !
UPDATE (2018-04-10) :
As per @Mulvya’s suggestion, ran :ffmpeg -i original.mp4 -copyts -b:v 1000k -c:a copy output.mp4
Looking at the two files :
fprobe -v error -select_streams v:0 -show_frames -show_entries frame=key_frame,pkt_pts_time,pict_type,coded_picture_number -of default=noprint_wrappers=1:nokey=1 -of csv=p=0 original.mp4 | head -n 5
1,5292.861000,I,0
0,5292.894333,P,1
0,5292.927667,P,2
0,5292.961000,P,3
0,5292.994333,P,4Same for output :
1,5292.866016,I,0
0,5292.899349,P,1
0,5292.932682,P,2
0,5292.966016,P,3
0,5292.999349,P,4Trying to understand how to get the same time-stamps for the same frames. Maybe this is not possible ?
-
Multiple overlays using ffmpeg
23 mars 2018, par lhanI’m trying to satisfy a few layering scenarios for building video files using ffmpeg.
Scenario 1 : Overlay a video (specifying opacity of the video) on top of an image, creating a new video as the result.
I solved this with :
ffmpeg -i video.mp4 -i image.jpg -filter_complex '[0]format=rgba,colorchannelmixer=aa=0.7,scale=w=3840:h=2160[a];[1][a]overlay=0:0' -t 30 output.mp4
I’m scaling the video to 3840x2160 to match my image (ideally I’d have them matching beforehand).
Scenario 2 : 3 layers now, video - image - image. The middle image layer is a transparent image with text. So we have a base image, with text overlaid, and a video on top of that at a certain opacity.
I solved this with :
ffmpeg -i video.mp4 -i image.jpg -i text.png -filter_complex '[0]format=rgba,colorchannelmixer=aa=0.7,scale=w=3840:h=2160[a];[2][a]overlay=0:0,scale=w=3840:h=2160[b];[1][b]overlay=0:0' -t 30 output.mp4
Scenario 3 (which I can’t get working) : Same as Scenario #2, but with text on top of the video.
I tried re-arranging my filter, hoping to affect the layering order :
ffmpeg -i video.mp4 -i image.jpg -i text.png -filter_complex '[2]overlay=0:0,scale=w=3840:h=2160[a];[0][a]format=rgba,colorchannelmixer=aa=0.7,scale=w=3840:h=2160[b];[1][b]overlay=0:0' -t 5 output.mp4
But that gives the following error :
Too many inputs specified for the "format" filter. Error initializing complex filters. Invalid argument
Full Error :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’video.mp4’ :
Metadata :
major_brand : mp42
minor_version : 0
compatible_brands : mp42mp41
creation_time : 2018-03-09T20:52:18.000000ZDuration : 00:00:30.00, start : 0.000000, bitrate : 8002 kb/s
Stream #0:0(eng) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 7997 kb/s, 24 fps,
24 tbr, 24k tbn, 48 tbc (default)Metadata :
creation_time : 2018-03-09T20:52:18.000000Z
handler_name : Alias Data Handler
encoder : AVC Coding Input #1, image2, from ’image.jpg’ :Duration : 00:00:00.04, start : 0.000000, bitrate : 526829 kb/s
Stream #1:0 : Video : mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 3840x2160 [SAR 96:96 DAR 16:9], 25 tbr, 25 tbn, 25 tbc Input #2,
png_pipe, from ’text.png’ : Duration : N/A, bitrate : N/AStream #2:0 : Video : png, rgba(pc), 1500x1500, 25 tbr, 25 tbn, 25 tbc [AVFilterGraph @ 0x7fc37d402de0]
Too many inputs specified for the "format" filter. Error initializing complex filters. Invalid argument
I can sort of get around that by tweaking the command so that the text isn’t an input to the overlay :
ffmpeg -i lightTexture.mp4 -i image.jpg -i textSample.png -filter_complex '[2]overlay=0:0,scale=w=3840:h=2160;[0]format=rgba,colorchannelmixer=aa=0.7,scale=w=3840:h=2160[b];[1][b]overlay=0:0' -t 5 output_text_on_top.mp4
But then my output video is all messed up. I suspect I am on the wrong track by trying to cram all of this into the
-filter_complex
. I’m wondering if I need to create two overlays and then overlay those (i.e overlay Text onto the Video, and then overlay that onto the base image) though I’m not sure how to accomplish that.If anyone could point me in the right direction here, I’d be super grateful.
-
Transparent PNG to WEBM
5 avril 2018, par DanI am trying to make a partially transparent video for a Unity application, however, I can’t seem to get my commands to retain the alpha of the PNGs. Instead, it just makes the transparent parts white.
Currently the command I am using is
ffmpeg -r 30 -f image2 -s 2048x2048 -i frames%04d.png -vcodec vp8 -crf 63 -b:v 0 -pix_fmt yuva420p -auto-alt-ref 0 vid/output.webm
Whilst I am aware I could try the VP9 codec, AFAIK, this is not supported in Unity 2017.2, so I have to stick to VP8
The output this gives is
D:\development\batch - Copy>ffmpeg -r 30 -f image2 -s 2048x2048 -i frames%04d.png -vcodec vp8 -crf 63 -b:v 0 -pix_fmt yuva420p -auto-alt-ref 0 vid/output.webm
ffmpeg version N-90315-gf706cdda56 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 9.100 / 56. 9.100
libavcodec 58. 14.100 / 58. 14.100
libavformat 58. 10.100 / 58. 10.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 13.100 / 7. 13.100
libswscale 5. 0.102 / 5. 0.102
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, image2, from 'frames%04d.png':
Duration: 00:00:03.50, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, pal8(pc), 2048x2048, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> vp8 (libvpx))
Press [q] to stop, [?] for help
[libvpx @ 00000209d9a6e680] v1.7.0
Output #0, webm, to 'vid/output.webm':
Metadata:
encoder : Lavf58.10.100
Stream #0:0: Video: vp8 (libvpx), yuva420p, 2048x2048, q=-1--1, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc58.14.100 libvpx
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 105 fps=4.1 q=0.0 Lsize= 144kB time=00:00:03.46 bitrate= 339.6kbits/s speed=0.134x
video:94kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 52.357399%