Advanced search

Medias (0)

Tag: - Tags -/alertes

No media matches your criterion on the site.

Other articles (64)

  • Des sites réalisés avec MediaSPIP

    2 May 2011, by

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Taille des images et des logos définissables

    9 February 2011, by

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Librairies et logiciels spécifiques aux médias

    10 December 2010, by

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel; FFMpeg avec le maximum de décodeurs et (...)

On other websites (3871)

  • ffmpeg Grab Single Frame From Youtube Stream

    11 September 2021, by Rich_F

    I'm trying to grab a single frame of a streaming video on Youtube.

    


    This is an example

    


    This is the code structure I'm trying to use:

    


    ffmpeg --verbose -i $(youtube-dl -f 96 --no-playlist 'https://www.youtube.com/watch?v=XMs6LnT5mfk') -frames:1 -pred 1 clip1.jpg


    


    Trying to use youtube-dl to grab part of a stream, doesn't seem to work, and is actually throwing an ffmpeg error at me:

    


    [youtube] Q-44KECp-xQ: Downloading webpage
[youtube] Downloading just video Q-44KECp-xQ because of --no-playlist
[youtube] Q-44KECp-xQ: Downloading m3u8 information
[youtube] Q-44KECp-xQ: Downloading MPD manifest
[download] Destination: Ryde Esplanade & Pier, Isle of Wight UK _ Railcam LIVE 2021-09-11 03_25-Q-44KECp-xQ.mp4

ERROR: ffmpeg exited with code -9


    


    How can I achieve this? I'm open to reworking this approach, or moving to something completely different. Cheers

    


  • FFMPEG not exporting audio OR exports audio with still video

    7 September 2021, by Zak44

    Trying to utilize ffmpeg to convert a mp4 to DNxHD, then wrap it in an MXF. The ultimate goal is to get this into Avid Media Composer. I've been having issues with this particular command, where no audio is ever exported:

    


    ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -f rawvideo BLAH.mov


    


    If I tweak the above command by removing the force of the "rawvideo" option I get audio, however the video then sits on the first frame and never advances:

    


    ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -r 24 BLAH.mov


    


    What exactly am I doing wrong? Here is the output from running the second time:

    


    ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -r 24 BLAH.mov
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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-avresample --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Test_fix.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2021-07-01T17:19:54.000000Z
  Duration: 00:01:05.75, start: 0.000000, bitrate: 6336 kb/s
  Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 6016 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
    Metadata:
      creation_time   : 2021-07-01T17:19:54.000000Z
      handler_name    : ?Mainconcept Video Media Handler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
    Metadata:
      creation_time   : 2021-07-01T17:19:54.000000Z
      handler_name    : #Mainconcept MP4 Sound Media Handler
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> dnxhd (native))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'BLAH.mov':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    encoder         : Lavf58.76.100
  Stream #0:0(eng): Video: dnxhd (DNXHD) (AVdn / 0x6E645641), yuv422p(tv, bt709/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 36000 kb/s, 24 fps, 12288 tbn (default)
    Metadata:
      creation_time   : 2021-07-01T17:19:54.000000Z
      handler_name    : ?Mainconcept Video Media Handler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc58.134.100 dnxhd
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2021-07-01T17:19:54.000000Z
      handler_name    : #Mainconcept MP4 Sound Media Handler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc58.134.100 aac
[mov @ 0x7fd129013000] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mov @ 0x7fd129013000] Encoder did not produce proper pts, making some up.
frame= 1577 fps=133 q=1.0 Lsize=  290993kB time=00:01:05.70 bitrate=36279.7kbits/s speed=5.54x
video:290168kB audio:809kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.005816%
[aac @ 0x7fd129019000] Qavg: 22541.643


    


  • FFMPEG error when finding stream information with custom AVIOContext

    8 September 2021, by ryan

    I am writing software that takes in a file as a stream and decodes it. I have the following custom AVIO code for stream input:

    


    /* Allocate a 4kb buffer for copying. */&#xA;std::uint32_t bufSize = 4096;&#xA;struct vidBuf&#xA;{&#xA;    std::byte* ptr;&#xA;    int size;&#xA;};&#xA;&#xA;vidBuf tmpVidBuf = { const_cast(videoBuffer.data()),&#xA;    static_cast<int>(videoBuffer.size()) };&#xA;AVIOContext *avioContext =&#xA;    avio_alloc_context(reinterpret_cast(av_malloc(bufSize)),&#xA;                       bufSize, 0,&#xA;                       reinterpret_cast(&amp;tmpVidBuf),&#xA;                       [](void *opaque, std::uint8_t *buf, int bufSize) -> int&#xA;                       {&#xA;                           auto &amp;me = *reinterpret_cast(opaque);&#xA;                           bufSize = std::min(bufSize, me.size);&#xA;&#xA;                           std::copy_n(me.ptr, bufSize, reinterpret_cast(buf));&#xA;                           me.ptr &#x2B;= bufSize;&#xA;                           me.size -= bufSize;&#xA;                           return bufSize;&#xA;                       }, nullptr, nullptr);&#xA;&#xA;auto avFormatPtr = avformat_alloc_context();&#xA;avFormatPtr->pb = avioContext;&#xA;avFormatPtr->flags |= AVFMT_FLAG_CUSTOM_IO;&#xA;//avFormatPtr->probesize = tmpVidBuf.size;&#xA;//avFormatPtr->max_analyze_duration = 5000000;&#xA;&#xA;avformat_open_input(&amp;avFormatPtr, nullptr, nullptr, nullptr);&#xA;&#xA;if(auto ret = avformat_find_stream_info(avFormatPtr, nullptr);&#xA;   ret &lt; 0)&#xA;    logerror &lt;&lt; "Could not open the video file: " &lt;&lt; makeAVError(ret) &lt;&lt; &#x27;\n&#x27;;&#xA;</int>

    &#xA;

    However, when I run this code I get the error:

    &#xA;

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d10736d580] stream 0, offset 0x30: partial file&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d10736d580] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none(tv, bt709), 540x360, 649 kb/s): unspecified pixel format&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.76.100&#xA;  Duration: 00:04:08.41, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none(tv, bt709), 540x360, 649 kb/s, SAR 1:1 DAR 3:2, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)&#xA;    Metadata:&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 01/10/2021.&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 69 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 01/10/2021.&#xA;      vendor_id       : [0][0][0][0]&#xA;Assertion desc failed at libswscale/swscale_internal.h:677&#xA;

    &#xA;

    Note the absence of the YUV420p part in the video stream data.

    &#xA;

    This is strange since if I run my program with a different mp4 file it works perfectly fine, this error only occurs with a specific mp4 file. I know that the mp4 file is valid since mpv can play it, and ffprobe is able to get its metadata:

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;heard.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.76.100&#xA;  Duration: 00:04:08.41, start: 0.000000, bitrate: 724 kb/s&#xA;  Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 540x360 [SAR 1:1 DAR 3:2], 649 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 01/10/2021.&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 69 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 01/10/2021.&#xA;      vendor_id       : [0][0][0][0]&#xA;

    &#xA;

    As you can see by my code I also tried setting analyzeduration and probesize, but this did not fix the issue.

    &#xA;

    I also know that this error is because of my custom io because when I have avformat_open_input open the file directly, it is able to be decoded just fine. I am new to ffmpeg, so I might have missed something simple.

    &#xA;