Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (27)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4851)

  • Convert mp4/mov/... to mp4 with fluent-ffmpeg

    13 octobre 2023, par Sam Leurs

    I have a lambda function which reads a video from s3, converts it with fluent-ffmpeg and streams the video back to (another bucket in) s3.

    


    This is the code so far :

    


        ffmpeg()
        .input(readstream.Body)
        .format('mp4')
        .addOutputOption("-preset veryfast")
        .addOutputOption("-movflags frag_keyframe+empty_moov")
        .addOutputOption("-crf 28")
        .output(writestream, { end: true })
        .on('error', (err, stdout, stderr) => {
            console.log(err);
            console.log('Stdout: %o', stdout);
            console.log('Stderr: %o', stderr);
        })
        .run();


    


    With an input mp4 file, this code works, but with a mov-file it fails. I get the following error :

    


    Error: ffmpeg exited with code 1: Error demuxing input file 0: Invalid data found when processing input&#xA;pipe:0: Invalid data found when processing input&#xA;Cannot determine format of input stream 0:0 after EOF&#xA;Error marking filters as finished&#xA;Conversion failed!&#xA;&#xA;    at ChildProcess.<anonymous> (/opt/nodejs/node_modules/fluent-ffmpeg/lib/processor.js:182:22)&#xA;    at ChildProcess.emit (node:events:514:28)&#xA;    at ChildProcess._handle.onexit (node:internal/child_process:291:12)&#xA;2023-10-13T20:10:01.978Z    32c55766-476f-41e9-873a-038341f5630a    INFO    Stdout: &#x27;&#x27;&#xA;2023-10-13T20:10:01.978Z    32c55766-476f-41e9-873a-038341f5630a    INFO    Stderr: &#x27;ffmpeg version 6.0-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2023 the FFmpeg developers\n&#x27; &#x2B;&#xA;  &#x27;  built with gcc 8 (Debian 8.3.0-6)\n&#x27; &#x2B;&#xA;  &#x27;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n&#x27; &#x2B;&#xA;  &#x27;  libavutil      58.  2.100 / 58.  2.100\n&#x27; &#x2B;&#xA;  &#x27;  libavcodec     60.  3.100 / 60.  3.100\n&#x27; &#x2B;&#xA;  &#x27;  libavformat    60.  3.100 / 60.  3.100\n&#x27; &#x2B;&#xA;  &#x27;  libavdevice    60.  1.100 / 60.  1.100\n&#x27; &#x2B;&#xA;  &#x27;  libavfilter     9.  3.100 /  9.  3.100\n&#x27; &#x2B;&#xA;  &#x27;  libswscale      7.  1.100 /  7.  1.100\n&#x27; &#x2B;&#xA;  &#x27;  libswresample   4. 10.100 /  4. 10.100\n&#x27; &#x2B;&#xA;  &#x27;  libpostproc    57.  1.100 / 57.  1.100\n&#x27; &#x2B;&#xA;  &#x27;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5f71b00] stream 0, offset 0x24: partial file\n&#x27; &#x2B;&#xA;  &#x27;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5f71b00] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080, 447 kb/s): unspecified pixel format\n&#x27; &#x2B;&#xA;  "Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options\n" &#x2B;&#xA;  "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;pipe:0&#x27;:\n" &#x2B;&#xA;  &#x27;  Metadata:\n&#x27; &#x2B;&#xA;  &#x27;    major_brand     : qt  \n&#x27; &#x2B;&#xA;  &#x27;    minor_version   : 512\n&#x27; &#x2B;&#xA;  &#x27;    compatible_brands: qt  \n&#x27; &#x2B;&#xA;  &#x27;    encoder         : Lavf57.19.100\n&#x27; &#x2B;&#xA;  &#x27;  Duration: 00:00:30.53, start: 0.000000, bitrate: N/A\n&#x27; &#x2B;&#xA;  &#x27;  Stream #0:0[0x1](eng): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 447 kb/s, 30 fps, 30 tbr, 15360 tbn (default)\n&#x27; &#x2B;&#xA;  &#x27;    Metadata:\n&#x27; &#x2B;&#xA;  &#x27;      handler_name    : VideoHandler\n&#x27; &#x2B;&#xA;  &#x27;      vendor_id       : FFMP\n&#x27; &#x2B;&#xA;  &#x27;      encoder         : Lavc57.16.101 libx264\n&#x27; &#x2B;&#xA;  &#x27;  Stream #0:1[0x2](eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 139 kb/s (default)\n&#x27; &#x2B;&#xA;  &#x27;    Metadata:\n&#x27; &#x2B;&#xA;  &#x27;      handler_name    : SoundHandler\n&#x27; &#x2B;&#xA;  &#x27;      vendor_id       : [0][0][0][0]\n&#x27; &#x2B;&#xA;  &#x27;Stream mapping:\n&#x27; &#x2B;&#xA;  &#x27;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))\n&#x27; &#x2B;&#xA;  &#x27;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))\n&#x27; &#x2B;&#xA;  &#x27;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5f71b00] stream 0, offset 0x24: partial file\n&#x27; &#x2B;&#xA;  &#x27;Error demuxing input file 0: Invalid data found when processing input\n&#x27; &#x2B;&#xA;  &#x27;pipe:0: Invalid data found when processing input\n&#x27; &#x2B;&#xA;  &#x27;Cannot determine format of input stream 0:0 after EOF\n&#x27; &#x2B;&#xA;  &#x27;Error marking filters as finished\n&#x27; &#x2B;&#xA;  &#x27;Conversion failed!\n&#x27;&#xA;</anonymous>

    &#xA;

    Is it possible to convert multiple filetypes with one fluent-ffmpeg chain. If not, can someone help me to make a chain for mov ?

    &#xA;

  • MP4 file starts from a non-key frame [closed]

    1er octobre 2023, par userDtrm

    I have used the following ffprobe command to analyse a .mp4 file.

    &#xA;

    &#xA;

    ffprobe -i <input /> -show_frames - select_streams v:0 -print_format flat &amp;> save_to_file.text

    &#xA;

    &#xA;

    It produces the following output.

    &#xA;

    &#xA;&#xA;    ffprobe version 5.1.3 Copyright (c) 2007-2022 the FFmpeg developers&#xA;      built with gcc 13 (GCC)&#xA;      configuration : —prefix=/home/thanuja/ffmpeg_build —pkg-config-flags=—static —extra-cflags=-I/home/thanuja/ffmpeg_build/include —extra-ldflags=-L/home/thanuja/ffmpeg_build/lib —extra-libs=-lpthread —extra-libs=-lm —bindir=/home/thanuja/bin —enable-gpl —enable-libfdk_aac —enable-libfreetype —enable-libmp3lame —enable-libopus —enable-libvpx —enable-libx264 —enable-libx265 —enable-nonfree —enable-openssl —enable-demuxer=spdif —enable-decoder=dolby_e —enable-decoder=ac3 —enable-decoder=eac3 —enable-indev=alsa —enable-outdev=alsa —enable-shared&#xA;      libavutil      57. 28.100 / 57. 28.100&#xA;      libavcodec     59. 37.100 / 59. 37.100&#xA;      libavformat    59. 27.100 / 59. 27.100&#xA;      libavdevice    59.  7.100 / 59.  7.100&#xA;      libavfilter     8. 44.100 /  8. 44.100&#xA;      libswscale      6.  7.100 /  6.  7.100&#xA;      libswresample   4.  7.100 /  4.  7.100&#xA;      libpostproc    56.  6.100 / 56.  6.100&#xA;    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'FTV267StoS.mp4' :&#xA;      Metadata :&#xA;        major_brand : mp42&#xA;        minor_version : 1&#xA;        compatible_brands : isommp41mp42&#xA;        creation_time : 2023-04-02T23:52:12.000000Z&#xA;      Duration : 00:04:47.84, start : 0.000000, bitrate : 7374 kb/s&#xA;      Stream #0:0[0x1](und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 7198 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default)&#xA;        Metadata :&#xA;          creation_time : 2023-04-02T23:52:12.000000Z&#xA;          handler_name : Core Media Video&#xA;          vendor_id : [0][0][0][0]&#xA;      Stream #0:1[0x2](eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)&#xA;        Metadata :&#xA;          creation_time : 2023-04-02T23:52:12.000000Z&#xA;          handler_name : Core Media Audio&#xA;          vendor_id : [0][0][0][0]&#xA;    frames.frame.0.media_type="video"&#xA;    frames.frame.0.stream_index=0&#xA;    frames.frame.0.key_frame=0&#xA;    frames.frame.0.pts=34536&#xA;    frames.frame.0.pts_time="0.383733"&#xA;    frames.frame.0.pkt_dts=34536&#xA;    frames.frame.0.pkt_dts_time="0.383733"&#xA;    frames.frame.0.best_effort_timestamp=34536&#xA;    frames.frame.0.best_effort_timestamp_time="0.383733"&#xA;    frames.frame.0.pkt_duration=1501&#xA;    frames.frame.0.pkt_duration_time="0.016678"&#xA;    frames.frame.0.pkt_pos="1834827"&#xA;    frames.frame.0.pkt_size="14917"&#xA;    frames.frame.0.width=1920&#xA;    frames.frame.0.height=1080&#xA;    frames.frame.0.pix_fmt="yuv420p"&#xA;    frames.frame.0.sample_aspect_ratio="1:1"&#xA;    frames.frame.0.pict_type="P"&#xA;    frames.frame.0.coded_picture_number=120&#xA;    frames.frame.0.display_picture_number=0&#xA;    frames.frame.0.interlaced_frame=0&#xA;    frames.frame.0.top_field_first=0&#xA;    frames.frame.0.repeat_pict=0&#xA;    frames.frame.0.color_range="tv"&#xA;    frames.frame.0.color_space="bt709"&#xA;    frames.frame.0.color_primaries="unknown"&#xA;    frames.frame.0.color_transfer="bt709"&#xA;    frames.frame.0.chroma_location="left"&#xA;    frames.frame.0.tags.timecode="20:18:26:50"&#xA;    frames.frame.0.side_data_list.side_data.0.side_data_type="H.26[45] User Data Unregistered SEI message"&#xA;    frames.frame.0.side_data_list.side_data.1.side_data_type="H.26[45] User Data Unregistered SEI message"&#xA;    frames.frame.0.side_data_list.side_data.2.side_data_type="SMPTE 12-1 timecode"&#xA;    frames.frame.0.side_data_list.side_data.2.timecodes.timecode.0.value="20:18:26:50"&#xA;    frames.frame.1.media_type="video"&#xA;    frames.frame.1.stream_index=0&#xA;    frames.frame.1.key_frame=0&#xA;    frames.frame.1.pts=36036&#xA;    frames.frame.1.pts_time="0.400400"&#xA;    frames.frame.1.pkt_dts=36036&#xA;    frames.frame.1.pkt_dts_time="0.400400"&#xA;    frames.frame.1.best_effort_timestamp=36036&#xA;    frames.frame.1.best_effort_timestamp_time="0.400400"&#xA;    frames.frame.1.pkt_duration=1501&#xA;    frames.frame.1.pkt_duration_time="0.016678"&#xA;    frames.frame.1.pkt_pos="1857434"&#xA;    frames.frame.1.pkt_size="14472"&#xA;    frames.frame.1.width=1920&#xA;    frames.frame.1.height=1080&#xA;    frames.frame.1.pix_fmt="yuv420p"&#xA;    frames.frame.1.sample_aspect_ratio="1:1"&#xA;    frames.frame.1.pict_type="P"&#xA;&#xA;

    &#xA;

    As seen in this output, the 1st frame appears to be a P frame. I'm curious as to how will the decoder decode this frame without a preceding I frame (key frame) ? The P frame will not have enough information to reconstruct the image from its residual data without the key frame.

    &#xA;

  • What would be the correct way to use Exec or Transcode ffmpeg in SRS version of Windows 5.0.128

    29 janvier 2023, par diegosn79

    i was doing tests in different ways, and i can't use the Exec or Transcode option, i highlight that I have copied the ffmpeg.exe in the objs folder.&#xA;These are the codes I tried, and I attach the log errors.

    &#xA;

    exec {&#xA;&#xA;enabled on;&#xA;&#xA;publish ./objs/ffmpeg.exe -rtbufsize 10M -i rtmp://10.1.9.240/live/encoder  -vf scale=1080:720 -c:v libx264 -profile:v high -level 4.2 -preset fast -b:v 1500k -c:a aac -ac 2 -b:a 96k -f flv -y rtmp://10.1.9.240:1935/live/encoderlow/;&#xA;&#xA;}&#xA;

    &#xA;

    LOGS

    &#xA;

    [2023-01-04 10:05:46.410][WARN][1309][01568ctu][11] EXEC : Ignore error, code=3028(FFmpegFork)(Failed to fork FFmpeg trancoder process) :&#xA;process start : vfork process failed, cli=./objs/ffmpeg.exe -rtbufsize 10M -i rtmp ://10.1.9.240/live/encoder -vf scale=1080:720 -c:v libx264 -profile:v high -level 4.2 -preset fast -b:v 1500k -c:a aac -ac 2 -b:a 96k -f flv -y rtmp ://10.1.9.240:1935/live/encoderlow/&#xA;thread [1309][01568ctu] : do_cycle() [./src/app/srs_app_ng_exec.cpp:108][errno=11]&#xA;thread [1309][01568ctu] : start() [./src/app/srs_app_process.cpp:197][errno=11]

    &#xA;

    transcode

    &#xA;

        enabled     on;&#xA;&#xA;    ffmpeg      ./objs/ffmpeg.exe;&#xA;&#xA;    engine ff {&#xA;&#xA;        enabled         on;&#xA;&#xA;        vfilter {&#xA;&#xA;        }&#xA;&#xA;        vcodec          libx264;&#xA;&#xA;        vthreads        4;&#xA;&#xA;        vprofile        high;&#xA;&#xA;        vpreset         fast;&#xA;&#xA;        vbitrate        1500k;&#xA;&#xA;        vparams {&#xA;&#xA;        }&#xA;&#xA;        acodec          libfdk_aac;&#xA;&#xA;        aparams {&#xA;&#xA;        }&#xA;&#xA;        output          rtmp://127.0.0.1:[port]/[app]/[stream]_[engine]?vhost=[vhost];&#xA;&#xA;    }&#xA;&#xA;}&#xA;

    &#xA;

    LOGS

    &#xA;

    [2023-01-04 11:04:45.295][WARN][1489][34r32764][11] Encoder : Ignore error, code=3028(FFmpegFork)(Failed to fork FFmpeg trancoder process) : ffmpeg start : vfork process failed, cli=./objs/ffmpeg.exe -f flv -i rtmp ://127.0.0.1:1935/live ?vhost=defaultVhost/encoder -vcodec libx264 -b:v 1500000 -threads 4 -profile:v high -preset fast -acodec libfdk_aac -f flv -y rtmp ://127.0.0.1:1935/live/encoder_ff ?vhost=defaultVhost 1 > ./objs/ffmpeg-encoder-defaultVhost-live-encoder-ff.log 2 > ./objs/ffmpeg-encoder-defaultVhost-live-encoder-ff.log&#xA;thread [1489][34r32764] : do_cycle() [./src/app/srs_app_encoder.cpp:117][errno=11]&#xA;thread [1489][34r32764] : start() [./src/app/srs_app_process.cpp:197][errno=11]

    &#xA;