Этот вопрос закрыт для ответов, так как повторяет вопрос Не сохраняет видео wepbm?
cashloveyou
@cashloveyou
Хороший чел

В чем ошибка при сохранении webm?

Не правильный путь или что ? при сохранении видео после трансляции путь до видео отображает в виде /storage/uploads/1/2017/livestreams/video1e89c3d59a1b0425d88e80a866daa928. (пример)
и в папке пустота
посмотрите пожалуйста функцию где косяк? есть какие то другие методы? видео записывается в блоб после конвертируется сам процесс конвертации проходит отлично , а при сохранении 200 (ok)
Сама функция
function combineVideoAudio($video_file, $audio_file){
    $OSList = array
    (
    'Windows 3.11' => 'Win16',
    'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)',
    'Windows 98' => '(Windows 98)|(Win98)',
    'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)',
    'Windows XP' => '(Windows NT 5.1)|(Windows XP)',
    'Windows Server 2003' => '(Windows NT 5.2)',
    'Windows Vista' => '(Windows NT 6.0)',
    'Windows 7' => '(Windows NT 7.0)',
    'Windows 8' => '(Windows NT 8.1)',
    'Windows 10' => '(Windows NT 10.0)',
    'Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)',
    'Windows ME' => 'Windows ME',
    'Open BSD' => 'OpenBSD',
    'Sun OS' => 'SunOS',
    'Linux' => '(Linux)|(X11)',
    'Mac OS' => '(Mac_PowerPC)|(Macintosh)',
    'QNX' => 'QNX',
    'BeOS' => 'BeOS',
    'OS/2' => 'OS/2',
    'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves/Teoma)|(ia_archiver)'
    );
    foreach($OSList as $CurrOS=>$Match) if (preg_match("/".$Match."/i", $_SERVER['HTTP_USER_AGENT'])) break;
	$merge_dir = path('storage/uploads/'.get_userid().'/'.date('Y').'/livestreams/merged');
	@mkdir($merge_dir, 0777);
	$merged_file = $merge_dir.'/'.time().rand(0, 999).'.webm';
	//exec(config('video-ffmpeg-path').' -i '.$audio_file.' -vn -acodec copy '.$audio_file.'.oga 2>&1', $out, $ret);
	exit(var_dump($audio_file, $video_file));
	if(!strrpos($CurrOS, "Windows")) $cmd = '-i '.$audio_file.' -i '.$video_file.' -map 0:0 -map 1:0 '.$merged_file;
	else $cmd = ' -i '.$audio_file.'.oga -i '.$video_file.' -c:v mpeg4 -c:a vorbis -b:v 64k -b:a 12k -strict experimental '.$merged_file;
	
	exec(config('video-ffmpeg-path').' '.$cmd.' 2>&1', $out, $ret);
//	exit(var_dump($out, $ret));
	if ($ret){
		return ['status'=> 0, 'message' => $out];
	} else {
		unlink(path($audio_file));
		unlink(path($video_file));
		return ['status'=> 1, 'message' => "Ffmpeg successfully merged audio/video files into single WebM container!\n", 'file_path' => $merged_file];
	}
}
  • Вопрос задан
  • 187 просмотров
Ваш ответ на вопрос

Вопрос закрыт для ответов и комментариев

Потому что уже есть похожий вопрос.
Похожие вопросы
YCLIENTS Москва
от 200 000 до 350 000 ₽
Ведисофт Екатеринбург
от 25 000 ₽
ИТЦ Аусферр Магнитогорск
от 100 000 до 160 000 ₽