Recherche avancée

Médias (0)

Mot : - Tags -/xml-rpc

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

Autres articles (105)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

Sur d’autres sites (4510)

  • Issues with encoded video in Chrome playback

    4 novembre 2022, par Michael Joseph Aubry

    Chrome is very particular about how a video is encoded. An issue I am facing with a specific type of video is seeked either does not get called at all or at least within a 20s period of time within certain frames.

    


    I can consistently repeat this issue using this muxer https://github.com/redbrain/ytdl-core-muxer/blob/main/index.js

    


    When I paint each frame in puppeteer Lambda there are certain frames where either seeked never gets called or the 20s timeout is called before the frame can resolve.

    


    Here is an example of a log sequence for this particular frame that fails enter image description here

    


    When I re-encode this video, simply by running ffmpeg -i VIDEO_URL then try with the new one there are no issues.

    


    In order to see the differences on a frame level I run ffprobe -show_frames goodvideo.mp4 > good.txt && ffprobe -show_frames badvideo.mp4 > bad.txt and here is what I see with the frames around the 117s mark where the first sign of corruption occurs

    


    Good Frame @ 117s

    


    [FRAME]
media_type=video
stream_index=0
key_frame=0
pts=7020013
pts_time=117.000217
pkt_dts=7020013
pkt_dts_time=117.000217
best_effort_timestamp=7020013
best_effort_timestamp_time=117.000217
pkt_duration=1001
pkt_duration_time=0.016683
pkt_pos=27029408
pkt_size=1741
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=B
coded_picture_number=7014
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt709
color_primaries=bt709
color_transfer=bt709
chroma_location=left
[/FRAME]


    


    Bad Frame @ 117s

    


    [FRAME]
media_type=video
stream_index=0
key_frame=0
pts=117000
pts_time=117.000000
pkt_dts=117000
pkt_dts_time=117.000000
best_effort_timestamp=117000
best_effort_timestamp_time=117.000000
pkt_duration=16
pkt_duration_time=0.016000
pkt_pos=20592998
pkt_size=18067
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=7011
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt709
color_primaries=bt709
color_transfer=bt709
chroma_location=left
[/FRAME]


    


    Does anyone know the differences and why the bad frame is causing my rendering function to have issues seeking ?

    


    This is how I am muxing the bad video, Im trying to avoid re-encoding, but by re-encoding it seems to fix the issue. Are there any settings I can apply to avoid re-encoding while making the video more durable on Chrome ?

    


    // default export: the ffmpeg muxer
