Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (57)

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

  • Getting accurate time from FFMPeg with Objective C (Audio Queue Services)

    2 avril 2012, par Winston

    My iPhone app plays an audio file using FFMPeg.

    I'm getting the elapsed time (to show to user) from the playing audio (in minutes and seconds after converting from microseconds, given by FFMPeg) like so :

    AudioTimeStamp currentTimeStamp;
    AudioQueueGetCurrentTime (audioQueue, NULL, &currentTimeStamp, NULL);

    getFFMPEGtime = currentTimeStamp.mSampleTime/self.basicAudioDescription.mSampleRate;

    self.currentAudioTime = [NSString stringWithFormat: @"%02d:%02d",
                               (int) getFFMPEGtime / (int)60000000,
                               (int) ((getFFMPEGtime % 60000000)/1000000)];

    Everything works fine, but when I scrub back or forward to play another portion of the song, the elapsed time will go back to zero, no matter the current position. The timer will always zero out.

    I know I'm suposed to do some math to keep track of the old time and the new time, maybe constructing another clock or so, perhaps implementing another callback function, etc... I'm not sure what way I should go.

    My questions are :

    1) What's the best approach to keep track of the elapsed time when going back/forward in a song, avoiding the clock to always going back to zero ?

    2) Should I look deeply into FFMPeg functions or should I stick with Objective-C and Cocoa Touch for solving this problem ?

    Please, I need some advices/ideas from experienced programmers. I'm stuck. Thanks beforehand !

  • Getting friendly output status of FFMPEG transcode

    23 avril 2013, par SamIAm

    When I transcode a file using

    ffmpeg -i input.avi  -vcodec libx264 output.mp4

    the ffmpeg program will show the status of the file being transcoded bit by bit. It will fill up the screen and if I use a for loop to transcode multiple files, after a while I do not know which file it is up to.

    Is there a way to update only the last line on the bash screen when it is transcoding ?

  • VB.NET FFMPEG Stops

    18 mars 2012, par Mcqueen_23

    Hi evryone i'm trying to convert files using ffmpeg

    my codes only fetched


    — -Skip--- Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Enrique Iglesias - Tonight.mp4' : Metadata : major_brand : mp42 minor_version : 0 compatible_brands : isommp42 creation_time : 2011-03-20 19:07:02 Duration : 00:03:50.05, start : 0.000000, bitrate : 219 kb/s Stream #0.0(und) : Video : h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 117 kb/s, 29.97 fps, 59.75 tbr, 1k tbn, 59.83 tbc Metadata : creation_time : 1970-01-01 00:00:00 Stream #0.1(und) : Audio : aac, 44100 Hz, stereo, s16, 95 kb/s Metadata : creation_time : 2011-03-20 19:07:03 Output #0, mp3, to 'Enrique Iglesias - Tonight.mp3' : Metadata : major_brand : mp42 minor_version : 0 compatible_brands : isommp42 TDEN : 2011-03-20 19:07:02 TSSE : Lavf52.94.0 Stream #0.0(und) : Audio : libmp3lame, 44100 Hz, stereo, s16, 64 kb/s Metadata : creation_time : 2011-03-20 19:07:03

    and cannot i cannot get the next lines ung Proccess.ErrorDataReceived event

    Here are my Codes

       Public Structure ItemStruct
           Public ID, URL, FileName, FileExt, ConvertExt, ConvertQuery As String
           Public FileSize As Int64
           Public Method, status As Method
           Public prog_bar As ProgressBar
           Public DeleteOrigin, TrimStart, TrimEnd As Boolean
       End Structure

       Friend Class Converter
           Public busy As Boolean = False
           Private _Item As ItemStruct
           Public Event ProgressChange(ByVal id As String, ByVal percent As Integer, ByVal etr As TimeSpan)
           Public Event ConvertFinish(ByVal id As String)
           Private m As Threading.Thread
           Private WithEvents timer As New Timer With {.Interval = 100}

           Public Sub New()
           End Sub

           Public Sub New(ByVal item As ItemStruct)
               _Item = item
               m = New Threading.Thread(AddressOf Convert)
           End Sub

           Public Sub Start()
               m.Start()
               timer.Start()
           End Sub

           Private duration As Decimal = 0.0F
           Private current As Decimal = 0.0F
           Private varIsSet As Boolean = False
           Private Sub Convert()
               Dim cmd As String = _Item.ConvertQuery
               Dim inputName As String = _Item.URL
               Dim fName As String = _Item.FileName & _Item.FileExt
               Dim dir As String = _Item.URL.Replace(fName, "")
               Dim ouputName As String = dir & _Item.FileName & "." & _Item.ConvertExt
               cmd = Replace(cmd, "--i", inputName)
               cmd = Replace(cmd, "--o", ouputName)
               cmd = cmd.Remove(0, 6)
               cmd = cmd.Trim
               Dim proc As New Process
               With proc.StartInfo
                   .FileName = Path.Combine(Application.StartupPath, "ffmpeg.exe")
                   .Arguments = cmd
                   proc.EnableRaisingEvents = False
                   .UseShellExecute = False
                   .CreateNoWindow = True
                   .RedirectStandardError = True
                   .RedirectStandardOutput = True
                   .RedirectStandardInput = True
                   AddHandler proc.ErrorDataReceived, AddressOf UpdateData
                   proc.Start()
                   proc.BeginErrorReadLine()
               End With
           End Sub

           Public Sub Cancel()
               m.Abort()
           End Sub

           Private Sub UpdateData(ByVal sender As Object, ByVal e As DataReceivedEventArgs)
               Dim s As String = e.Data
               If s.Contains("Duration: ") Then
                   duration = GetDuration(s)
               ElseIf s.Contains("frame=") Then
                   current = GetTime(s)
               Else
                   Dim proc As Process = DirectCast(sender, Process)
                   Dim m As Match = Regex.Match(s, "^File\ '(.*?)'\ already\ exists", RegexOptions.IgnoreCase)
                   If m.Success Then
                       Dim w As StreamWriter = proc.StandardInput
                       If MessageBox.Show("File '" & m.Groups(1).ToString & "' already exists." & vbNewLine & "Do you want to Overwrite existing file?", "Overwrite", MessageBoxButtons.YesNo) = DialogResult.Yes Then
                           w.WriteLine("y")
                       Else
                           w.WriteLine("n")
                       End If
                   End If

                   'RaiseEvent ConvertFinish(_Item.ID)
                   'proc.WaitForExit()
                   'proc.Close()
               End If
               Debug.Print(s)
               If Not duration And Not current Then varIsSet = False Else varIsSet = True
           End Sub

           Private Function GetDuration(ByVal s As String) As Double
               Dim m As Match = Regex.Match(s, "Duration: ((.*?), (.*))")
               If m.Success Then
                   Dim duration As String = m.Groups(2).ToString
                   Return TimeSpan.Parse(duration).TotalSeconds
               End If
               Return Nothing
           End Function

           Private Function GetTime(ByVal s As String) As Double
               Dim m As Match = Regex.Match(s, "(.*) time=(.*) bitrate")
               If m.Success Then
                   Dim currentTime As String = m.Groups(2).ToString
                   Return TimeSpan.Parse(currentTime).TotalSeconds
               End If
               Return Nothing
           End Function

           Private Sub timer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles timer.Tick
               If varIsSet Then
                   Dim etr As TimeSpan = TimeSpan.FromSeconds(CInt(current / duration))
                   etr = New TimeSpan(etr.Hours, etr.Minutes, etr.Seconds)
                   RaiseEvent ProgressChange(_Item.ID, CInt((current / duration) * 100 * 100), etr)
               End If
           End Sub
       End Class