Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • ( C# / VB FFMPEG Wrapper ) How can I parse progress of conversion video to audio ?

    20 novembre 2013, par Alaa Alrifaie

    I'd try to become specific as much as I can .

    I searched a lot to find a good .net wrapper for FFMPEG, the best was VB FFmpeg Wrapper

    I'm so bad at using VB.net, and the problem was that I want to use this library in a C# project but I couldn't convert the example program I found from VB.net to C# correctly .

    So, I've edited my C# application, so it writes input video file path to a temporary .txt file .. then run the "Converter" ( Which is written in VB ) !

    The code of my "Converter" :

    Imports System
    Imports System.IO
    
    Public Class Form1
        Public WithEvents MediaConverter As New FFLib.Encoder
    
        Private Sub ConOut(ByVal prog As String, ByVal tl As String) Handles MediaConverter.Progress
            OperationPrgrss.Value = prog
            Application.DoEvents()
        End Sub
    
        Private Sub stat(ByVal status) Handles MediaConverter.Status
            StatusLbl.Text = status
            Application.DoEvents()
        End Sub
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            Try
                Using PathFinder As New StreamReader("_temp.txt")
                    Dim SrcPath As String
                    SrcPath = PathFinder.ReadLine()
                    PathTxtBox.Text = SrcPath
                End Using
            Catch ex As Exception
                MessageBox.Show("The file couldn't be read : " & Environment.NewLine & ex.Message)
            End Try
        End Sub
    
    
        Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
            MediaGenerator.RunWorkerAsync()
        End Sub
    
        Private Sub MediaGenerator_DoWork(sender As Object, e As ComponentModel.DoWorkEventArgs) Handles MediaGenerator.DoWork
            MediaConverter.OverWrite = False
            MediaConverter.SourceFile = PathTxtBox.Text
            MediaConverter.Format = MediaConverter.Format_MP3
            MediaConverter.AudioCodec = MediaConverter.AudioCodec_mp3
            MediaConverter.Video_Codec = MediaConverter.Vcodec_NONE
    
            MediaConverter.Threads = 0
            MediaConverter.OverWrite = True
    
            Dim OutputFldr As String = AppDomain.CurrentDomain.BaseDirectory & "MP3Files\\"
            MediaConverter.OutputPath = OutputFldr
            MediaConverter.AnalyzeFile()
    
            MediaConverter.Encode()
        End Sub
    End Class
    

    What I'm trying to do is converting a video file [ sometime it's WEBM, FLV, MP4 or 3GP ], and the above code does it successfully, but the problem is when using :

    MediaConverter.Video_Codec = MediaConverter.Vcodec_NONE
    

    the progress bar doesn't work, it's value remains 0 ! & When I use any Video codec it works perfectly [ the progress bar ], but the created MP3 file won't work ever with any media player, or in Smartphone & Tv's .. etc ;

    ...

    So, what's the problem ?! and how can I solve it ? I tried a lot to change some functions in the wrapper library source, but as I mentioned before ... I'm just a newbie @ VB.net :\

  • Playing encrypted m4a on Android

    20 novembre 2013, par Fixee

    I'm pulling down encrypted music, decrypting on-the-fly to m4a plaintext buffer and want to then play this music on Android (4.x). It appears the options are bleak:

    1. Write the buffer to disk and use MediaPlayer() with a FileDescriptor
    2. Write the buffer to disk and use a proxy like nano to serve MediaPlayer() via a URI
    3. Decode the buffer to PCM and use AudioTrack to play it

    Options 1 and 2 require writing plaintext to SD, which isn't acceptable. Option 3 requires decoding in software (with, eg, ffmpeg) which seems ridiculous: if there are hardware decoders on the device we can't use them. And if there is a software decoder, we can't access it and put yet another decoder on the device (ffmpeg's).

    Note that using OpenSL doesn't help at all: you still cannot play m4a's from a buffer. Is there another way?

  • How to go about decoding raw H264 frames

    20 novembre 2013, par user2967920

    I need to develop a full screen client that will decode raw h264 frames from a network source. Any suggested approach on where to start? I was looking at ffmpeg but then i have to interface it to VS and i am getting lost on the way there. Microsoft Media Foundation has an inbuilt h264decoder and there is no example simple enough for me to understand. Same with DirectShow but then Microsoft says its extinct tech don't use it. the client should be able to work on WinXP and onwards targets. So if anyone can maybe point me in the right direction it would be great.

  • ffmpeg transcode video, audio to specific configuration [on hold]

    20 novembre 2013, par John Simpson

    I have a mp4 video. I want to transcode it to mp4 video with specific configuration as follows: - video, h264, resolution: 720x480, framerate: 24. - audio, aac, 44100 Hz.

    How can I achieve that by using ffmpeg ?

  • Interactive flash content on iOS

    20 novembre 2013, par Pratik Goswami

    I want to play interactive (user inputs/actions) flash contents-videos on the iOS devices. I am having flv files in which user can have their inputs like option selection, page turn etc.

    I am having 2 approach about the functionality. Please correct if I am wrong.

    1.Adobe-air can be used on the iPad devices. Does it have the ability to parse flash content run time? (use flash content as resources/bundle)

    2.With the help of FFMPEG lib flash files/videos will work, but will it provide user actions/interactions?