Пробуем настроить формат видео
This commit is contained in:
		
							parent
							
								
									8887ebb2e7
								
							
						
					
					
						commit
						8be7755917
					
				|  | @ -17,7 +17,8 @@ public function index(Request $request) | ||||||
|             Options::create() |             Options::create() | ||||||
|                 ->downloadPath(env('PATH_TO_DOWNLOAD')) |                 ->downloadPath(env('PATH_TO_DOWNLOAD')) | ||||||
|                 ->url($url) |                 ->url($url) | ||||||
|                 ->remuxVideo('mp4') |                 ->formatSort(['bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio']) | ||||||
|  |                 ->mergeOutputFormat('mp4') | ||||||
|         ); |         ); | ||||||
|         $videotitle = ''; |         $videotitle = ''; | ||||||
|         foreach ($collection->getVideos() as $video) { |         foreach ($collection->getVideos() as $video) { | ||||||
|  | @ -28,7 +29,7 @@ public function index(Request $request) | ||||||
|                 return response(json_encode($response)); |                 return response(json_encode($response)); | ||||||
|             } else { |             } else { | ||||||
|                 $videotitle = $video->getFile()->getFilename(); // Will return Phonebloks
 |                 $videotitle = $video->getFile()->getFilename(); // Will return Phonebloks
 | ||||||
|                 $videotitle = str_replace('webm', 'mp4', $videotitle); |                 //$videotitle = str_replace('webm', 'mp4', $videotitle);
 | ||||||
|                 //$file_path = public_path('/'.'downloads/'.$videotitle);
 |                 //$file_path = public_path('/'.'downloads/'.$videotitle);
 | ||||||
|         	    //return response()->download($file_path);
 |         	    //return response()->download($file_path);
 | ||||||
|                 // $video->getFile(); // \SplFileInfo instance of downloaded file
 |                 // $video->getFile(); // \SplFileInfo instance of downloaded file
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue