Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (24)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • 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 (3233)

  • I don't know how to use laravel ffmpeg

    30 mars 2018, par Stephany. S123

    I just downloaded ffmpeg form my laravel application. Now I am trying to use it and I don’t how to use it. I am trying to compress my files when its uploaded. I know you might suggest for me to go to to https://packagist.org/packages/pbmedia/laravel-ffmpeg but thats not really telling me anything. Here is my code on my controller

    use FFMpeg ;

    $this->validate($request,array(
       'video' => 'file|required|mimes:mp4,flv,wmv,avi,mov,qt|max:102400',
    ));

    $pro=new Profile;
    $vid = $request->file('video');
    $filename = uniqid().$vid->getClientOriginalName();

    $y=FFMpeg::fromDisk('videos') ->open($vid) ->getFrameFromSeconds(10) ->export() ->toDisk('thumnails') ->save();

    $path = $vid->storeAs(
       'introvideo',
       $filename);

    $location = public_path('/vids',$filename);
    $vid->move($location);
    $pro->profile = $filename;

    $pro->save();
  • ffmpeg : Render a two-pass MP4 timelapse video from a glob of JPEG images

    20 mai 2024, par algalg

    In bash on an Ubuntu 22 LTS system, I have this line to make a timelapse video file from hundreds of collected JPEG images in a folder.

    


    ffmpeg -r 25 \
  -pattern_type glob -i "/some/path/input/*.jpg" \
  -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" \
  -pix_fmt yuvj420p -preset veryslow -qp 0 \
  -movflags +faststart \
  "/some/path/output/render.mp4"


    


    The input JPEGs are 4K, so the resulting video file in that same resolution, and at high quality (which is desired), renders to a very large video file ( 250GB).

    


    Through trial and error, I've needed to add the -vf padding to avoid potential "height not divisible by 2" crashes, and set the pixel format to explicitly use jpeg full colour range yuvj420p because some of the original JPEG images were making ffmpeg complain about that.

    


    And since the goal is to eventually use these renders for streaming, -movflags +faststart was also added.

    


    It's all seeming to work very well, but just producing very large high quality video files :

    


    So to try address the filesize problem, but sticking to h264, I started reading some tutorials/docs (this one for example) that mentioned running two passes to compress the video more effectively.

    


    This sounded promising, and so to do this all in one step, rather than rendering a video and re-rendering that in two passes to better compress it) I tried this :

    


    ffmpeg -y -r 25 \
  -pattern_type glob -i "/some/path/input/*.jpg" \
  -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" \
  -pix_fmt yuvj420p -preset veryslow -qp 0 \
  -movflags +faststart \
  -pass 1 -f null /dev/null &&
ffmpeg -r 25 \
  -pattern_type glob -i "/some/path/input/*.jpg" \
  -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" \
  -pix_fmt yuvj420p -preset veryslow -qp 0 \
  -movflags +faststart \
  -pass 2 -f mp4 "/some/path/output/render.mp4"


    


    But ffmpeg seems to freak out about the inputs then :

    


    [image2 @ 0x55674a3bc440] Could not open file : /some/path/input/*.jpg
[image2 @ 0x55674a3bc440] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, image2, from '/some/path/input/*.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 25 fps, 25 tbr, 25 tbn, 25 tbc
Output #0, mp4, to '/dev/null':
Output file #0 does not contain any stream


    


    I've tried searching around a bit for if it's even possible to do two passes with the globbing input method, but haven't had much luck in finding any documentation or help about it.

    


    So asking here if anyone has any insights ? What am I doing wrong ? Is this possible ?

    


  • ffmpeg messing up audio when copying PCM streams

    2 juin 2022, par lioumens

    I'm using ffmpeg to compress videos, but when trying to copy the audio stream from one video file using the same codec and container, the audio is completely corrupted and unusable.

    


    The video I'm trying to compress has stream data :

    


    $ ffprobe -hide_banner -i testing.mov
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testing.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2019-04-25T05:37:35.000000Z
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: MacBookPro15,2
    com.apple.quicktime.software: Mac OS X 10.14.2 (18C54)
    com.apple.quicktime.creationdate: 2019-04-25T00:28:40-0500
  Duration: 00:06:35.75, start: 0.000000, bitrate: 66117 kb/s
  Stream #0:0[0x1](und): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, smpte170m/bt709/bt709, progressive), 1280x720, 65923 kb/s, 29.01 fps, 29.01 tbr, 30k tbn (default)
    Metadata:
      creation_time   : 2019-04-25T05:37:35.000000Z
      handler_name    : Core Media Video
      vendor_id       : appl
      encoder         : Apple ProRes 422
  Stream #0:1[0x2](und): Audio: pcm_s16be (lpcm / 0x6D63706C), 8000 Hz, 1 channels, s16, 128 kb/s (default)
    Metadata:
      creation_time   : 2019-04-25T05:37:35.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]


    


    Just working with the audio, I tried to copy the audio into a separate file with ffmpeg -i testing.mov -vn -channel_layout mono -c:a copy tmp.mov, which results in a video file with stream data :

    


    $ ffprobe -hide_banner -i tmp.mov
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tmp.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf59.16.100
  Duration: 00:06:35.26, start: 0.018000, bitrate: 128 kb/s
  Stream #0:0[0x1]: Audio: pcm_s16be (twos / 0x736F7774), 8000 Hz, mono, s16, 128 kb/s (default)
    Metadata:
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]


    


    It seems the only difference when copying the audio is the original says pcm_s16be (lpcm / 0x6D63706C) while the resulting audio has pcm_s16be (twos / 0x736F7774). My understanding is that twos is Apple Quicktime's FOURCC identifier for signed 16 bit big-endian., which is correct and shouldn't affect the audio.

    


    It seems another forum user had a similar issue, but they were using a hex editor to directly manipulate bits, which I'm not comfortable doing. Is there a fix from within ffmpeg ?

    


    EDIT :
I've uploaded a sample of the clip that has this problem.