Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (50)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (7198)

  • If conditions in a loop breaking ffmpeg zoom command

    6 mai 2017, par Sulli

    I have built a bash script where I am trying to zoom in an image with ffmpeg, for 10s :

    ffmpeg -r 25 -i image0.jpg -filter_complex "scale=-2:10*ih,zoompan=z='min(zoom+0.0015,1.5)':d=250:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',scale=-2:720"  -y -shortest -c:v libx264 -pix_fmt yuv420p temp_1.mp4

    This command is included in a while loop, with two "if" conditions at the beginning of the loop :

    first=1017
    i=0
    while read status author mySource myFormat urlIllustration credit shot_id originalShot categories title_EN length_title_EN text_EN tags_EN title_FR length_title_FR text_FR tags_FR title_BR length_title_BR text_BR tags_BR; do

       if [ $myFormat != "diaporama" ]; then
           let "i = i + 1"
           continue
       fi

       if [ "$shot_id" -lt "$first" ]; then
           let "i = i + 1"
           continue
       fi

       rm temp_1.mp4
       ffmpeg -r 25 -i image0.jpg -filter_complex "scale=-2:10*ih,zoompan=z='min(zoom+0.0015,1.5)':d=250:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',scale=-2:720"  -y -shortest -c:v libx264 -pix_fmt yuv420p temp_1.mp4


       let "i = i + 1"
    done <../data.tsv
    echo "All done."

    (I have removed stuff in the loop, this is the minimal code that is able to capture the problem).

    Now the weird bug : if I run this code like that, the video I am trying to generate will not be 10s long, only 1-2s long. ffmpeg exits with error "[out_0_0 @ 0x2fa4c00] 100 buffers queued in out_0_0, something may be wrong."

    Now if I remove one of the "if" conditions at the beginning of my loop (the first or the second, it doesn’t matter), the video will be generated fine and be 10s long.

    What could be the cause of this problem ?

  • FFMPEG- force abortion on certain conditions

    18 juin 2023, par POL

    FFMPEG shows various errors, once in a while, during which the video is stuck or choppy. I couldn't find a way to fix it, but I figured that if I start the process again, it gets fixed.
The errors are like :
timestamp discontinuity for stream
New video stream with index 6

    


    This is what I run :

    


    ffmpeg -xerror -abort_on empty_output_stream+empty_output -fflags +discardcorrupt -http_persistent false -i URL -c:v libx264 -c:a aac -preset superfast -copyts -f mpegts udp://localhost:1937?pkt_size=1316


    


    How can I force FFMPEG to abort ?

    


  • Different results for exit conditions in process call

    31 août 2017, par Martin KS

    As a small part of a project, I’m calling ffmpeg to convert a video - I worked from an old example that used some of the output to create a progress bar, which was hanging. Code below :

    [initiation code common to both examples]
       Dim inputFile, outputFile As String, myProcess As New Process
       Dim psiProcInfo As New ProcessStartInfo, ffreader As StreamReader


       inputFile = "C:\Users\mklefass\Downloads\Video 2017-08-16 21.01.39.mov"
       outputFile = "C:\Users\mklefass\Downloads\tmp2\Output"

       psiProcInfo.FileName = Application.StartupPath + "\ffmpeg.exe"  'Location Of FFMPEG.EXE
       psiProcInfo.Arguments = " -i " & Chr(34) & inputFile & Chr(34) & " -vf fps=5 " & Chr(34) & outputFile & "%d.jpg" & Chr(34)                              'start ffmpeg with command strFFCMD string
       psiProcInfo.UseShellExecute = False                             'use the shell execute command we always want no
       psiProcInfo.WindowStyle = ProcessWindowStyle.Hidden             'hide the ffmpeg process window
       psiProcInfo.RedirectStandardError = True                        'Redirect the error out so we can read it
       psiProcInfo.RedirectStandardOutput = True                       'Redirect the standard out so we can read it
       psiProcInfo.CreateNoWindow = True

    [bit that changes]
    myProcess.Start()
    ffreader = myProcess.StandardError
    Do
       Try
           If Not myProcess.HasExited Then
               'Debug.WriteLine(ffreader.ReadLine)
           End If
       Catch
           If Not myProcess.HasExited Then
               MsgBox("Something went wrong")
           End If
       End Try
    Loop Until myProcess.HasExited
    MsgBox("done")

    I then found another example that just called the executable and then continued when it was done - as below :

    [same initialisation]
    Debug.WriteLine("Starting...")
    myProcess.Start()
    strOutput = myProcess.StandardError.ReadToEnd
    myProcess.WaitForExit()
    myProcess.Close()

    Debug.Write(strOutput)
    MsgBox("done")

    The second approach worked perfectly... What’s different about the "exit state" that Process.HasExited and Process.WaitForExit look for ?