Recherche avancée

Médias (91)

Autres articles (16)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

Sur d’autres sites (3892)

  • Video file not trimming and copying using FFMpeg in C#

    15 mai 2019, par chapperzuk

    I am trying to clip a video using C# in Visual Studios with FFMpeg. I run the code below and it doesn’t come back with any errors, except it doesn’t create a new video file.

    I’ve looked around here to make sure I’m using the correct code, but after multiple attempts it still won’t copy.

    string videoFile = @"C:\Users\dave\Documents\video 1.mp4";
    string outputFile = @"C:\Users\dave\Documents\video 2.mp4";

    Process process = new Process();
    process.StartInfo.RedirectStandardOutput = true;
    process.StartInfo.RedirectStandardError = true;
    process.StartInfo.FileName = @"C:\Users\dave\Documents\ffmpeg.exe";
    process.StartInfo.Arguments = "ffmpeg -i " + videoFile + " -ss 00:30:00 -t 00:00:10 -c copy " + outputFile;
    process.StartInfo.UseShellExecute = false;
    process.StartInfo.CreateNoWindow = true;
    process.Start();

    I was expecting to get a video cut from the original video, starting at the 30 second mark and lasting 10 seconds, but nothing is created.

    I am using the latest FFMpeg from https://ffmpeg.zeranoe.com/builds/

    UPDATE If I run the code in command prompt - The file comes out corrupt though

    ffmpeg -i "C:\\Users\\dave\\Documents\\video 1.mp4" -ss 00:30:00 -t 00:00:10 -c copy "C:\\Users\\dave\\Documents\\video 2.mp4"
    ffmpeg version N-93851-gdcc999819d Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 8.3.1 (GCC) 20190414
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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. 27.100 / 56. 27.100
     libavcodec     58. 52.101 / 58. 52.101
     libavformat    58. 27.103 / 58. 27.103
     libavdevice    58.  7.100 / 58.  7.100
     libavfilter     7. 51.100 /  7. 51.100
     libswscale      5.  4.101 /  5.  4.101
     libswresample   3.  4.100 /  3.  4.100
     libpostproc    55.  4.100 / 55.  4.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\\Users\\dave\\Documents\\video 1.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2mp41
       creation_time   : 2019-01-15T21:57:04.000000Z
       title           : My Movie
       encoder         : Lavf56.15.102
       description     : This video is about My Movie
     Duration: 00:06:48.22, start: 0.000000, bitrate: 1283 kb/s
       Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1202 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 2997 tbc (default)
       Metadata:
         creation_time   : 2019-01-15T21:57:04.000000Z
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 74 kb/s (default)
       Metadata:
         creation_time   : 2019-01-15T21:57:04.000000Z
         handler_name    : SoundHandler
    Output #0, mp4, to 'C:\\Users\\dave\\Documents\\video 2.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2mp41
       description     : This video is about My Movie
       title           : My Movie
       encoder         : Lavf58.27.103
       Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 1202 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 11988 tbc (default)
       Metadata:
         creation_time   : 2019-01-15T21:57:04.000000Z
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 74 kb/s (default)
       Metadata:
         creation_time   : 2019-01-15T21:57:04.000000Z
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=    0 fps=0.0 q=-1.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
  • if there is a way to add text to each image used to create video using ffmpeg ?

    1er mai 2020, par Mahmood Hussain

    I have successfully created a video (slide show) using FFmpeg from images and an additional text to it. Now I want the timestamp to be added as overlay text to each image.

    



    If the image is named 20191224133501.jpg I want 24 Dec 2019 01:35 PM as text over the image.

    


  • FFmpeg - Concatenating videos with different resolutions

    7 août 2017, par Jill

    I currently have an android app where the videos get combined using ffmpeg’s concat. That works fine. However, when I add text (using drawtext) to one of the videos, after combining the videos again, the combined video gets distorted. The video with the drawtext shows up fine, but then the videos without text switches orientation.

    I think the problem roots from the fact that a vertical video on my android phone has the resolution of 1920x1080, however if I use that for the scale when executing drawtext, it becomes horizontal.

    I think an example might help explain this better. Let’s say I have 2 vertically recorded videos, and I combine them with concat. The combined video shows up fine. Then if I add text to the 1st video using drawtext, the combined video will then show the first video (with text) at normal orientation (vertical). However, when it transitions to the next video, it first stalls for a couple seconds and then the 2nd video is shown at a horizontal orientation.

    Also, I tried this also with having the aspect ratio as 1:1 so it wouldn’t matter, but the second video’s orientation still changed counter clockwise.

    Thanks for the help, and happy to add more clarification if needed.

    This is for adding the text :

    ffmpeg -i input.mp4 -vf drawbox=y=ih-200:color=black@0.5:width=iw:height=200:t=max
       ,drawtext=fontfile=RobotoRegular.ttf:text='Text':x=(w-text_w)/2:y=(h-text_h)-100:fontsize=70:fontcolor=white
       -c:v libx264 -b:v 17000k -r 30 -preset ultrafast -y output.mp4

    Output :

    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
                                                          built with gcc 4.8 (GCC)
                                                          configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
                                                          libavutil      55. 17.103 / 55. 17.103
                                                          libavcodec     57. 24.102 / 57. 24.102
                                                          libavformat    57. 25.100 / 57. 25.100
                                                          libavdevice    57.  0.101 / 57.  0.101
                                                          libavfilter     6. 31.100 /  6. 31.100
                                                          libswscale      4.  0.100 /  4.  0.100
                                                          libswresample   2.  0.101 /  2.  0.101
                                                          libpostproc    54.  0.100 / 54.  0.100
                                                        Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.me.app/files/65/VID_20170802_111518.mp4':
                                                          Metadata:
                                                            major_brand     : mp42
                                                            minor_version   : 0
                                                            compatible_brands: isommp42
                                                            creation_time   : 2017-08-02 18:15:20
                                                            com.android.version: 7.0
                                                          Duration: 00:00:00.93, start: 0.000000, bitrate: 16415 kb/s
                                                            Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 16408 kb/s, SAR 1:1 DAR 16:9, 28.94 fps, 30 tbr, 90k tbn, 180k tbc (default)
                                                            Metadata:
                                                              rotate          : 90
                                                              creation_time   : 2017-08-02 18:15:20
                                                              handler_name    : VideoHandle
                                                            Side data:
                                                              displaymatrix: rotation of -90.00 degrees
                                                        [libx264 @ 0xeab7ec00] using SAR=1/1
                                                        [libx264 @ 0xeab7ec00] using cpu capabilities: none!
                                                        [libx264 @ 0xeab7ec00] profile Constrained Baseline, level 4.1
                                                        [libx264 @ 0xeab7ec00] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=17000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
                                                        Output #0, mp4, to '/storage/emulated/0/Android/data/com.me.app/files/65/temp.mp4':
                                                          Metadata:
                                                            major_brand     : mp42
                                                            minor_version   : 0
                                                            compatible_brands: isommp42
                                                            com.android.version: 7.0
                                                            encoder         : Lavf57.25.100
                                                            Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], q=-1--1, 17000 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
                                                            Metadata:
                                                              handler_name    : VideoHandle
                                                              creation_time   : 2017-08-02 18:15:20
                                                              encoder         : Lavc57.24.102 libx264
                                                            Side data:
                                                              unknown side data type 10 (24 bytes)
                                                        Stream mapping:
                                                          Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
                                                        Press [q] to stop, [?] for help
                                                        frame=    6 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed=   0x    
                                                        frame=   10 fps=8.8 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed=   0x    
                                                        frame=   14 fps=8.4 q=15.0 size=     155kB time=00:00:00.03 bitrate=38067.5kbits/s dup=1 drop=0 speed=0.0201x    
                                                        frame=   18 fps=8.0 q=22.0 size=     744kB time=00:00:00.16 bitrate=36592.5kb

    ffmpeg -f concat -safe 0 -i input.mp4 -c copy -y output.mp4

    Output :

    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
                                                           built with gcc 4.8 (GCC)
                                                           configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
                                                           libavutil      55. 17.103 / 55. 17.103
                                                           libavcodec     57. 24.102 / 57. 24.102
                                                           libavformat    57. 25.100 / 57. 25.100
                                                           libavdevice    57.  0.101 / 57.  0.101
                                                           libavfilter     6. 31.100 /  6. 31.100
                                                           libswscale      4.  0.100 /  4.  0.100
                                                           libswresample   2.  0.101 /  2.  0.101
                                                           libpostproc    54.  0.100 / 54.  0.100
                                                         [mov,mp4,m4a,3gp,3g2,mj2 @ 0xe762a600] Auto-inserting h264_mp4toannexb bitstream filter
                                                         Input #0, concat, from '/storage/emulated/0/Android/data/com.me.app/files/64/TXT_20170802_110325.txt':
                                                           Duration: N/A, start: 0.000000, bitrate: 23403 kb/s
                                                             Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], 23403 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
                                                             Metadata:
                                                               handler_name    : VideoHandler
                                                         Output #0, mp4, to '/storage/emulated/0/Android/data/com.me.app/files/64/VID_20170802_110325concat.mp4':
                                                           Metadata:
                                                             encoder         : Lavf57.25.100
                                                             Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], q=2-31, 23403 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc
                                                             Metadata:
                                                               handler_name    : VideoHandler
                                                         Stream mapping:
                                                           Stream #0:0 -> #0:0 (copy)
                                                         Press [q] to stop, [?] for help
                                                         [mov,mp4,m4a,3gp,3g2,mj2 @ 0xe762a600] Auto-inserting h264_mp4toannexb bitstream filter
                                                         frame=   64 fps=0.0 q=-1.0 Lsize=    5218kB time=00:00:12.30 bitrate=3474.5kbits/s speed= 122x    
                                                         video:5217kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.025721%