const ytmux = (link, options: any = {}) => {
  const result = new stream.PassThrough({
    highWaterMark: options.highWaterMark || 1024 * 512
  });

  ytdl.getInfo(link, options).then((info: videoInfo) => {
    let audioStream: Readable = ytdl.downloadFromInfo(info, {
      ...options,
      quality: "highestaudio"
    });
    let videoStream: Readable = ytdl.downloadFromInfo(info, {
      ...options,
      quality: "highestvideo"
    });
    // create the ffmpeg process for muxing
    let ffmpegProcess: any = cp.spawn(
      ffmpegPath.path,
      [
        // supress non-crucial messages
        "-loglevel",
        "8",
        "-hide_banner",
        // input audio and video by pipe
        "-i",
        "pipe:3",

        "-i",
        "pipe:4",

        // map audio and video correspondingly
        "-map",
        "0:v",
        "-map",
        "1:a",

        // no need to change the codec
        "-c",
        "copy",

        // Allow output to be seekable, which is needed for mp4 output
        "-movflags",
        "frag_keyframe+empty_moov",

        "-fflags",
        "+genpts",

        "-f",
        "matroska",

        "pipe:5"
      ],
      {
        // no popup window for Windows users
        windowsHide: true,
        stdio: [
          // silence stdin/out, forward stderr,
          "inherit",
          "inherit",
          "inherit",
          // and pipe audio, video, output
          "pipe",
          "pipe",
          "pipe"
        ]
      }
    );

    audioStream.pipe(ffmpegProcess.stdio[4]);
    videoStream.pipe(ffmpegProcess.stdio[3]);
    ffmpegProcess.stdio[5].pipe(result);
  });
  return result;
};


    


  • How to extract the sound of a video from two timecodes to a .ts file [closed]

    22 avril 2023, par Imprevisible

    I'm trying to use FFMPEG to extract the audio from a video for a certain period of time and cut it into 5 second chunks, but it doesn't work. Instead, the chunks have different lengths and don't match what I asked for. I tried several solutions, but nothing worked.

    


    From what I understand, the problem could be with the picturerate and the treshold, but I don't know what to do with that information. Here is the command I used :

    


    ffmpeg -loglevel error -accurate_seek -ss 00:00:00 -to 00:00:05 -t 5 -i H:/Films/Tetris.mkv -c:a aac -b:a 128k -ac 4 -vn -map 0:1 -f adts pipe:1


    


    This gave me an audio file of 53s, but if I do from 00:00:05 to 00:00:10, I have an audio file of 4.6s.

    


    If anyone can help me, that would be great. Thanks in advance

    


  • How to handle errors during downloading (using videomanifest) video and make it more robust

    5 mai 2023, par Wakan Tanka

    I'm using ffmpeg to download videos from streaming site following way :

    


    ffmpeg.exe -i videomanifest -codec copy video.mp4 


    


    This works, but it has some drawbacks. The problem is that sometimes my (or maybe error on server side etc.) internet connection fails, and I'm forced to restart the whole download again. I would like to make this process more robust. It would be great if ffmpeg can continuously split video to several smaller files during the download and if download will fail then ffmpeg will continue (or maybe skip) from broken part. After downloading all parts I will concat them manually, this is no problem. Please treat above text just like an example, any other solution which will make downloading process more robust is welcomed. Is this possible with ffmpeg ?

    


    Here is example of videomanifest (this is not a fully functional file, important url parts were deleted due to privacy, so please treat it as an example for demonstration purposes)

    


    <mpd type="static" maxsegmentduration="PT5.000S" profiles="urn:mpeg:dash:profile:isoff-live:2011" mediapresentationduration="PT0H0M4961.472S" minbuffertime="PT4.500S" xmlns="urn:mpeg:DASH:schema:MPD:2011">&#xA;  <baseurl>https://........................</baseurl>&#xA;  <period>&#xA;    <adaptationset contenttype="audio" mimetype="audio/mp4" segmentalignment="true" bitstreamswitching="true" codecs="mp4a.40.2">&#xA;      <contentprotection schemeiduri="urn:mpeg:dash:sea:2012">&#xA;        &#xA;        &#xA;        &#xA;      </contentprotection>&#xA;      <label>EnhancedAudio</label>&#xA;      <segmenttemplate timescale="44100" initialization="videotranscode?provider=Spo&amp;amp;docId=https%3a%2...................">&#xA;        <segmenttimeline>&#xA;          <s d="221184" r="988"></s>&#xA;          <s d="49939"></s>&#xA;        </segmenttimeline>&#xA;      </segmenttemplate>&#xA;      <representation audiosamplingrate="44100" bandwidth="128000" codecs="mp4a.40.2"></representation>&#xA;      <representation audiosamplingrate="44100" bandwidth="192000" codecs="mp4a.40.2"></representation>&#xA;    </adaptationset>&#xA;    <adaptationset contenttype="audio" mimetype="audio/mp4" segmentalignment="true" bitstreamswitching="true" codecs="mp4a.40.2">&#xA;      <contentprotection schemeiduri="urn:mpeg:dash:sea:2012">&#xA;        &#xA;        &#xA;        &#xA;      </contentprotection>&#xA;      <label>OriginalAudio</label>&#xA;      <segmenttemplate timescale="44100" initialization="videotranscode?provider=Spo&amp;amp;docId=https%3a%2f%2fstu">&#xA;        <segmenttimeline>&#xA;          <s d="221184" r="988"></s>&#xA;          <s d="49939"></s>&#xA;        </segmenttimeline>&#xA;      </segmenttemplate>&#xA;      <representation audiosamplingrate="44100" bandwidth="128000" codecs="mp4a.40.2"></representation>&#xA;      <representation audiosamplingrate="44100" bandwidth="192000" codecs="mp4a.40.2"></representation>&#xA;    </adaptationset>&#xA;    <adaptationset contenttype="video" mimetype="video/mp4" segmentalignment="true" bitstreamswitching="true" maxframerate="82690000/5512747" maxwidth="1920" maxheight="1080" codecs="avc1.4d0028">&#xA;      <contentprotection schemeiduri="urn:mpeg:dash:sea:2012">&#xA;        &#xA;        &#xA;        &#xA;      </contentprotection>&#xA;      <segmenttemplate timescale="15000" initialization="videotranscode?provider=Spo&amp;amp;docId=https............">&#xA;        <segmenttimeline>&#xA;          <s d="74999" r="991"></s>&#xA;          <s d="22080"></s>&#xA;        </segmenttimeline>&#xA;      </segmenttemplate>&#xA;      <representation width="426" height="240" framerate="82690000/5512747" bandwidth="144000" codecs="avc1.4d401e"></representation>&#xA;      <representation width="852" height="480" framerate="82690000/5512747" bandwidth="480000" codecs="avc1.4d001f"></representation>&#xA;      <representation width="1280" height="720" framerate="82690000/5512747" bandwidth="1081600" codecs="avc1.4d001f"></representation>&#xA;      <representation width="1920" height="1080" framerate="82690000/5512747" bandwidth="2428800" codecs="avc1.4d0028"></representation>&#xA;    </adaptationset>&#xA;  </period>&#xA;</mpd>&#xA;

    &#xA;