(self, graph_config)
| 189 | return encoder_command |
| 190 | |
| 191 | def get_ffmpeg_command(self, graph_config): |
| 192 | ffmpeg_path = os.getenv('FFMPEG_BIN_PATH') |
| 193 | if ffmpeg_path is None: |
| 194 | command = 'ffmpeg ' |
| 195 | else: |
| 196 | command = ffmpeg_path + "/ffmpeg " |
| 197 | # command = "ffmpeg " |
| 198 | filter_command_list = [] |
| 199 | decoder_command_list = [] |
| 200 | encoder_command_list = [] |
| 201 | self.decoder_index_ = 0 |
| 202 | self.decoder_input_streams_ = {} |
| 203 | for node in graph_config.get_nodes(): |
| 204 | md_name = node.get_module_info().get_name() |
| 205 | if md_name == "c_ffmpeg_decoder": |
| 206 | decoer_command = self.get_decoder_command(node) |
| 207 | decoder_command_list.append(decoer_command) |
| 208 | elif md_name == "c_ffmpeg_filter": |
| 209 | filter_command = self.get_filter_command(node) |
| 210 | filter_command_list.append(filter_command) |
| 211 | elif md_name == "c_ffmpeg_encoder": |
| 212 | encoder_command = self.get_encoder_command(node) |
| 213 | encoder_command_list.append(encoder_command) |
| 214 | |
| 215 | for decoder_command in decoder_command_list: |
| 216 | command = command + decoder_command |
| 217 | if len(filter_command_list) > 0: |
| 218 | command = command + ' -filter_complex "' + filter_command_list[0] |
| 219 | for index in range(1, len(filter_command_list)): |
| 220 | command = command + ";" + filter_command_list[index] |
| 221 | command = command + '" ' |
| 222 | for encoder_command in encoder_command_list: |
| 223 | command = command + encoder_command |
| 224 | return command |
| 225 | |
| 226 | def is_valid_for_ffmpeg(self, graph_config): |
| 227 | for node in graph_config.get_nodes(): |
no test coverage detected