Featurehelp wanted
Repository metrics
- Stars
- (4,641 個のスター)
- PR merge metrics
- (30d に merged PR はありません)
説明
I need to change mp3 file to wmv file and then upload converted wmv to youtube. The converted wmv file does not stream on youtube. How video should be encoded while converting to wmv so that converted file can be streamed on youtube. The code below doesnot work.
$ffmpeg = FFMpeg\FFMpeg::create(array(
'ffmpeg.binaries' => 'ffmpeg/bin/ffmpeg',
'ffprobe.binaries' => 'ffmpeg/bin/ffprobe',
'timeout' => 360000, // The timeout for the underlying process
'ffmpeg.threads' => 12, // The number of threads that FFMpeg should use
), $logger);
$img_url=__DIR__ . '/image.png';
$video = $ffmpeg->open(__DIR__ . '/input.mp3');
$format = new FFMpeg\Format\Video\X264();
$format->setVideoCodec('libx264');
$format ->setAudioCodec("aac");
$video->filters()->addMetadata(["title" => "My songVideo", "artist"=>"artistVideo", "album"=>"AlbumVideo", "composer"=>"ComposerVideo4", "track" => "103","date"=>"2018","isrc"=>"us:1231123123","upc"=>"213213324","artwork"=>$img_url]);
$format->on('progress', function ($video, $format, $percentage) {
echo "$percentage % transcoded";
});
$video->save($format, 'outpur.wmv');