Recherche avancée

Médias (0)

Mot : - Tags -/xmp

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (86)

  • 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 (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (16201)

  • Java ffmpeg Process Broken Pipe on OSX

    30 juin 2015, par CrushedPixel

    We’re using ffmpeg to render a video from a Java Application.
    Therefore, a java.lang.Process is being used :

    Process process = new ProcessBuilder(command).directory(folder).start();
    OutputStream outputStream = process.getOutputStream();
    WritableByteChannel channel = Channels.newChannel(outputStream);

    In a new Thread, we’re writing the video to the WritableByteChannel :

    ByteBuffer byteBuffer = ByteBuffer.allocate(img.getWidth() * img.getHeight() * 4);
    byteBuffer.asIntBuffer().put(((DataBufferInt) imgBuffer).getData());
    channel.write(byteBuffer);

    On Windows and Linux machines, this code works very well. However, on my Mac OSX Yosemite Machine, the following error occurs :

    java.io.IOException: Broken pipe
       at java.io.FileOutputStream.writeBytes(Native Method)
       at java.io.FileOutputStream.write(FileOutputStream.java:326)
       at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
       at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
       at test.ffmpeg.VideoWriter$1.run(VideoWriter.java:109)
       at java.lang.Thread.run(Thread.java:745)

    I found an error report hinting to a similar malfunction in sbt here : https://github.com/sbt/sbt/issues/327

    Why does OSX close the Pipe and how can I prevent it ? ffmpeg is properly installed and can be used via command line.

    Thanks in advance for any suggestions !

    Greetings, CrushedPixel

  • Pipe ffmpeg output to named pipe

    9 novembre 2016, par user3657114

    I’m trying to get ffmpegs output to a named pipe, where I could read from another shell. I do not need the video stream piped, just the informations below to get a state of the conversion process back. I am not able to achieve the piping behavior in any way, but I can write the data to a file with the following command :

    ffmpeg -i vid.mov -vcodec h264 -acodec aac -strict -2 -y vid.mp4 > fflog.txt 2>&1

    This leads to the following output in fflog.txt

    Stream mapping:
    Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
    Stream #0:0 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    frame=   50 fps=0.0 q=0.0 size=       0kB time=00:00:03.20 bitrate=   0.1kbits/s
    frame=   73 fps= 70 q=28.0 size=     230kB time=00:00:04.05 bitrate= 465.4kbits/s
    frame=  100 fps= 65 q=28.0 size=     462kB time=00:00:05.44 bitrate= 695.3kbits/s

    Afterwards I can get lines via

    tail -f -1 fflog.txt

    out of the file. But the lines are not escaped correctly, I think. Vi shows me the following :

    frame=   50 fps=0.0 q=0.0 size=       0kB time=00:00:03.20 bitrate=   0.1kbits/s
    ^Mframe=   73 fps= 70 q=28.0 size=     230kB time=00:00:04.05 bitrate= 465.4kbits/s
    ^Mframe=  100 fps= 65 q=28.0 size=     462kB time=00:00:05.44 bitrate= 695.3kbits/s
    ^Mframe=  125 fps= 61 q=28.0 size=     608kB time=00:00:06.48 bitrate= 767.5kbits/s

    So the questions are :

    1. How to convert the CRLF to UNIX like LF to return data correctly via tail -n ?
    2. Or even better : How to pipe the ffmpeg results correctly to a mkfifo named pipe ?
    3. Or the most general : Is there a different way to achieve my goal in a more clever manner ?
  • How to use a Pipe between two processes in Process.Start

    4 juin 2015, par Zed Machine

    I have to run this command line using VB.NET :

    "H :\videotest\test.vpy" - -y | "H :\Release\data\bin64\ffmpeg.exe" -hwaccel auto -y -i - -map 0:v:0 -c:v libx265 -crf 20.0 -preset 5 -x265-params level=0:profile=undefined:pmode:no-pme:pme:no-high-tier:ref=3:bframes=4:open-gop:keyint=250:min-keyint=25:b-adapt=2:bframe-bias=0:rc-lookahead=20:no-scenecut:b-pyramid:me=hex:subme=2:merange=57:temporal-mvp:weightp:no-weightb:max-merge=2:no-weightb:no-rect:no-amp:vbv-bufsize=0:vbv-maxrate=0:vbv-init=0.9:no-strict-cbr:qcomp=0.6:qstep=4:aq-mode=1:aq-strength=1.0:cutree:no-early-skip:min-cu-size=8:ctu=64:no-fast-cfb:ipratio=1.4:pbratio=1.3:cbqpoffs=0:crqpoffs=0:rd=3:psy-rd=0.3:psy-rdoq=1:no-b-intra:no-fast-intra:rdoq-level=1:no-tskip:no-tskip-fast:cu-lossless:tu-intra-depth=1:tu-inter-depth=1:strong-intra-smoothing:no-constrained-intra:nr-intra=0:nr-inter=0:qblur=0.5:cplxblur=20:signhide:sar=16
    "H :\videotest\outputawdwd.mkv"

    vspipe.exe runs the test.vpy script and applies filters to or resizes video input, then the output is piped to ffmpeg for the encoding.

    If I use a normal Process declaration with vspipe it gives the following error :

    Unknown argument : |

    From the command line the script works well. I suspect that means that I have to manually pipe between vspipe and ffmpeg.

    Is it possible to manually pipe output from one process to another ? Must I do it manually ?

    Here is my function to start process :

    executablepath = "H:\Project\VapourSynth\core64\vspipe.exe"

    params = "H:\videotest\test.vpy" - -y | "H:\Release\data\bin64\ffmpeg.exe" -hwaccel auto -y -i - -map 0:v:0 -c:v libx265 -crf 20.0 -preset 5 -x265-params level=0:profile=undefined:pmode:no-pme:pme:no-high-tier:ref=3:bframes=4:open-gop:keyint=250:min-keyint=25:b-adapt=2:bframe-bias=0:rc-lookahead=20:no-scenecut:b-pyramid:me=hex:subme=2:merange=57:temporal-mvp:weightp:no-weightb:max-merge=2:no-weightb:no-rect:no-amp:vbv-bufsize=0:vbv-maxrate=0:vbv-init=0.9:no-strict-cbr:qcomp=0.6:qstep=4:aq-mode=1:aq-strength=1.0:cutree:no-early-skip:min-cu-size=8:ctu=64:no-fast-cfb:ipratio=1.4:pbratio=1.3:cbqpoffs=0:crqpoffs=0:rd=3:psy-rd=0.3:psy-rdoq=1:no-b-intra:no-fast-intra:rdoq-level=1:no-tskip:no-tskip-fast:cu-lossless:tu-intra-depth=1:tu-inter-depth=1:strong-intra-smoothing:no-constrained-intra:nr-intra=0:nr-inter=0:qblur=0.5:cplxblur=20:signhide:sar=16 "H:\videotest\outputawdwd.mkv"

    Private Sub CreateJobProcess(ByVal Name, ByVal executablepath, ByVal params)

       Try

           If Not jobs_processes.ContainsKey(Name) Then

               Dim Proc As New Process

               Proc.StartInfo.UseShellExecute = False
               Proc.StartInfo.CreateNoWindow = True
               Proc.StartInfo.RedirectStandardError = True
               Proc.StartInfo.FileName = "" & executablepath & ""
               Proc.StartInfo.Arguments = params

               'start process
               Proc.Start()

               'add new process to dictionary
               jobs_processes.Add(Name, Proc)

               'TEMP
               My.Settings.giobbe -= 1

               'start background workers for statistics
               If Not ConversionStats.IsBusy Then
                   ConversionStats.WorkerSupportsCancellation = True
                   ConversionStats.RunWorkerAsync()
               End If

               If Not UpdateListJob.IsBusy Then
                   UpdateListJob.WorkerSupportsCancellation = True
                   UpdateListJob.RunWorkerAsync()
               End If

           End If

       Catch ex As Exception
           Me.Invoke(New MethodInvoker(Sub() Logbox.AppendText(Environment.NewLine & ">Program exception:" & Environment.NewLine & ex.Message & Environment.NewLine)))
           MsgBox(ex.Message)
       End Try
    End Sub

    Update :

    This is the block I have changed, this function get job name and parameters for the job that needs to be created, then it saves the process in a dictionary.

                 Dim Proc As New Process

                   Proc.StartInfo.UseShellExecute = False
                   Proc.StartInfo.CreateNoWindow = True
                   Proc.StartInfo.RedirectStandardError = True
                   Proc.StartInfo.FileName = "cmd"
                   Proc.StartInfo.Arguments = params

                   'start process
                   Proc.Start()

                   'add new process to dictionary
                   jobs_processes.Add(Name, Proc)

                   'TEMP
                   My.Settings.giobbe -= 1

                   'start background workers for statistics
                   If Not ConversionStats.IsBusy Then
                       ConversionStats.WorkerSupportsCancellation = True
                       ConversionStats.RunWorkerAsync()
                   End If

                   If Not UpdateListJob.IsBusy Then
                       UpdateListJob.WorkerSupportsCancellation = True
                       UpdateListJob.RunWorkerAsync()
                   End If

    then i have a backgroundworker ( ConversionStats ) that get stderr from every process in the dictionary and print them into textboxes :

              'take current selected process and set streamreader
               Dim tmpproc As Process = jobs_processes(CurrentJob)
               Dim ffmpeg_stats As StreamReader
               Dim stdoutput As String = ""

               'something that verify if the job is started

               If statejob = 1 Then    'if job is working

                   'take stderr from ffmpeg
                   ffmpeg_stats = tmpproc.StandardError
                   stdoutput = ffmpeg_stats.ReadLine()

                   If stdoutput IsNot Nothing Then 'if ffmpeg stderr is not nothing

                       'IF FFMPEG IS RETURNING STATS
                       If stdoutput.Contains("frame=") Or stdoutput.Contains("size=") Then

    so this is my code...
    but now with cmd getting standarderror with streamreader result in taking a string "Invalid Handle." this is an error from cmd stderr or there is a problem with the streamreader ?

    UPDATE 2

    I have even tried to start a clean cmd process declaring only parameters but the result is just the console with main infos.

    Microsoft Windows [Versione 6.3.9600]
    (c) 2013 Microsoft Corporation. Tutti i diritti riservati.

    H :\Project\bin\Release>

    this is the code to clarify :

                   Dim Proc As New Process

                   Proc.StartInfo.FileName = "cmd"
                   Proc.StartInfo.Arguments = params

                   'start process
                   Proc.Start()

    SO AGAIN THERE IS SOMEONE WHO CAN GUIDE ME HOW TO PIPE/REDIRECT STDOUTPUT FROM ONE PROCESS (vspipe.exe) TO THE STDIN OF ANOTHER PROCESS (ffmpeg.exe) ?