| @@ 82-94 (lines=13) @@ | ||
| 79 | * |
|
| 80 | * @return array |
|
| 81 | */ |
|
| 82 | public function encoders() |
|
| 83 | { |
|
| 84 | if($this->_info['encoders']['audio'] === []) { |
|
| 85 | $data = $this->runCmd('get_encoders', [$this->config['ffmpeg_path']]); |
|
| 86 | if(is_array($data)) { |
|
| 87 | foreach($data['type'] as $key => $type) { |
|
| 88 | $this->_info['encoders'][($type == 'A' ? 'audio' : 'video')][] = $data['format'][$key]; |
|
| 89 | } |
|
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| 93 | return $this->_info['encoders']; |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * |
|
| @@ 106-118 (lines=13) @@ | ||
| 103 | * |
|
| 104 | * @return array |
|
| 105 | */ |
|
| 106 | public function decoders() |
|
| 107 | { |
|
| 108 | if($this->_info['decoders']['audio'] === []) { |
|
| 109 | $data = $this->runCmd('get_decoders', [$this->config['ffmpeg_path']]); |
|
| 110 | if(is_array($data)) { |
|
| 111 | foreach($data['type'] as $key => $type) { |
|
| 112 | $this->_info['decoders'][($type == 'A' ? 'audio' : 'video')][] = $data['format'][$key]; |
|
| 113 | } |
|
| 114 | } |
|
| 115 | } |
|
| 116 | ||
| 117 | return $this->_info['decoders']; |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|
| 121 | * @param string $format |
|