Recherche avancée

Médias (91)

Autres articles (111)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (11132)

  • using ffmpeg for silence detect with input pipe

    24 août 2018, par Moharrer

    I am trying to detect silence from audio file with ffmpeg in c#.
    i want to pipe input from c# memory stream and get silence duration like following command

    ffmpeg -hide_banner -i pipe:0 -af silencedetect=noise=-50dB:d=0.5 -f null - 

    but there is a problem, when input stream pump in pipe, ffmpeg waiting in p.WaitForExit() line.
    when i change p.WaitForExit() to p.WaitForExit(1000) and set force timeout the following result is displayed.

    [mp3 @ 00000163818da580] invalid concatenated file detected - using bitrate for durationInput #0, mp3, from ’pipe:0’ :  
    Metadata :    encoder : Lavf57.71.100  Duration : N/A, start : 0.023021, bitrate : 86 kb/s    
    Stream #0:0 : Audio : mp3, 48000 Hz, mono, fltp, 86 kb/sStream mapping :  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))Output #0, null, to ’pipe :’ :  
    Metadata :    encoder : Lavf58.17.101    Stream #0:0 : Audio : pcm_s16le, 48000 Hz, mono, s16, 768 kb/s   
     Metadata :      encoder : Lavc58.21.105 pcm_s16le
    

    [silencedetect @ 0000023df1786840] silence_start : 50.1098
    [silencedetect @ 0000023df1786840] silence_end : 51.5957 | silence_duration : 1.48588
    [silencedetect @ 0000023df1786840] silence_start : 51.5959
    [silencedetect @ 0000023df1786840] silence_end : 52.127 | silence_duration : 0.531062
    [silencedetect @ 0000023df1786840] silence_start : 52.8622
    [silencedetect @ 0000023df1786840] silence_end : 54.0096 | silence_duration : 1.14733
    [silencedetect @ 0000023df1786840] silence_start : 54.6804

    as you can see in result silence detection done but with error at the first.
    this mean input file pumped correctly in ffmpg but waiting.
    how can i solve problem without set time out for p.WaitForExit()

    private void Execute(string exePath, string parameters, Stream inputStream)
            
                byte[] Data = new byte[5000] ;
    

    var p = new Process() ;
    var sti = p.StartInfo ;
    sti.CreateNoWindow = true ;
    sti.UseShellExecute = false ;
    sti.FileName = exePath ;
    sti.Arguments = arg ;
    sti.LoadUserProfile = false ;
    sti.RedirectStandardInput = true ;
    sti.RedirectStandardOutput = true ;

    sti.RedirectStandardError = true ;

    p.ErrorDataReceived += P_ErrorDataReceived ;
    p.OutputDataReceived += P_OutputDataReceived ;

    p.Start() ;

    p.BeginOutputReadLine() ;
    p.BeginErrorReadLine() ;

    var spInput = new StreamPump(inputStream, p.StandardInput.BaseStream, 4064) ;
    spInput.Pump((pump, result) =>

    pump.Output.Flush() ;
    inputStream.Dispose() ;
    ) ;

    //unlimited waiting
    //p.WaitForExit() ;

    p.WaitForExit(1000) ;

  • Extracting frames every second of all videos in folder

    20 octobre 2023, par Sparkiepandas

    I am trying to extract a frame every second of a video, while having multiple videos in a folder. I got it working for 1 video like this, but I think I am messing up my loop for all videos. Below is the code for 1 video that works.

    



    import cv2
pathOut = r"C:/Users/Me/Out/"
vidcap = cv2.VideoCapture(r'C:\Me\Desktop\test.mp4');
count = 0
success = True
while success:
    success,image = vidcap.read()
    print('read a new frame:',success)
    if count%30 == 0 :
         cv2.imwrite(pathOut + 'frame%d.jpg'%count,image)
    count+=1


    



    With the loop for all videos I made it up like this.

    



    import os
import cv2
pathOut = r"C:/Users/Me/Out/"
count = 0
success = True
counter = 1
listing = os.listdir(r'C:/Users/Me/videos/train')
for vid in listing:
    vid = r"C:/Users/Me/videos/train/"+vid
    cap = cv2.VideoCapture(vid)
    count = 0
    counter += 1
    while success:
        success,image = cap.read()
        print('read a new frame:',success)
        if count%30 == 0 :
             cv2.imwrite(pathOut + 'frame%d.jpg'%count,image)
        count+=1


    



    My vid loop does not seems to work because it is only taking one video. Then it states false, probably because there are no frames left, but I do not know how to push it forward to the next video. I think I need to do some minor adjustment, does anybody have any idea what exactly ?

    


  • Slow audio-video sync drift when merging wav and mp4 with ffmpeg

    27 juin 2018, par charlie80

    I have an mp4 file with only a single video stream (no audio) and a wav audio file that I would like to add to the video using ffmpeg. The audio and the video have been recorded simultaneously during a conference, the former from a mixer output on a PC and the latter from a digital videocamera.

    I am using this ffmpeg command :

    ffmpeg -i incontro3.mp4 -itsoffset 18.39 -i audio_mix.wav -c:v copy -c:a aac final-video.mp4

    where I’m using the -itsoffset 18.39 option since I know that 18.39s is the video-audio delay.

    The problem I’m experiencing is that in the output file, while the audio is perfectly in sync with the video at the beginning, it slowly drifts out of sync during the movie.

    The output if ffprobe on the video file is :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'incontro3.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.25.100
     Duration: 00:47:22.56, start: 0.000000, bitrate: 888 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 886 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
       Metadata:
         handler_name    : VideoHandler

    and the ffprobe output for the audio file is :

    Input #0, wav, from 'audio_mix.wav':
     Metadata:
       track           : 5
       encoder         : Lavf57.25.100
     Duration: 00:46:32.20, bitrate: 1411 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s

    I’m using the latest ffmpeg Zeranoe windows build git-9591ca7 (2016-05-25).

    Thanks in anticipation for any help/ideas !


    UPDATE 1 : It looks like the problem is upstream the video-audio merging, and could be in the concatenation and conversion of the MTS files generated by the video camera into the mp4 video. I will follow up as I make any progress in understanding...


    UPDATE 2 : The problem is not in the initial merging of the MTS files generated by the camera. Or, at least, it occurs identically if I merge them with cat or with ffmpeg -f concat


    UPDATE 3 : Following @Mulvya’s suggestion, I observed that the drift rate is constant (at least as far as I can tell judging by eye). I also tried to superimpose the A/V tracks with another software, and the drift is exactly the same, thereby ruling out ffmpeg as culprit. My (bad) feeling is that the issue could be related to the internal clocks of the digital video camera and the laptop used for audio recording running at slightly different rates (see here the report of an identical issue I just found).