Recherche avancée

Médias (91)

Autres articles (112)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (12070)

  • How to show a watermark for 3 second on a MP4 using FFmpeg

    6 février 2014, par b1izzard

    I need to add a 3-second watermark to a Camera recorded video in Android. I'm using FFmpeg static build to execute the commands.

    Approach I

    I had tried the below command using latest version of FFmpeg(version N-60108-gda25a65) in my Desktop running Linux Mint, the command works fine.

    ffmpeg -y -itsoffset 3 -i input.mp4 -i myImage.jpg -filter_complex "[0:v][1:v]overlay=0:0:enable=between(t\,0\,3)"  -codec:a copy output.mp4

    In Android I'm using the FFmpegv1.2 with below config to execute the command.

    *******Starting FFMPEG
       ***ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers***
       ***  built on Mar 31 2013 23:44:57 with gcc 4.6 (GCC) 20120106 (prerelease)***
       ***  configuration: --arch=arm --target-os=linux --enable-runtime-cpudetect --enable-pic --disable-shared --enable-static --cross-prefix=/opt/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/opt/android-ndk-r8e/platforms/android-8/arch-arm --extra-cflags='-march=armv6' --extra-ldflags= --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network***
       ***  libavutil      52. 18.100 / 52. 18.100***
       ***  libavcodec     54. 92.100 / 54. 92.100***
       ***  libavformat    54. 63.104 / 54. 63.104***
       ***  libavdevice    54.  3.103 / 54.  3.103***
       ***  libavfilter     3. 42.103 /  3. 42.103***
       ***  libswscale      2.  2.100 /  2.  2.100***
       ***  libswresample   0. 17.102 /  0. 17.102***

    Java Code to run the FFmpeg command :

    String[] ffmpegCommandToAddWatermark = {
               mFfmpegInstallPath, "-y", "-itsoffset","3",
                "-i", INPUT_VIDEO_PATH, "-i", WATERMARK_IMAGE_PATH,
                "-filter_complex","[0:v][1:v]overlay=0:0:between(t\\,0\\,3)",
                "-strict","-2",
                "-codec:a","copy",OUTPUT_VIDEO_PATH};          
           try {
           Process ffmpegProcess = new ProcessBuilder(ffmpegCommandToAddWatermark)
               .redirectErrorStream(true).start();

           String line;

           BufferedReader reader = new BufferedReader(
               new InputStreamReader(ffmpegProcess.getInputStream()));
           Log.d(TAG, "*******Starting FFMPEG");
           while ((line = reader.readLine()) != null ) {

               Log.d(TAG, "***" + line + "***");
           }
           Log.d(null, "****ending FFMPEG****");

           } catch (Exception e) {
           e.printStackTrace();
           }

    The command execution failed with following error :

    ***[overlay @ 0x271f770] No option name near 'between(t,0,3)'***
    ***[AVFilterGraph @ 0x2711530] Error initializing filter 'overlay' with args '0:0:between(t,0,3)'***
    ***Error configuring filters.***

    The same command executes successfully when :enable=between(t\,0\,3) is removed, but the resulting output video has the watermark throughout the timeline, but I need watermark only for the starting 3 seconds.

    Approach II :

    I tried to convert WaterMarkImage to WaterMarkVideo

    ffmpeg -y -loop 1 -r 30 -i WaterMarkImage.jpg -b:v "4096k" -vf "scale=640:480" -t 3 WaterMarkVideo.mp4

    And then merge the WaterMarkVideo.mp4+CameraRecordedVideo.mp4 using the concat command :

    ffmpeg -y -f concat -i inputs.txt -c copy output.mp4

    The resulting output is corrupt due to BitRate,FrameRate,etc., mismatch. Any idea to solve the problem ?.

  • How can I show that a frame has been duplicated to extend the video framerate using ffprobe ?

    14 juillet 2023, par Brandon J

    As the title suggests I have a video.mp4 which I know visually has been extended from 5fps to 20fps. I know this because there are 256 frames and when I run ffprobe it reports 20fps and the video is 12.8 sec long. I also run

    


    ffprobe -v 0 -select_streams v -show_entries stream=duration_ts,time_base,nb_frames video.mp4

    


    reports to me 256 frames, 1/20 timebase adn 256 duration. This matches the expected 12.8 s duration. When I manually sort through the extracted frames I can see the frames have been held for 4 ticks. So it should be 5fps.

    


    I then run the below to view the packets and the frames (cmd not typed)

    


    ffprobe -show_packets -select_streams v:0 video.mp4

    


    and the packets or frames don't seem to give me a huge indication that the frames have been duplicated.

    


    With the -show_packets cmd the only possible indication of duplication I can see is that every 0.2 seconds, (consistent with 5fps) the size of the packets go from a consistent 150-300 size to around 16000 or so. Is there a way I can better articulate what I am seeing with the packet size change ? Why has their compression or encoder (forgive any error in verbiage) decided to duplicate frames to achieve 20fps vs extending the pts to 0.2 seconds for each packet ? It seems like simply defining a longer pts would reduce overall file size anyways ?

    


    All that said, is there something within ffprobe or other tool I can use to more efficiently confirm what I am visually seeing to say yep these frames were just duplicated from another program ? Thanks !

    


  • Multicast video captured via VLC show a gray background for first 1/2 second

    28 juillet 2014, par DavidG

    I am capturing multicast video using VLC.exe and performing some processing/converting using FFmpeg.exe. The resulting video starts with a gray background with some of the moving objects moving through the gray background. This seems to me that the video is not starting on an I-Frame, but on a B-Frame or a P-Frame. However, when I run ffprobe, it states the first frame is a key frame. After about 1/2 second, the video plays fine.

    Here is the command I’m using to capture the video :

    vlc.exe -I curses --run-time=10 "my.sdp" --sout=video.mp4

    I’m not using anything special when I convert to an mp4 file using FFmpeg :

    ffmpeg.exe -i video.mp4 -s 400x300 final.mp4

    I tried to post an image of the first frame or two, but Stackoverflow gave me an error stating I need at least 10 reputation to post images. Sorry about that, an image would have helped.

    I ran the command "ffprobe show_frames " and it looks like the first frame is a key frame. Of course I’m new to all this and I don’t know what I’m doing or seeing.

    Here is beginning of the output to the "ffprobe show_frames " command :

    [FRAME]
    media_type=video
    key_frame=1
    pkt_pts=0
    pkt_pts_time=0.000000
    pkt_dts=0
    pkt_dts_time=0.000000
    pkt_duration=1001
    pkt_duration_time=0.033367
    pkt_pos=48
    pkt_size=756
    width=400
    height=300
    pix_fmt=yuv420p
    sample_aspect_ratio=1:1
    pict_type=I
    coded_picture_number=0
    display_picture_number=0
    interlaced_frame=0
    top_field_first=0
    repeat_pict=0
    reference=3
    [/FRAME]

    Is there any way to either tell VLC.exe to start capturing on an I-Frame (This would be the best solution as I specify a duration to capture the video) or is there a way to tell FFmpeg.exe to start converting the input video starting at the first I-Frame encountered ?

    Thanks,
    - David