|
|
@ -23,8 +23,8 @@ import java.util.List; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Main class to run <code>FFprobe</code> commands. Supports executing commands both |
|
|
|
* <p>Main class to run <code>FFprobe</code> commands. Supports executing commands both synchronously and |
|
|
|
* synchronously and asynchronously. |
|
|
|
* asynchronously. |
|
|
|
* <pre> |
|
|
|
* <pre> |
|
|
|
* FFprobeSession session = FFprobeKit.execute("-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4"); |
|
|
|
* FFprobeSession session = FFprobeKit.execute("-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4"); |
|
|
|
* |
|
|
|
* |
|
|
@ -67,7 +67,10 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Asynchronously executes FFprobe with arguments provided. |
|
|
|
* <p>Starts an asynchronous FFprobe execution with arguments provided. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param arguments FFprobe command options/arguments as string array |
|
|
|
* @param arguments FFprobe command options/arguments as string array |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
@ -83,7 +86,10 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Asynchronously executes FFprobe with arguments provided. |
|
|
|
* <p>Starts an asynchronous FFprobe execution with arguments provided. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param arguments FFprobe command options/arguments as string array |
|
|
|
* @param arguments FFprobe command options/arguments as string array |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
@ -101,7 +107,10 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Asynchronously executes FFprobe with arguments provided. |
|
|
|
* <p>Starts an asynchronous FFprobe execution with arguments provided. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param arguments FFprobe command options/arguments as string array |
|
|
|
* @param arguments FFprobe command options/arguments as string array |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
@ -119,7 +128,10 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Asynchronously executes FFprobe with arguments provided. |
|
|
|
* <p>Starts an asynchronous FFprobe execution with arguments provided. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param arguments FFprobe command options/arguments as string array |
|
|
|
* @param arguments FFprobe command options/arguments as string array |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
@ -151,9 +163,11 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command |
|
|
|
* <p>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 |
|
|
|
* into arguments. You can use single or double quote characters to specify arguments inside your command. |
|
|
|
* your command. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param command FFprobe command |
|
|
|
* @param command FFprobe command |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
@ -165,9 +179,11 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command |
|
|
|
* <p>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 |
|
|
|
* into arguments. You can use single or double quote characters to specify arguments inside your command. |
|
|
|
* your command. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param command FFprobe command |
|
|
|
* @param command FFprobe command |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
@ -181,9 +197,11 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command |
|
|
|
* <p>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 |
|
|
|
* into arguments. You can use single or double quote characters to specify arguments inside your command. |
|
|
|
* your command. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param command FFprobe command |
|
|
|
* @param command FFprobe command |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
@ -201,9 +219,11 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Asynchronously executes FFprobe command provided. Space character is used to split command |
|
|
|
* <p>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 |
|
|
|
* into arguments. You can use single or double quote characters to specify arguments inside your command. |
|
|
|
* your command. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param command FFprobe command |
|
|
|
* @param command FFprobe command |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
@ -253,7 +273,10 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Extracts media information for the file specified with path asynchronously. |
|
|
|
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param path path or uri of a media file |
|
|
|
* @param path path or uri of a media file |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
@ -269,7 +292,10 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Extracts media information for the file specified with path asynchronously. |
|
|
|
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param path path or uri of a media file |
|
|
|
* @param path path or uri of a media file |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
@ -289,7 +315,10 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Extracts media information for the file specified with path asynchronously. |
|
|
|
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param path path or uri of a media file |
|
|
|
* @param path path or uri of a media file |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
|
* @param executeCallback callback that will be called when the execution is completed |
|
|
@ -307,7 +336,10 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Extracts media information for the file specified with path asynchronously. |
|
|
|
* <p>Starts an asynchronous FFprobe execution to extract the media information for the specified file. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param path path or uri of a media file |
|
|
|
* @param path path or uri of a media file |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
@ -343,7 +375,11 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Extracts media information using the command provided asynchronously. |
|
|
|
* <p>Starts an asynchronous FFprobe execution to extract media information using a command. The command passed to |
|
|
|
|
|
|
|
* this method must generate the output in JSON format in order to successfully extract media information from it. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param command FFprobe command that prints media information for a file in JSON format |
|
|
|
* @param command FFprobe command that prints media information for a file in JSON format |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
@ -359,7 +395,12 @@ public class FFprobeKit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Extracts media information using the command arguments provided asynchronously. |
|
|
|
* <p>Starts an asynchronous FFprobe execution to extract media information using command arguments. The command |
|
|
|
|
|
|
|
* passed to this method must generate the output in JSON format in order to successfully extract media information |
|
|
|
|
|
|
|
* from it. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note that this method returns immediately and does not wait the execution to complete. You must use an |
|
|
|
|
|
|
|
* {@jlink ExecuteCallback} if you want to be notified about the result. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param arguments FFprobe command arguments that print media information for a file in JSON format |
|
|
|
* @param arguments FFprobe command arguments that print media information for a file in JSON format |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
|
* @param executeCallback callback that will be notified when execution is completed |
|
|
|