Recherche avancée

Médias (0)

Mot : - Tags -/gis

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

Autres articles (53)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (11021)

  • How to remove black bars with ffmpeg ?

    3 novembre 2022, par watch-this

    I'm trying to remove black bars from a 637×478 video

    


    enter image description here

    


    here's what happens :

    


    % ffmpeg -i sfu11.mp4 -vf "scale=ih*16/9:ih,scale=iw:-2,setsar=1" -y out.mp4 
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 14.0.0 (clang-1400.0.29.102)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sfu11.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf57.83.100
  Duration: 01:02:49.37, start: 0.000000, bitrate: 15 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 99.833000
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 99.833000, end 701.818000
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 701.818000, end 1213.746000
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 1213.746000, end 1726.892000
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1726.892000, end 2167.882000
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 2167.882000, end 2816.430000
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 2816.430000, end 3769.366000
      Metadata:
        title           : Chapter 07
  Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, progressive), 708x478 [SAR 9:10 DAR 1593:1195], 544 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 341 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](eng): Data: bin_data (text / 0x74786574)
    Metadata:
      handler_name    : SubtitleHandler
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7f8630806e00] width not divisible by 2 (849x478)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0x7f8630809d00] Qavg: 15927.165
[aac @ 0x7f8630809d00] 2 frames left in the queue on closing
Conversion failed!


    


    However, the same flags work using ffplay but I get horizontal black bars instead.

    


    % ffplay -i sfu11.mp4 -vf "scale=ih\*16/9:ih,scale=iw:-2,setsar=1"


    


    enter image description here

    


    I also tried using the cropdetect filter. It doesn't work and end up with the very same black bars while passing -vf crop=....

    


  • avutil/eval : Use even better PRNG

    2 janvier 2024, par Michael Niedermayer
    avutil/eval : Use even better PRNG
    

    This is the 64bit version of Chris Doty-Humphreys SFC64

    Compared to the LCGs these produce much better quality numbers.
    Compared to LFGs this needs less state. (our LFG has 224 byte
    state for its 32bit version) this has 32byte state
    Also the initialization for our LFG is slower.
    This is also much faster than KISS or PCG.

    This commit replaces the broken LCG used before.
    (broken as it had only a period 200M due to being put in a double)

    This changes the output from random() which is why libswresample.mak
    is updated, update was done using the command in libswresample.mak

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavutil/eval.c
    • [DH] libavutil/sfc64.h
    • [DH] tests/fate/libswresample.mak
    • [DH] tests/ref/fate/eval
  • Save RTSP to mp4 with ffmpeg/libav ? Video is not of the right length, possibly too fast ?

    20 décembre 2022, par David Bensoussan

    inspired by other stackoverflow answers, I wrote a code to get an rtps stream into an mp4 file. I tried commenting as much as possible :

    &#xA;

    #include &#xA;#include &#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavformat></libavformat>avio.h>&#xA;#include <sys></sys>time.h>&#xA;&#xA;time_t get_time()&#xA;{&#xA;  struct timeval tv;&#xA;&#xA;  gettimeofday(&amp;tv, NULL);&#xA;&#xA;  return tv.tv_sec;&#xA;}&#xA;&#xA;int main(int argc, char* argv[])&#xA;{&#xA;  AVFormatContext* ifcx = NULL;&#xA;  AVCodecContext* iccx;&#xA;  AVStream* ist;&#xA;  int i_index;&#xA;  time_t timenow, timestart;&#xA;&#xA;  AVFormatContext* ofcx;&#xA;  AVOutputFormat* ofmt;&#xA;  AVStream* ost;&#xA;&#xA;  AVPacket pkt;&#xA;&#xA;  int ix;&#xA;&#xA;  const char* sProg = argv[0];&#xA;  const char* sFileInput;&#xA;  const char* sFileOutput;&#xA;  int bRunTime;&#xA;&#xA;  if (argc != 4)&#xA;  {&#xA;    printf("Usage: %s url outfile runtime\n", sProg);&#xA;    return EXIT_FAILURE;&#xA;  }&#xA;  sFileInput = argv[1];&#xA;  sFileOutput = argv[2];&#xA;  bRunTime = atoi(argv[3]);&#xA;&#xA;  // Initialize library&#xA;  av_log_set_level(AV_LOG_ERROR);&#xA;  avformat_network_init();&#xA;&#xA;  //&#xA;  // Input&#xA;  //&#xA;&#xA;  // open rtsp&#xA;  AVDictionary* opts = 0;&#xA;  av_dict_set(&amp;opts, "rtsp_transport", "tcp", 0);&#xA;  if (avformat_open_input(&amp;ifcx, sFileInput, 0, &amp;opts) != 0)&#xA;  {&#xA;    printf("ERROR: Cannot open input file\n");&#xA;    return EXIT_FAILURE;&#xA;  }&#xA;&#xA;  if (avformat_find_stream_info(ifcx, NULL) &lt; 0)&#xA;  {&#xA;    printf("ERROR: Cannot find stream info\n");&#xA;    avformat_close_input(&amp;ifcx);&#xA;    return EXIT_FAILURE;&#xA;  }&#xA;&#xA;  snprintf(ifcx->url, sizeof(ifcx->url), "%s", sFileInput);&#xA;&#xA;  // search video stream&#xA;  i_index = -1;&#xA;  AVCodecParameters* iccx_par;&#xA;  for (ix = 0; ix &lt; ifcx->nb_streams; ix&#x2B;&#x2B;)&#xA;  {&#xA;    iccx_par = ifcx->streams[ix]->codecpar;&#xA;    if (iccx_par->codec_type == AVMEDIA_TYPE_VIDEO)&#xA;    {&#xA;      ist = ifcx->streams[ix];&#xA;      i_index = ix;&#xA;      break;&#xA;    }&#xA;  }&#xA;  if (i_index &lt; 0)&#xA;  {&#xA;    printf("ERROR: Cannot find input video stream\n");&#xA;    avformat_close_input(&amp;ifcx);&#xA;    return EXIT_FAILURE;&#xA;  }&#xA;&#xA;  // Allocate codec context and convert codec parameters to codec context&#xA;  iccx = avcodec_alloc_context3(NULL);&#xA;  avcodec_parameters_to_context(iccx, iccx_par);&#xA;&#xA;  // set output format&#xA;  ofmt = av_guess_format("mp4", NULL, NULL);&#xA;&#xA;  // create output context&#xA;  if (avformat_alloc_output_context2(&amp;ofcx, ofmt, NULL, sFileOutput) &lt; 0)&#xA;  {&#xA;    printf("ERROR: Cannot create output context\n");&#xA;    avformat_close_input(&amp;ifcx);&#xA;    return EXIT_FAILURE;&#xA;  }&#xA;&#xA;  // add video stream&#xA;  ost = avformat_new_stream(ofcx, NULL);&#xA;  if (!ost)&#xA;  {&#xA;    printf("ERROR: Cannot add output stream\n");&#xA;    avformat_close_input(&amp;ifcx);&#xA;    avformat_free_context(ofcx);&#xA;    return EXIT_FAILURE;&#xA;  }&#xA;&#xA;  // copy codec context&#xA;  if (avcodec_parameters_from_context(ost->codecpar, iccx) &lt; 0)&#xA;  {&#xA;    printf("ERROR: Cannot copy codec context\n");&#xA;    avformat_close_input(&amp;ifcx);&#xA;    avformat_free_context(ofcx);&#xA;    return EXIT_FAILURE;&#xA;  }&#xA;&#xA;  // open output file&#xA;  if (!(ofmt->flags &amp; AVFMT_NOFILE))&#xA;  {&#xA;    if (avio_open(&amp;ofcx->pb, sFileOutput, AVIO_FLAG_WRITE) &lt; 0)&#xA;    {&#xA;      printf("ERROR: Cannot open output file\n");&#xA;      avformat_close_input(&amp;ifcx);&#xA;      avformat_free_context(ofcx);&#xA;      return EXIT_FAILURE;&#xA;    }&#xA;  }&#xA;&#xA;  // write output file header&#xA;  if (avformat_write_header(ofcx, NULL) &lt; 0)&#xA;  {&#xA;    printf("ERROR: Cannot write output file header\n");&#xA;    avformat_close_input(&amp;ifcx);&#xA;    avio_close(ofcx->pb);&#xA;    avformat_free_context(ofcx);&#xA;    return EXIT_FAILURE;&#xA;  }&#xA;&#xA;  //&#xA;  // Write data&#xA;  //&#xA;  AVRational time_base = ist->time_base;&#xA;  timestart = get_time();&#xA;  int64_t pts = 0;&#xA;  while (av_read_frame(ifcx, &amp;pkt) >= 0)&#xA;  {&#xA;    if (get_time() - timestart > bRunTime)&#xA;    {&#xA;      break;&#xA;    }&#xA;    if (pkt.stream_index == i_index)&#xA;    {&#xA;      pkt.stream_index = ost->id;&#xA;&#xA;      pkt.pts = pkt.duration * pts;&#xA;      pkt.dts = pkt.pts;&#xA;&#xA;      if (av_interleaved_write_frame(ofcx, &amp;pkt) &lt; 0)&#xA;      {&#xA;        printf("ERROR: Cannot write packet\n");&#xA;        av_packet_unref(&amp;pkt);&#xA;        break;&#xA;      }&#xA;      pts&#x2B;&#x2B;;&#xA;    }&#xA;  }&#xA;&#xA;  // write output file trailer&#xA;  if (av_write_trailer(ofcx) &lt; 0)&#xA;  {&#xA;    printf("ERROR: Cannot write output file trailer\n");&#xA;  }&#xA;&#xA;  //&#xA;  // Close&#xA;  //&#xA;&#xA;  avformat_close_input(&amp;ifcx);&#xA;  avio_close(ofcx->pb);&#xA;  avformat_free_context(ofcx);&#xA;&#xA;  avformat_network_deinit();&#xA;&#xA;  return EXIT_SUCCESS;&#xA;}&#xA;

    &#xA;

    Compile :

    &#xA;

    gcc test.c  -Wunused-variable -lavcodec -lavformat -lavfilter -lavdevice -lswresample -lswscale -lavutil -o a.out&#xA;

    &#xA;

    Run :

    &#xA;

    ./a.out rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 out.mp4 5&#xA;

    &#xA;

    Then using ffprobe, the video will last different time every time :&#xA;5.875000&#xA;6.500000

    &#xA;

    If i run the CLI

    &#xA;

    ffmpeg  -t 5 -i rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 -vcodec copy -acodec copy -map 0 -f mp4 out.mp4&#xA;

    &#xA;

    It will always give 5.124000

    &#xA;

    What am I doing wrong ?

    &#xA;

    Thanks !

    &#xA;