Recherche avancée

Médias (10)

Mot : - Tags -/wav

Autres articles (35)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (4881)

  • FFmpeg - How to choose video stream based on resolution

    23 septembre 2023, par Sylven

    I want to choose the video stream based on it's quality, let's say I want to choose one video stream with certain resolution.

    


    Manually selecting the video stream is not good enough for me because I want to process many files in bulk and they have the video streams in different order, so always going for certain position would make me end up with different resolutions.

    


    I don't want to use filters as that would make me reencode which I don't need and would make it way slower.

    


    I've tried using the -map with metadata but the only key that is different is "variant_bitrate" which has slightly different values everytime, so unless I can use some wildcard or conditionals, I guess it won't work either.

    


    What I want to try now is to obtain the exact bitrate of the stream using ffmpeg or ffprobe and then pass it to the ffmpeg command so it ends in something like this :

    


    ffmpeg -i <url> -map m:variant_bitrate:1760000 ...</url>

    &#xA;

    PD : I've been reading the FFmpeg documentation and browsing the whole internet without luck.

    &#xA;

    Edit :&#xA;I managed to make it work by first using ffprobe to obtain stream info in json format (easier to parse), then I search for the string "height": 540 and extract next 50 lines (counted them manually so I'm sure I'll pick the value I need), then I search for the string variant_bitrate and then I use a regular expression to extract the bitrate. Once I have the bitrate I make use of the MacOS clipboard (with pbcopy and pbpaste) to pass the value to the final ffmpeg command through the -map option using a metadata selector.

    &#xA;

    ffprobe -v error -show_streams -of json "https://streamlink.com/master.m3u8?f=dash"&#xA;| grep -A 50 &#x27;"height": 540&#x27; &#xA;| grep variant_bitrate&#xA;| grep -oe &#x27;\([0-9.]*\)&#x27; &#xA;| pbcopy&#xA;&amp;&amp; ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "https://streamlink.com/master.m3u8?f=dash" -map "0:a:0" -map "m:variant_bitrate:$(pbpaste)" -c copy "Output.mp4"&#xA;

    &#xA;

    (added line breaks for readability)

    &#xA;

    I know it looks kinda dirty but I didn't find any other way to achieve my requirement.

    &#xA;

  • Best logical formula to determine perceptual / "experienced" quality of a video, given resolution / fps and bitrate ?

    20 mars 2023, par JamesK

    I am looking for a formula that can provide me with a relatively decent approximation of a Video's playback quality that can be calculated based off of four metrics : width, height, fps, and bitrate (bits/sec). Alternatively, I can also use FFMPEG or similar tools to calculate a Video's playback quality, if any of those tools provide something like what I am looking for here.

    &#xA;

    An example of what a Video might look like in my problem is as follows :

    &#xA;

    interface Video {&#xA;  /** The width of the Video (in pixels). */&#xA;  width: number&#xA;  /** The height of the Video (in pixels). */&#xA;  height: number&#xA;  /** The frame rate of the Video (frames per second). */&#xA;  fps: number&#xA;  /** The bitrate of the video, in bits per second (e.g. 5_000_000 = 5Mbit/sec) */&#xA;  bitrate: number&#xA;}&#xA;

    &#xA;

    I came up with the following function to compute the average amount of bits available for any given pixel per second :

    &#xA;

    const computeVideoQualityScalar = (video: Video): number => {&#xA;  // The amount of pixels pushed to the display, per frame.&#xA;  const pixelsPerFrame = video.width * video.height&#xA;  &#xA;  // The amount of pixels pushed to the display, per second.&#xA;  const pixelsPerSecond = pixelsPerFrame * video.fps&#xA;  &#xA;  // The average amount of bits used by each pixel, each second,&#xA;  // to convey all data relevant to that pixel (e.g. color data, etc)&#xA;  const bitsPerPixelPerSecond = video.bitrate / pixelsPerSecond&#xA;  &#xA;  return bitsPerPixelPerSecond&#xA;}&#xA;

    &#xA;

    While my formula does do a good job of providing a more-or-less "standardized" assessment of mathematical quality for any given video, it falls short when I try to use it to compare videos of different resolutions to one another. For example, a 1080p60fps video with a bitrate of 10Mbit/sec has a greater visual fidelity (at least, subjectively speaking, to my eyes) than a 720p30fps video with a bitrate of 9Mbit/sec, but my formula would score the 720p30fps video significantly higher than the 1080p60fps video because the 720p video has more bits available per pixel per second than the 1080p video.

    &#xA;

    I am struggling to come up with ideas as to how to either come up with a different way to calculate the "subjective video quality" for a given video, or extend upon my existing idea here.

    &#xA;

  • How to scale watermark based on video resolution in android using FFmpeg command ?

    16 février 2023, par Ravi Sorathiya

    I want to scale the watermark size based on the given video resolution. but this cmd scales the watermark without respect to the original video.

    &#xA;

    I want to scale the watermark based on the resolution of the video. if&#xA;the video is in high resolution then the watermark will adjust that accordingly. visa versa in lower resolution it will scale accordingly.

    &#xA;

    please suggest me FFmpeg cmd the dynamically cmd that helps to scale the watermark based on video's resolution

    &#xA;

    val cmd = arrayOf(&#xA;            "-y",&#xA;            "-i",&#xA;            sourcePath,&#xA;            "-i",&#xA;            watermarkImagePath,&#xA;            "-filter_complex",&#xA;            "[1][0]scale2ref=w=oh*mdar:h=ih*0.06[logo][video];[video][logo]overlay=${position}",&#xA;            "-map",&#xA;            "0:a",&#xA;            "-c:v",&#xA;            "libx264",&#xA;            "-crf",&#xA;            "$bitrate",&#xA;            "-preset",&#xA;            "ultrafast",&#xA;            outputLocation.path&#xA;        )&#xA;

    &#xA;