Recherche avancée

Médias (91)

Autres articles (41)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (5712)

  • Save Slow motion video with ffmpeg on android devices

    25 mars 2017, par nkalra0123

    I want to save videos in slow motion through my android app.I tried to convert videos into slow motion by changing frame rate.

    I used the following commands,first command is dumping 30 frames per second from videos to a temp directory, and then second command is using these images to create a video with reduced or faster frame rate and then i am deleting all the images from temp directory.

    ffmpeg -i input_file.mp4 -r 30/1 img%03d.png

    ffmpeg -framerate 15/1 -i img%03d.png -r 30 -pix_fmt yuv420p out4.mp4

    But this is a very slow operation. It is taking like forever even for small videos.

    I even tried to change PTS(presentation time stamp) of videos, but it is not working properly on android phones
    using this command :

    ffmpeg -i input.mkv -filter:v "setpts=2.0*PTS" output.mkv

    as suggested here :
    https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video

    Can anybody suggest me how can i make it fast. Is it necessary to save frames to a temp directory, can i pass the output of ffmpeg process to another ffmpeg process executing concurrently through some method.

    Is there any other ffmpeg command to save the videos in slow motion ?

  • x86 : Serialize rdtsc in read_time()

    8 juillet 2015, par Henrik Gramner
    x86 : Serialize rdtsc in read_time()
    

    Improves the accuracy of measurements, especially in short sections.

    To quote the Intel 64 and IA-32 Architectures Software Developer’s Manual :
    "The RDTSC instruction is not a serializing instruction. It does not necessarily
    wait until all previous instructions have been executed before reading the counter.
    Similarly, subsequent instructions may begin execution before the read operation
    is performed. If software requires RDTSC to be executed only after all previous
    instructions have completed locally, it can either use RDTSCP (if the processor
    supports that instruction) or execute the sequence LFENCE ;RDTSC."

    SSE2 is a requirement for lfence so only use it on SSE2-capable systems.
    Prefer lfence ;rdtsc over rdtscp since rdtscp is supported on fewer systems.

    Signed-off-by : Luca Barbato <lu_zero@gentoo.org>

    • [DBH] libavutil/x86/timer.h
  • Code can not read property 1 of undefined [closed]

    25 mai 2023, par Jesse Copas

    I'm a very new programmer and am working on a Tdarr plugin in JS.&#xA;Everything works fine until a 4k file tries to get transcoded and it fails with this log

    &#xA;

    2023-05-24T19:09:54.906Z ZoBKWMMKG:Node\[hidden-hog\]:Worker\[tall-tuna\]:{"pluginInputs":{"BitRate":"4000","ResolutionSelection":"1080p","Container":"mkv","AudioType":"AAC","FrameRate":"24"}}&#xA;&#xA;2023-05-24T19:09:54.907Z ZoBKWMMKG:Node\[hidden-hog\]:Worker\[tall-tuna\]:Error TypeError: Cannot read property &#x27;1&#x27; of undefined&#xA;

    &#xA;

    It's saying that it's unable to read property 1 of undefined and I'm looked and looked and looked and can't find what it is referring to. Hoping to get another set of eyes on it&#xA;The plugin Code is here

    &#xA;

    /* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */&#xA;/* eslint-disable no-restricted-globals */&#xA;const details = () => ({&#xA;  id: &#x27;Tdarr_Plugin_Jeso_AV1_HandBrake_Transcode&#x27;,&#xA;  Stage: &#x27;Pre-processing&#x27;,&#xA;  Name: &#x27;AV1 HandBrake Transcoder&#x27;,&#xA;  Type: &#x27;Video&#x27;,&#xA;  Operation: &#x27;Transcode&#x27;,&#xA;  Description: &#x27;Transcodes to AV1 at the selected Bitrate. This is best used with Remux Files.&#x27;,&#xA;  Version: &#x27;2.1.3&#x27;,&#xA;  Tags: &#x27;HandBrake,configurable&#x27;,&#xA;  Inputs: [&#xA;    {&#xA;      name: &#x27;BitRate&#x27;,&#xA;      type: &#x27;string&#x27;,&#xA;      defaultValue: &#x27;4000&#x27;,&#xA;      inputUI: {&#xA;        type: &#x27;text&#x27;,&#xA;      },&#xA;      tooltip: `&#xA;        ~ Requested Bitrate ~ \\n&#xA;        Put in the Bitrate you want to process to in Kbps. For example 4000Kbps is 4Mbps. `,&#xA;    },&#xA;    {&#xA;      name: &#x27;ResolutionSelection&#x27;,&#xA;      type: &#x27;string&#x27;,&#xA;      defaultValue: &#x27;1080p&#x27;,&#xA;      inputUI: {&#xA;        type: &#x27;dropdown&#x27;,&#xA;        options: [&#xA;          &#x27;8KUHD&#x27;,&#xA;          &#x27;4KUHD&#x27;,&#xA;          &#x27;1080p&#x27;,&#xA;          &#x27;720p&#x27;,&#xA;          &#x27;480p&#x27;,&#xA;        ],&#xA;      },&#xA;      // eslint-disable-next-line max-len&#xA;      tooltip: &#x27;Any Resolution larger than this will become this Resolution same as the bitrate if the Res is lower than the selected it will use the res of the file as to not cause bloating of file size.&#x27;,&#xA;    },&#xA;    {&#xA;      name: &#x27;Container&#x27;,&#xA;      type: &#x27;string&#x27;,&#xA;      defaultValue: &#x27;mkv&#x27;,&#xA;      inputUI: {&#xA;        type: &#x27;dropdown&#x27;,&#xA;        options: [&#xA;          &#x27;mp4&#x27;,&#xA;          &#x27;mkv&#x27;,&#xA;        ],&#xA;      },&#xA;      tooltip: ` Container Type \\n\\n&#xA;          mkv or mp4.\\n`,&#xA;    },&#xA;    {&#xA;      name: &#x27;AudioType&#x27;,&#xA;      type: &#x27;string&#x27;,&#xA;      defaultValue: &#x27;AAC&#x27;,&#xA;      inputUI: {&#xA;        type: &#x27;dropdown&#x27;,&#xA;        options: [&#xA;          &#x27;AAC&#x27;,&#xA;          &#x27;EAC3&#x27;,&#xA;          &#x27;MP3&#x27;,&#xA;          &#x27;Vorbis&#x27;,&#xA;          &#x27;Flac16&#x27;,&#xA;          &#x27;Flac24&#x27;,&#xA;        ],&#xA;      },&#xA;      // eslint-disable-next-line max-len&#xA;      tooltip: &#x27;Set Audio container type that you want to use&#x27;,&#xA;    },&#xA;    {&#xA;      name: &#x27;FrameRate&#x27;,&#xA;      type: &#x27;string&#x27;,&#xA;      defaultValue: &#x27;24&#x27;,&#xA;      inputUI: {&#xA;        type: &#x27;text&#x27;,&#xA;      },&#xA;      // eslint-disable-next-line max-len&#xA;      tooltip: &#x27;If the files framerate is higher than 24 and you want to maintain that framerate you can do so here&#x27;,&#xA;    },&#xA;  ],&#xA;});&#xA;const MediaInfo = {&#xA;  videoHeight: &#x27;&#x27;,&#xA;  videoWidth: &#x27;&#x27;,&#xA;  videoFPS: &#x27;&#x27;,&#xA;  videoBR: &#x27;&#x27;,&#xA;  videoBitDepth: &#x27;&#x27;,&#xA;  overallBR: &#x27;&#x27;,&#xA;  videoResolution: &#x27;&#x27;,&#xA;}; // var MediaInfo&#xA;// Easier for our functions if response has global scope.&#xA;const response = {&#xA;  processFile: false,&#xA;  preset: &#x27;&#x27;,&#xA;  container: &#x27;.mkv&#x27;,&#xA;  handBrakeMode: true,&#xA;  FFmpegMode: false,&#xA;  reQueueAfter: true,&#xA;  infoLog: &#x27;&#x27;,&#xA;}; // var response&#xA;// Finds the first video stream and populates some useful variables&#xA;function getMediaInfo(file) {&#xA;  let videoIdx = -1;&#xA;  for (let i = 0; i &lt; file.ffProbeData.streams.length; i &#x2B;= 1) {&#xA;    const strstreamType = file.ffProbeData.streams[i].codec_type.toLowerCase();&#xA;    // Looking For Video&#xA;    // Check if stream is a video.&#xA;    if (videoIdx === -1 &amp;&amp; strstreamType === &#x27;video&#x27;) {&#xA;      videoIdx = i;&#xA;      // get video streams resolution&#xA;      MediaInfo.videoResolution = `${file.ffProbeData.streams[i].height}x${file.ffProbeData.streams[i].width}`;&#xA;      MediaInfo.videoHeight = Number(file.ffProbeData.streams[i].height);&#xA;      MediaInfo.videoWidth = Number(file.ffProbeData.streams[i].width);&#xA;      MediaInfo.videoFPS = Number(file.mediaInfo.track[i &#x2B; 1].FrameRate) || 25;&#xA;      // calulate bitrate from dimensions and fps of file&#xA;      MediaInfo.videoBR = (MediaInfo.videoHeight * MediaInfo.videoWidth * MediaInfo.videoFPS * 0.08).toFixed(0);&#xA;    }&#xA;  }&#xA;} // end  getMediaInfo()&#xA;// define resolution order from ResolutionSelection from biggest to smallest&#xA;const resolutionOrder = [&#x27;8KUHD&#x27;, &#x27;4KUHD&#x27;, &#x27;1080p&#x27;, &#x27;720p&#x27;, &#x27;480p&#x27;];&#xA;// define the width and height of each resolution from the resolution order&#xA;const resolutionsdimensions = {&#xA;  &#x27;8KUHD&#x27;: &#x27;--width 7680 --height 4320&#x27;,&#xA;  &#x27;4KUHD&#x27;: &#x27;--width 3840 --height 2160&#x27;,&#xA;  &#x27;1080p&#x27;: &#x27;--width 1920 --height 1080&#x27;,&#xA;  &#x27;720p&#x27;: &#x27;--width 1280 --height 720&#x27;,&#xA;  &#x27;480p&#x27;: &#x27;--width 640 --height 480&#x27;,&#xA;};&#xA;// eslint-disable-next-line no-unused-vars&#xA;const plugin = (file, librarySettings, inputs) => {&#xA;  // eslint-disable-next-line no-unused-vars&#xA;  const importFresh = require(&#x27;import-fresh&#x27;);&#xA;  // eslint-disable-next-line no-unused-vars&#xA;  const library = importFresh(&#x27;../methods/library.js&#x27;);&#xA;  // eslint-disable-next-line no-unused-vars&#xA;  const lib = require(&#x27;../methods/lib&#x27;)();&#xA;  // Get the selected resolution from the &#x27;ResolutionSelection&#x27; variable&#xA;  const selectedResolution = inputs.ResolutionSelection;&#xA;  getMediaInfo(file);&#xA;  // use mediainfo to match height and width to a resolution on resolutiondimensions&#xA;  let dimensions = resolutionsdimensions[selectedResolution];&#xA;  // if the file is smaller than the selected resolution then use the file resolution&#xA;  if (MediaInfo.videoHeight &lt; dimensions.split(&#x27; &#x27;)[3] || MediaInfo.videoWidth &lt; dimensions.split(&#x27; &#x27;)[1]) {&#xA;    dimensions = `--width ${MediaInfo.videoWidth} --height ${MediaInfo.videoHeight}`;&#xA;    // eslint-disable-next-line brace-style&#xA;  }&#xA;  // read the bitrate of the video stream&#xA;  let videoBitRate = MediaInfo.videoBR;&#xA;  // if videoBitrate is over 1000000 devide by 100 to get the bitrate in Kbps&#xA;  if (videoBitRate > 1000000) {&#xA;    videoBitRate /= 100;&#xA;  } else { videoBitRate /= 1000; }&#xA;  // if VideoBitrate is smaller than selected bitrate then use the videoBitrate&#xA;  if (videoBitRate &lt; inputs.BitRate) {&#xA;    // eslint-disable-next-line no-param-reassign&#xA;    inputs.BitRate = videoBitRate;&#xA;    // eslint-disable-next-line brace-style&#xA;  }&#xA;  // if VideoBitrate is larger than selected bitrate then use the selected bitrate&#xA;  else {&#xA;    // eslint-disable-next-line no-self-assign, no-param-reassign&#xA;    inputs.BitRate = inputs.BitRate;&#xA;  }&#xA;&#xA;  //Skip Transcoding if File is already AV1&#xA;  if (file.ffProbeData.streams[0].codec_name === &#x27;av1&#x27;) {&#xA;    response.processFile = false;&#xA;    response.infoLog &#x2B;= &#x27;File is already AV1 \n&#x27;;&#xA;    return response;&#xA;  }&#xA;  // eslint-disable-next-line no-constant-condition&#xA;  if ((true) || file.forceProcessing === true) {&#xA;    // eslint-disable-next-line max-len&#xA;    response.preset = `--encoder svt_av1 -b ${inputs.BitRate} -r ${inputs.FrameRate} -E ${inputs.AudioType} -f ${inputs.Container} --no-optimize ${dimensions} --crop 0:0:0:0`;&#xA;    response.container = `.${inputs.Container}`;&#xA;    response.handbrakeMode = true;&#xA;    response.ffmpegMode = false;&#xA;    response.processFile = true;&#xA;    response.infoLog &#x2B;= `File is being transcoded at ${inputs.BitRate} Kbps to ${dimensions} as ${inputs.Container} \n`;&#xA;    return response;&#xA;  }&#xA;  response.infoLog &#x2B;= &#x27;File is being transcoded using custom arguments \n&#x27;;&#xA;  return response;&#xA;};&#xA;  };&#xA;&#xA;module.exports.details = details;&#xA;module.exports.plugin = plugin;&#xA;

    &#xA;

    Tried transcoding 4k files down to 1080p but it fails due to that undefined error. All Res 1080p and lower that I have tried work correctly

    &#xA;

    EDIT : I used Console.log and got this back

    &#xA;

    [2023-05-24T23:29:51.001] [ERROR] Tdarr_Server - Error running MediaInfo 1&#xA;[2023-05-24T23:29:51.004] [ERROR] Tdarr_Server - RangeError: Maximum call stack size exceeded&#xA;    at x (<anonymous>:wasm-function[381]:0x15c4d)&#xA;    at <anonymous>:wasm-function[46]:0x5dc0&#xA;    at <anonymous>:wasm-function[652]:0x21cb9&#xA;    at <anonymous>:wasm-function[1023]:0x47018&#xA;    at <anonymous>:wasm-function[853]:0x37827&#xA;    at <anonymous>:wasm-function[3684]:0xf4884&#xA;    at <anonymous>:wasm-function[3516]:0xeb5b7&#xA;    at <anonymous>:wasm-function[1061]:0x487c9&#xA;    at <anonymous>:wasm-function[795]:0x3006d&#xA;    at <anonymous>:wasm-function[3628]:0xf01cc&#xA;[2023-05-24T23:29:51.006] [ERROR] Tdarr_Server - Error running MediaInfo 2&#xA;[2023-05-24T23:29:51.006] [ERROR] Tdarr_Server - RangeError: Maximum call stack size exceeded&#xA;    at x (<anonymous>:wasm-function[381]:0x15c4d)&#xA;    at <anonymous>:wasm-function[46]:0x5dc0&#xA;    at <anonymous>:wasm-function[652]:0x21cb9&#xA;    at <anonymous>:wasm-function[1023]:0x47018&#xA;    at <anonymous>:wasm-function[853]:0x37827&#xA;    at <anonymous>:wasm-function[3684]:0xf4884&#xA;    at <anonymous>:wasm-function[3516]:0xeb5b7&#xA;    at <anonymous>:wasm-function[1061]:0x487c9&#xA;    at <anonymous>:wasm-function[795]:0x3006d&#xA;    at <anonymous>:wasm-function[3628]:0xf01cc&#xA;[2023-05-24T23:29:58.220] [ERROR] Tdarr_Server - Error running MediaInfo 1&#xA;[2023-05-24T23:29:58.223] [ERROR] Tdarr_Server - RangeError: Maximum call stack size exceeded&#xA;    at x (<anonymous>:wasm-function[381]:0x15c4d)&#xA;    at <anonymous>:wasm-function[46]:0x5dc0&#xA;    at <anonymous>:wasm-function[652]:0x21cb9&#xA;    at <anonymous>:wasm-function[1023]:0x47018&#xA;    at <anonymous>:wasm-function[853]:0x37827&#xA;    at <anonymous>:wasm-function[3684]:0xf4884&#xA;    at <anonymous>:wasm-function[3516]:0xeb5b7&#xA;    at <anonymous>:wasm-function[1061]:0x487c9&#xA;    at <anonymous>:wasm-function[795]:0x3006d&#xA;    at <anonymous>:wasm-function[3628]:0xf01cc&#xA;[2023-05-24T23:29:58.224] [ERROR] Tdarr_Server - Error running MediaInfo 2&#xA;[2023-05-24T23:29:58.224] [ERROR] Tdarr_Server - RangeError: Maximum call stack size exceeded&#xA;    at x (<anonymous>:wasm-function[381]:0x15c4d)&#xA;    at <anonymous>:wasm-function[46]:0x5dc0&#xA;    at <anonymous>:wasm-function[652]:0x21cb9&#xA;    at <anonymous>:wasm-function[1023]:0x47018&#xA;    at <anonymous>:wasm-function[853]:0x37827&#xA;    at <anonymous>:wasm-function[3684]:0xf4884&#xA;    at <anonymous>:wasm-function[3516]:0xeb5b7&#xA;    at <anonymous>:wasm-function[1061]:0x487c9&#xA;    at <anonymous>:wasm-function[795]:0x3006d&#xA;    at <anonymous>:wasm-function[3628]:0xf01cc&#xA;</anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous></anonymous>

    &#xA;