
Recherche avancée
Autres articles (100)
-
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 -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (7569)
-
Convert Black to Transparency in FFMPEG
12 février 2019, par KapitanoI have a sequence of BMP images, which I’m concatenating to an MPNG video file, with this FFMPEG code :
ffmpeg -f image2 -framerate 12 -i "Frame_%d.bmp" -c:v png "Video.avi"
I want to replace all black pixels with a transparency in the alpha layer, so it can be laid over other videos in an editor. The following code doesn’t work :
ffmpeg -f image2 -framerate 12 -i "Frame_%d.bmp" -filter_complex "[0:v]colorkey=0x000000:0.01:0.0[BlackToTransparancy]" -map [BlackToTransparancy] -c:v png "Video.avi"
As requested, here’s the full log :
ffmpeg version N-93020-g3224d6691c Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20181201
configuration: --enable-gpl --enable-version3 --enable-sdl2 --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-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 44.100 / 58. 44.100
libavformat 58. 26.100 / 58. 26.100
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, image2, from 'D:\ReadOut_Process\Test\Test__Frame_%d.bmp':
Duration: 00:00:16.83, start: 0.000000, bitrate: N/A
Stream #0:0: Video: bmp, bgra, 1280x720, 12 tbr, 12 tbn, 12 tbc
Stream mapping:
Stream #0:0 (bmp) -> colorkey
colorkey -> Stream #0:0 (png)
Press [q] to stop, [?] for help
Output #0, avi, to 'D:\ReadOut_Process\Test\Test__Scribe.avi':
Metadata:
ISFT : Lavf58.26.100
Stream #0:0: Video: png (MPNG / 0x474E504D), rgba, 1280x720, q=2-31, 200 kb/s, 12 fps, 12 tbn, 12 tbc
Metadata:
encoder : Lavc58.44.100 png
frame= 34 fps=0.0 q=-0.0 size= 774kB time=00:00:02.16 bitrate=2924.7kbits/s speed=4.21x
frame= 65 fps= 64 q=-0.0 size= 1798kB time=00:00:04.75 bitrate=3100.1kbits/s speed=4.66x
frame= 95 fps= 62 q=-0.0 size= 3078kB time=00:00:07.25 bitrate=3477.4kbits/s speed=4.76x
frame= 124 fps= 61 q=-0.0 size= 4358kB time=00:00:09.66 bitrate=3692.8kbits/s speed=4.76x
frame= 155 fps= 61 q=-0.0 size= 6150kB time=00:00:12.25 bitrate=4112.4kbits/s speed=4.83x
frame= 185 fps= 61 q=-0.0 size= 7686kB time=00:00:14.75 bitrate=4268.5kbits/s speed=4.84x
frame= 202 fps= 58 q=-0.0 Lsize= 9187kB time=00:00:16.83 bitrate=4470.8kbits/s speed=4.83x
video:9176kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.112806%The BMPs are too large to upload, but here’s a link to a section of a typical one : https://pasteboard.co/I0RzfjI.bmp
Can it be done ?
-
FFmpeg auto rotate video when copying video stream without re-encoding
25 février 2019, par Mahfujur RahmanI have been trying to convert an mp4 (portrait) file to mkv. As the mkv container support any video and audio stream, I am copying the audio and video stream to the output container. The command I’m using
ffmpeg -y -i test.mp4 -vcodec copy -acodec copy test.mkv
File info for
test.mp4
is followingInput #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2019-02-23T11:18:50.000000Z
com.android.version: 8.0.0
Duration: 00:00:25.86, start: 0.000000, bitrate: 12270 kb/s
Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 12005 kb/s, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 90
creation_time : 2019-02-23T11:18:50.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
Metadata:
creation_time : 2019-02-23T11:18:50.000000Z
handler_name : SoundHandleNow, the problem is that the output video I get from ffmpeg is a 90 degree counter clockwise rotated video. The reason I believe is the following info being removed from output file,
Side data:
displaymatrix: rotation of -90.00 degreesFile info for rotated output file
test.mkv
Input #0, matroska,webm, from 'test.mkv':
Metadata:
MAJOR_BRAND : mp42
MINOR_VERSION : 0
COMPATIBLE_BRANDS: isommp42
COM.ANDROID.VERSION: 8.0.0
ENCODER : Lavf58.12.100
Duration: 00:00:25.87, start: 0.000000, bitrate: 12265 kb/s
Stream #0:0(eng): Video: h264, yuv420p(tv, bt709, progressive), 1280x720, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 2k tbc (default)
Metadata:
ROTATE : 90
HANDLER_NAME : VideoHandle
DURATION : 00:00:25.866000000
Stream #0:1(eng): Audio: aac, 48000 Hz, stereo, fltp (default)
Metadata:
HANDLER_NAME : SoundHandle
DURATION : 00:00:25.813000000But when I convert this rotated output
test.mkv
to mp4 again, I get the portrait file. The displaymatrix side data appears again in the file info.Converting the same mp4 file to m4v by copying the steam works fine.
So, this whole thing is very much confusing to me.
Now my question is, how can I convert the mp4 file to mkv without re-encoding and avoid getting rotated output ?
In this post they solved it for c++. I am working on android and using ffmpeg android wrapper to use the ffmpeg library. Is there any ffmpeg flag to handle this situation ?
-
exec.Command error, no output to stdout or stderr
19 février 2019, par n3wtonI am trying to get the duration of a video using ffprobe and exec.Command but I keep getting an error. However, stdout and stderr are both empty so I don’t know what the problem is.
func getVideoLength(filename string) float64 {
cmd := exec.Command("ffprobe", "-i", filename, "-show_entries", "format=duration", "-v", "quiet", "-of", "csv=\"p=0\"")
fmt.Println("ffprobe", "-i", filename, "-show_entries", "format=duration", "-v", "quiet", "-of", "csv=\"p=0\"")
var out bytes.Buffer
var stderr bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &stderr
err := cmd.Run()
if err != nil {
fmt.Println("out: " + out.String())
fmt.Println("stderr: " + stderr.String())
log.Fatal(err)
}
length, err := strconv.ParseFloat(out.String(), 64)
if err != nil {
log.Fatal(err)
}
return length
}Here is the output I get :
ffprobe -i amelie.mp4 -show_entries format=duration -v quiet -of csv="p=0"
out:
stderr:
2019/02/18 21:04:39 exit status 1not very helpful.
Any ideas ?. Thanks.