Code Duplication    Length = 17-17 lines in 2 locations

src/PlaygroundCore/Service/Ffmpeg.php 2 locations

@@ 228-244 (lines=17) @@
225
    /**
226
     * ffmpeg -i sound.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 out.mp3
227
     */
228
    public function convertToMp3($source, $target)
229
    {
230
        $this->serviceLocator->setShared('playgroundcore_phpvideotoolkit', false);
231
       
232
        $this->serviceLocator->get('playgroundcore_phpvideotoolkit')
233
            ->addPreInputCommand('-y')
234
            ->addCommand('-i', $source)
235
            ->addCommand('-vn')
236
            ->addCommand('-ar', '44100')
237
            ->addCommand('-ac', '2')
238
            ->addCommand('-ab', '192')
239
            ->addCommand('-f', 'mp3')
240
            ->setOutputPath($target)
241
            ->execute();
242
        
243
        return $target;
244
    }
245
246
    public function convertMovToMp4($videoSource, $target)
247
    {
@@ 246-262 (lines=17) @@
243
        return $target;
244
    }
245
246
    public function convertMovToMp4($videoSource, $target)
247
    {
248
        $this->serviceLocator->setShared('playgroundcore_phpvideotoolkit', false);
249
       
250
        $this->serviceLocator->get('playgroundcore_phpvideotoolkit')
251
            ->addPreInputCommand('-y')
252
            ->addCommand('-i', $videoSource)
253
            ->addCommand('-vcodec', 'h264')
254
            ->addCommand('-acodec', 'aac')
255
            ->addCommand('-strict', '2')
256
            ->addCommand('-pix_fmt', 'yuv420p')
257
            ->addCommand('-movflags', '+faststart')
258
            ->setOutputPath($target)
259
            ->execute();
260
        
261
        return $target;
262
    }
263
264
    public function mergeMp4($videoSource, $target)
265
    {