
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (70)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP 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 (...)
Sur d’autres sites (9029)
-
ffmpeg minterpolate and rubberband - how to stretch audio to fit ?
5 juin 2023, par bossturboWhat is the best way to control the length of the audio and pitch shift using rubberband ?


I tried setting 'asetpts=PTS*16' to match the video PTS, but it appears to be ignored. The only thing that seems to determine the length of the audio is rubberband pitch. Even 'tempo=0.0625' does not appear to do anything.


I would like to be able to set the audio length to match the slower video section and set the pitch to whatever I want, like minimum 0.15 and have it stretch the audio length as needed.


ffmpeg -ss 123.978571 -i "original-120fps.MP4" -filter_complex "
[0:v]trim=0:0.375,setpts=PTS-STARTPTS,minterpolate='fps=480',setpts=PTS*16[slowv]; 
[0:a]atrim=0:0.375,asetpts=PTS-STARTPTS,rubberband=pitch=0.08:tempo=0.0625[slowa];"
 -y -r 60 -map [slowv] -map [slowa] -preset veryfast "output.mp4"



Finally, is there a good guide to using lib-rubberband ? FFmpeg docs for rubberband doesn't explain anything.


-
Different ffmpeg result after saving to png
28 juillet 2023, par Kalev MaricqSaving images to PNG first seems to produce different ffmpeg encodes. Running this test code


from PIL import Image
import cv2
import ffmpeg
import hashlib

ffmpeg.input('test.jpg').output('testff.png').run()
cv2.imwrite('testcv.png',cv2.imread('test.jpg'))
Image.open('test.jpg').save('testpil.png')

hashes=[]
for suf in ['.jpg','ff.png','cv.png','pil.png']:
 dest='test'+suf.replace('.','')+'.mp4'
 ffmpeg.input('test'+suf).output(dest).run()
 hashes.append(hashlib.file_digest(open(dest,'rb'),'md5').hexdigest())
 
print(hashes)



I get

['a5b744a8ac0f6de9ec4de43ff737c46e'

,'ab62474f2160899e064ba24890047372'

,'baa788d5e4ef212ab610b8b5cf7772cb'

,'baa788d5e4ef212ab610b8b5cf7772cb']

As you can see, the only two that match are the cv2 and pillow conversions, and none of them match the original. In terms of file size, the results that passed to png first seem to be about 10% smaller than the direct-from-jpg result.


Why is this happening and how can I avoid changing image data until I'm ready to encode ?


-
FFMPEG Command to convert images to svg [closed]
5 mai 2024, par themujahidkhanUsers are trying to convert images to SVG image on my website, Below I've given a link to the site, more detail on error and code that handles the conversion of media files.


You can check out the live site Here.


Steps to reproduce the error.


- 

- Upload the png file,
- Select SVG as output file
- Click convert.








It is throwing error.


Below is the code for that converts users input and gives input based on user preference.


// imports

import { createCanvas, loadImage } from "canvas";

import { Action } from "@/types";
import { FFmpeg } from "@ffmpeg/ffmpeg";
import { fetchFile } from "@ffmpeg/util";

function getFileExtension(file_name: string) {
 const regex = /(?:\.([^.]+))?$/; // Matches the last dot and everything after it
 const match = regex.exec(file_name);
 if (match && match[1]) {
 return match[1];
 }
 return ""; // No file extension found
}

function removeFileExtension(file_name: string) {
 const lastDotIndex = file_name.lastIndexOf(".");
 if (lastDotIndex !== -1) {
 return file_name.slice(0, lastDotIndex);
 }
 return file_name; // No file extension found
}

export default async function convert(
 ffmpeg: FFmpeg,
 action: Action
): Promise<any> {
 const { file, to, file_name, file_type } = action;
 const input = getFileExtension(file_name);
 const output = removeFileExtension(file_name) + "." + to;
 ffmpeg.writeFile(input, await fetchFile(file));

 // FFMPEG COMMANDS
 let ffmpeg_cmd: any = [];

 if (to === "svg") {
 ffmpeg_cmd = [
 "-i",
 input,
 "-vf",
 "scale=trunc(iw/2)*2:trunc(ih/2)*2",
 "-c:v",
 "libvpx-vp9",
 "-crf",
 "30",
 "-b:v",
 "1M",
 "-c:a",
 "libopus",
 "-b:a",
 "128k",
 output,
 ];
 } else if (to === "3gp") {
 ffmpeg_cmd = [
 "-i",
 input,
 "-r",
 "20",
 "-s",
 "352x288",
 "-vb",
 "400k",
 "-acodec",
 "aac",
 "-strict",
 "experimental",
 "-ac",
 "1",
 "-ar",
 "8000",
 "-ab",
 "24k",
 output,
 ];
 } else {
 ffmpeg_cmd = ["-i", input, output];
 }

 // execute cmd
 await ffmpeg.exec(ffmpeg_cmd);

 const data = (await ffmpeg.readFile(output)) as any;
 const blob = new Blob([data], { type: file_type.split("/")[0] });
 const url = URL.createObjectURL(blob);
 return { url, output };
}

</any>


Help appreciated, Thank You