PndFFmpegKit Library | B4X Programming Forum
PndFFmpegKit
Author: Author: Taner Şener – B4a Wrapper: Pendrush
Version: 0.5
- PndFFmpegKit
- Events:
- Log (FFmpegLog As PndFFmpegLog)
- ProbeSessionComplete (Session As PndFFmpegSession)
- SessionComplete (Session As PndFFmpegSession)
- Statistics (Stats As PndFFmpegStatistics)
- Functions:
- CancelAll
Cancels all running sessions.
This method does not wait for termination to complete and returns immediately. - CancelSession (SessionId As Long)
Cancels the session specified with sessionId.
This method does not wait for termination to complete and returns immediately - ExecuteAsync (Command As String) As PndFFmpegSession
Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command into arguments. You can use single or double quote characters to specify arguments inside your command.
Note that this method returns immediately and does not wait the execution to complete. - Initialize (EventName As String)
Initialize FFMpegKit
FFmpegKit.Initialize(“FFmpegKit”)
Dim InputFilePath As String = File.Combine(File.DirInternal, “1.mp4”)
Dim OutputFilePath As String = File.Combine(File.DirInternal, “2.mp4”)
Dim FFmpegCommand As String = “-i ” & InputFilePath & ” -c:v mpeg4 ” & OutputFilePath
FFmpegKit.ExecuteAsync(FFmpegCommand) - ProbeExecuteAsync (Command As String) As PndFFmpegSession
Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command into arguments. You can use single or double quote characters to specify arguments inside your command.
Note that this method returns immediately and does not wait the execution to complete.
- CancelAll
- Properties:
- LogLevel As com.arthenica.ffmpegkit.Level [write only]
Sets the log level
- LogLevel As com.arthenica.ffmpegkit.Level [write only]
- Events:
- PndFFmpegLog
- Properties:
- Message As String [read only]
Returns log message. - SessionId As Long [read only]
Returns the session identifier.
- Message As String [read only]
- Properties:
- PndFFmpegLogLevel
- Fields:
- LOG_LEVEL_DEBUG As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_ERROR As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_FATAL As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_INFO As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_PANIC As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_QUIET As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_STDERR As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_TRACE As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_VERBOSE As com.arthenica.ffmpegkit.Level
- LOG_LEVEL_WARNING As com.arthenica.ffmpegkit.Level
- Fields:
- PndFFmpegReturnCode
- Fields:
- VALUE_CANCEL As Int
- VALUE_SUCCESS As Int
- Functions:
- IsValueCancel As Boolean
- IsValueError As Boolean
- IsValueSuccess As Boolean
- Properties:
- IsCancel As Boolean [read only]
- IsSuccess As Boolean [read only]
- Value As Int [read only]
- Fields:
- PndFFmpegSession
- Properties:
- Command As String [read only]
Returns command arguments as a concatenated string - CreateTime As java.util.Date [read only]
Returns session create time. - Duration As Long [read only]
Time taken to execute this session in milliseconds or zero (0) if the session is not over yet - EndTime As java.util.Date [read only]
Returns session end time. - Output As String [read only]
Returns the log output generated while running the session. - ReturnCode As PndFFmpegReturnCode [read only]
Returns the return code for this session. Note that return code is only set for sessions that end with COMPLETED state. If a session is not started, still running or failed then this method returns null. - SessionId As Long [read only]
Returns the session identifier. - SessionState As String [read only]
Returns the state of the session.
Possible values:
CREATED
RUNNING
FAILED
COMPLETED
- Command As String [read only]
- Properties:
- PndFFmpegStatistics
- Properties:
- Bitrate As Double [read only]
Returns bitrate - SessionId As Long [read only]
Returns the session identifier. - Size As Long [read only]
Returns file size. - Speed As Double [read only]
Returns speed - Time As Int [read only]
Returns curent video time. - VideoFps As Float [read only]
Returns video FPS. - VideoFrameNumber As Int [read only]
Returns video frame number. - VideoQuality As Float [read only]
Returns video quality.
- Bitrate As Double [read only]
- Properties:
Read more here: Source link