Recherche avancée

Médias (91)

Autres articles (104)

  • 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

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

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

Sur d’autres sites (9667)

  • ffmpeg concat vertical video, different dimensions [duplicate]

    16 octobre 2020, par Morris

    Context :
3 input videos :

    


    foo.mov : 1080x1920 (vertical, NOT horizontal) with audio.

    


    bar.mp4 and fiz.mp4 : 480x360, with audio.
(Note : .mp4, differs from .mov)

    


    Goal : to concat all 3 videos. Output out.mp4 should be 480x360. Squeeze foo.mov but keep its aspect ratio, taking up 100% height, but the slim video should stand only in the center, with left and right sides being black (or other color) void. foo.mov should not be cropped.

    


    I currently have this command below (added new-line characters for better visualization) for concating, but need to fill the missing code at PLACEHOLDER1 to generate v0, such that v0 is resized to 480x360 like described above. If my attempt so far is correct, please help complete PLACEHOLDER1 ; else, please offer a better solution with explanation.

    


    ffmpeg 
-r 24 -i foo.mov 
-r 24 -i bar.mp4 
-r 24 -i fiz.mp4
-filter_complex 
"[0:v] PLACEHOLDER1 [v0];
[v0][1][2] concat=n=3:v=1:a=1 [v][a]" 
-map "[v]" -map "[a]" out.mp4


    


    Running

    


    ffmpeg -n -i foo.MOV -i bar.mp4 -i fiz.mp4


    


    gives this info :

    


    ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.62)
  [...configuration omitted...]
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'foo.MOV':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : [omitted]
    com.apple.quicktime.make: [omitted]
    com.apple.quicktime.model: [omitted]
    com.apple.quicktime.software: [omitted]
    com.apple.quicktime.creationdate: [omitted]
  Duration: 00:00:04.71, start: 0.000000, bitrate: 17579 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17492 kb/s, 24 fps, 24 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : [omitted]
      handler_name    : Core Media Video
      encoder         : H.264
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
    Metadata:
      creation_time   : [omitted]
      handler_name    : Core Media Audio
    Stream #0:2(und): Data: none (mebx / 0x7862656D), 9 kb/s (default)
    Metadata:
      creation_time   : [omitted]
      handler_name    : Core Media Metadata
    Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
      creation_time   : [omitted]
      handler_name    : Core Media Metadata

Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'bar.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:01.94, start: 0.000000, bitrate: 641 kb/s
    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 480x360 [SAR 1:1 DAR 4:3], 354 kb/s, 24.58 fps, 24.58 tbr, 113734695.00 tbn, 49.16 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 280 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'fiz.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:01.98, start: 0.000000, bitrate: 725 kb/s
    Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 480x360 [SAR 1:1 DAR 4:3], 442 kb/s, 24.58 fps, 24.58 tbr, 113734695.00 tbn, 49.16 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 278 kb/s (default)
    Metadata:
      handler_name    : SoundHandler


    


  • avformat/isom : lpcm in mov default to big endian

    1er novembre 2013, par Mark Himsley
    avformat/isom : lpcm in mov default to big endian
    

    It is my understanding that "Unless otherwise stated, all data in a
    QuickTime movie is stored in big-endian byte ordering" [1] in MOV files.

    I have a couple of thousand files, which technically are invalid because
    their sound sample description element 4CC is ’lpcm’ but its version is
    0 - and "Version 0 supports only uncompressed audio in raw (’raw ’) or
    twos-complement (’twos’) format" [2]

    Because isom.c only contains a mapping for 4CC ’lpcm’ to
    AV_CODEC_ID_PCM_S16LE, these files have their audio decoded as LE when
    it is actually BE.

    This commit adds AV_CODEC_ID_PCM_S16BE as the first match for 4CC ’lpcm’.

    [1]
    https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf
    page 21
    [2]
    https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf
    page 178

    Reviewed-by : Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavformat/isom.c
  • I would like to batch-trim mp4 videos in a folder with command line (ffmpeg ?), however the sound is delayed

    28 janvier 2023, par pdeli

    I found the following command line to batch-trim videos in a folder, however it delays the sound of all the videos by a few seconds (sound comes after the video) :

    &#xA;

    for file in /path/to/folder/*.mp4; do ffmpeg -i "$file" -ss 00:00:08 -c copy -avoid_negative_ts 1 "${file%.*}_trimmed.mp4"; done

    &#xA;

    These are the alternatives I found, however none of them solve the problem :

    &#xA;

    for file in /path/to/folder/*.mp4; do ffmpeg -i "$file" -itsoffset -0.5 -ss 8 -c:v copy -c:a copy "${file%.*}_trimmed.mp4"; done

    &#xA;

    for file in /path/to/folder/*.mp4; do ffmpeg -i "$file" -ss 8 -async 1 -c:v copy -c:a copy "${file%.*}_trimmed.mp4"; done

    &#xA;

    for file in /path/to/folder/*.mp4; do ffmpeg -i "$file" -ss 8 -map 0:v -map 0:a -c:v copy -c:a copy "${file%.*}_trimmed.mp4"; done

    &#xA;

    I have a hard time finding by how much time the sound is delayed.

    &#xA;

    My questions :

    &#xA;

      &#xA;
    • what would be the command line to batch-trim the beginning of all the videos in a folder with the sound properly "aligned" to the video ?
    • &#xA;

    • in other words, can't the sound be by default trimmed by as much as the video in the first place ? If yes, how ?
    • &#xA;

    &#xA;


    &#xA;

    System used :

    &#xA;

      &#xA;
    • macOS Ventura (13.1, Intel)
    • &#xA;

    • Shell and version : zsh 5.8.1 (x86_64-apple-darwin22.0)
    • &#xA;

    • ffmpeg version 5.0 built with Apple clang version 13.0.0 (clang-1300.0.29.30)
    • &#xA;

    &#xA;