Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (51)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Organiser par catégorie

    17 mai 2013, par

    Dans 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 (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (7479)

  • Dreamcast Track Sizes

    1er mars 2015, par Multimedia Mike — Sega Dreamcast

    I’ve been playing around with Sega Dreamcast discs lately. Not playing the games on the DC discs, of course, just studying their structure. To review, the Sega Dreamcast game console used special optical discs named GD-ROMs, where the GD stands for “gigadisc”. They are capable of holding about 1 gigabyte of data.

    You know what’s weird about these discs ? Each one manages to actually store a gigabyte of data. Each disc has a CD portion and a GD portion. The CD portion occupies the first 45000 sectors and can be read in any standard CD drive. This area is divided between a brief data track and a brief (usually) audio track.

    The GD region starts at sector 45000. Sometimes, it’s just one humongous data track that consumes the entire GD region. More often, however, the data track is split between the first track and the last track in the region and there are 1 or more audio tracks in between. But the weird thing is, the GD region is always full. I made a study of it (click for a larger, interactive graph) :


    Dreamcast Track Sizes

    Some discs put special data or audio bonuses in the CD region for players to discover. But every disc manages to fill out the GD region. I checked up on a lot of those audio tracks that divide the GD data and they’re legitimate music tracks. So what’s the motivation ? Why would the data track be split in 2 pieces like that ?

    I eventually realized that I probably answered this question in this blog post from 4 years ago. The read speed from the outside of an optical disc is higher than the inside of the same disc. When I inspect the outer data tracks of some of these discs, sure enough, there seem to be timing-sensitive multimedia FMV files living on the outer stretches.

    One day, I’ll write a utility to take apart the split ISO-9660 filesystem offset from a weird sector.

  • Overlay image onto a video at specific time interval using ffmpeg-python

    7 avril 2023, par Moonwalk

    I would like to overlay .png image file onto a video using ffmpeg-python. The image file should appear in the video at time of 5 s until time of 5.5 s.

    


    Here is the sample code containing creation of synthetic video and image, based on this answer

    


    import cv2
import numpy as np
import ffmpeg

# Create synthetic MP4 video
synthetic_file = 'tmp.mp4'
ffmpeg.input('testsrc=duration=10:size=1280x720:rate=30', 
f='lavfi').output(synthetic_file).overwrite_output().run()

width, height, fps = 192, 108, 1

# Create synthetic image file
number_five=5 # image file containing number "5"
p = width//60
img = np.zeros((height, width, 4), np.uint8)
cv2.putText(img, str(number_five), (width//2-p*10*len(str(number_five)), 
height//2+p*10), cv2.FONT_HERSHEY_DUPLEX, p, (255, 255, 255, 255), p*2)
cv2.imwrite(f'{number_five:03d}.png', img)

# Overlaying part of the code
xpos = '(W-w)/2'
ypos = '(H-h)/2'
durat = 'enable=between(t,5,5.5)' # specific time interval
# durat_repr = repr('enable=between(t,5,5.5)')
overlay_video_file = 'tmp_overlay.mp4'

image_overlay = ffmpeg.input(f'{number_five:03d}.png')
v1 = ffmpeg.input(synthetic_file)
v1 = ffmpeg.filter((v1,  image_overlay), 'overlay', durat, x=xpos, y=ypos)
written = ffmpeg.output(v1, overlay_video_file).global_args('-report')
ffmpeg.run(written)


    


    If I check the log file, I see that in the ffmpeg command instead of overlay=enable='between(t,5,5.5)' I have

    


    overlay=enable\\\\\\\\\\\\=between(t\\,5\\,5.5)


    


    Morover, due to this, the image apprears in the video from the very beginning, which is not what I wanted.

    


    I would be grateful for any help.

    


  • FFMPEG conversion (h.264) taking long time for short videos

    15 février 2023, par Sara

    I 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.