
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (78)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)
Sur d’autres sites (4819)
-
FFMPEG conversion (h.264) taking long time for short videos
15 février 2023, par SaraI am trying to record the video and upload into the aws s3 server. Vuejs as front end and php Laravel as backend, I was not using any conversion before saving it to s3. Due to this if any recording recorded from android cannot be played in apple device due to some codecs..
To over come this, I am using ffmpeg to encode in X264() format to make it play in apple and android device regardless on which device the recording is done.


1 min video taking 6-7 minutes using ffmpeg. I thought may be aws s3 taking time to save, i commented "saving to s3 bucket code" still very slow to save temp public folder in php.


please check the code if i am missing anything to make conversion quick. if any solution update answer with reference link or code snippet with reference to my code below.


public function video_upload(Request $request)
 {
 // Response Declaration 
 $response=array();
 $response_code = 200;
 $response['status'] = false;
 $response['data'] = [];
 // Validation
 // TODO: Specify mimes:mp4,webm,ogg etc 
 $validator = Validator::make(
 $request->all(), [
 'file' => 'required'
 ]
 );
 if ($validator->fails()) {
 $response['data']['validator'] = $validator->errors();
 return response()->json($response);
 }
 try{
 $file = $request->file('file');
 //convert
 $ffmpeg = FFMpeg\FFMpeg::create();
 $video = $ffmpeg->open($file);
 $format = new X264(); 
 //end convert
 $file_name = str_replace (' ', '-', Hash::make(time()));
 $file_name = preg_replace('/[^A-Za-z0-9\-]/', '',$file_name).'.mp4';
 
 $video->save($format, $file_name);
 $file_folder = 'uploads/video/';
 // Store the file to S3
 
 // $store = Storage::disk('s3')->put($file_folder.$file_name, file_get_contents($file));
 $store = Storage::disk('s3')->put($file_folder.$file_name, file_get_contents($file_name));
 if($store){
 // Replace old file if exist
 //delete the file from public folder
 $file = public_path($file_name);
 if (file_exists($file)) {
 unlink($file);
 }

 if(isset($request->old_file)){
 
 if(Storage::disk('s3')->exists($file_folder.basename($request->old_file))) {
 Storage::disk('s3')->delete($file_folder.basename($request->old_file));
 }
 }
 }
 $response['status'] = true;
 $response['data']= '/s3/'.$file_folder. $file_name;

 }catch (\Exception $e) {
 $response['data']['message']=$e->getMessage()."line".$e->getLine();
 $response_code = 400;
 }
 return response()->json($response, $response_code);
 }



Its blocking point for me. I cannot let user to wait 5-6 mins to upload 1 min video.


-
Recording multiple cameras using gstreamer/ffmpeg, encoding problems
11 février 2021, par kepittoI have an incoming UDP-MJPEG-Stream of 4-10 Kameras and I need to live-store these in a way to be able to store atleast a few days of data, preferably up to a week atleast. I'm testing the setup with 1 camera right now and have following issues :


If I were to save the incoming stream via matroska without transcoding it I receive : 171,9GB/day, which is way too much if I want to run this with 10 cameras.

So I've looked a lot into different codecs and compared a few (x264, x265, vp8, vp9) and also checked the CPU usage and realized this won't be managable without Hardware Acceleration if I want to run 10 cameras on an embedded device. My target device will probably have H.264 and maybe VP8 encoding/decoding

Which leads me to my first questions, how capable are hardware encoder/decoder ? Will I be able to transcode 10 camera-streams at the same time (raspberry pi h.264 hardware accel for example ; i'll use a more capable device for the final implementation) ? Maybe store chunks and transcode the files instead of stream ?


gst-launch-1.0 udpsrc port=52000 do-timestamp=true caps=image/jpeg,framerate=30/1 blocksize=4096 ! queue ! jpegparse ! queue ! jpegdec ! queue ! videoconvert ! x265enc ! queue ! h265parse ! queue ! matroskamux ! filesink location=x.mkv 



This pipeline works, but the file is 20% bigger than the same file with x264enc (without parse before mux-parsing shouldn't make a difference though).

As a comparison on ffmpeg I get a file which is 11 times smaller in size with following command :

ffmpeg -framerate 30 -i udp -pix_fmt yuv420p -vcodec libx265 out.mkv



Also vp8/vp9 encoding doesn't work on gstreamer at all. I use the same pipeline as above with vp8enc/vp9enc instead. I get videos which are too short and with a lot of random frames. Maybe performanceissue ?


On ffmpeg I can capture and transcode to vp8, but vp9 doesn't work either. (Frames drop too low followed by errors, most likely performance issue)


Does live-transcoding make sense and is it achievable on an embedded device ?


-
lavf/matroskaenc : Fix memory leak after write trailer
4 avril 2019, par Jun Zhaolavf/matroskaenc : Fix memory leak after write trailer
Fix memory leak after write trailer for #7827, only store a audio
packet whose buffer has size greater than zero in cur_audio_pkt.Audio packets with size zero, but with side-data currently lead to
memleaks, in the Matroska muxer, because they are not properly freed :They are currently put into an AVPacket in the MatroskaMuxContext to
ensure that the necessary audio is always available for a new cluster,
but are only written and freed when their size is > 0.As the only use we have for such packets consists in updating the
CodecPrivate it makes no sense to store these packets at all and this
is how this commit solves the memleak.Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by : Jun Zhao <barryjzhao@tencent.com>