
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (40)
-
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Participer à sa documentation
10 avril 2011La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
Pour ce faire, vous pouvez vous inscrire sur (...) -
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)
Sur d’autres sites (6357)
-
Destreamer (FFMPEG / Youtube-DL) - Can't download video, Invalid DTS, Invalid timestamps message
1er avril 2020, par toprun91I'm using Destreamer a program that essentially lets you download microsoft stream videos by passing a key URL with a cookie down to Youtube-dl which then calls into ffmpeg.



Whenever I try to download a video using this program I get tons of repeating lines of text (errors ?) like this :



[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56400120, dts=56402820, size=6081
[mp4 @ 0000024876f525c0] Invalid DTS: 53717850 PTS: 53715150 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56406060, dts=56412090, size=6145
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56412090, dts=56414880, size=6515
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56406060, dts=56412090, size=6145
[mp4 @ 0000024876f525c0] Invalid DTS: 53727120 PTS: 53721090 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56412090, dts=56414880, size=6515
[mp4 @ 0000024876f525c0] Invalid DTS: 53729910 PTS: 53727120 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56418030, dts=56420820, size=6780
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56418030, dts=56420820, size=6780
[mp4 @ 0000024876f525c0] Invalid DTS: 53735850 PTS: 53733060 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56424060, dts=56430090, size=6668
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56430090, dts=56432880, size=6995
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56424060, dts=56430090, size=6668
[mp4 @ 0000024876f525c0] Invalid DTS: 53745120 PTS: 53739090 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56430090, dts=56432880, size=6995
[mp4 @ 0000024876f525c0] Invalid DTS: 53747910 PTS: 53745120 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56436120, dts=56442060, size=6342
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56442060, dts=56444850, size=6110
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56436120, dts=56442060, size=6342
[mp4 @ 0000024876f525c0] Invalid DTS: 53757090 PTS: 53751150 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56442060, dts=56444850, size=6110
[mp4 @ 0000024876f525c0] Invalid DTS: 53759880 PTS: 53757090 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56448090, dts=56454030, size=5750
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56454030, dts=56456820, size=6514
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56448090, dts=56454030, size=5750
[mp4 @ 0000024876f525c0] Invalid DTS: 53769060 PTS: 53763120 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56454030, dts=56456820, size=6514
[mp4 @ 0000024876f525c0] Invalid DTS: 53771850 PTS: 53769060 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56460060, dts=56466090, size=6843
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56466090, dts=56468880, size=7053
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56460060, dts=56466090, size=6843
[mp4 @ 0000024876f525c0] Invalid DTS: 53781120 PTS: 53775090 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56466090, dts=56468880, size=7053
[mp4 @ 0000024876f525c0] Invalid DTS: 53783910 PTS: 53781120 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56472120, dts=56478060, size=6297
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56478060, dts=56480850, size=6633
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56472120, dts=56478060, size=6297
[mp4 @ 0000024876f525c0] Invalid DTS: 53793090 PTS: 53787150 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56478060, dts=56480850, size=6633
[mp4 @ 0000024876f525c0] Invalid DTS: 53795880 PTS: 53793090 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56484090, dts=56490120, size=6026
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56490120, dts=56492820, size=6428
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56484090, dts=56490120, size=6026
[mp4 @ 0000024876f525c0] Invalid DTS: 53805150 PTS: 53799120 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56490120, dts=56492820, size=6428
[mp4 @ 0000024876f525c0] Invalid DTS: 53807850 PTS: 53805150 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56496060, dts=56502090, size=5738
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56502090, dts=56504880, size=5911
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56496060, dts=56502090, size=5738
[mp4 @ 0000024876f525c0] Invalid DTS: 53817120 PTS: 53811090 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56502090, dts=56504880, size=5911
[mp4 @ 0000024876f525c0] Invalid DTS: 53819910 PTS: 53817120 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56508030, dts=56514060, size=5860
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56514060, dts=56516850, size=6851
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56508030, dts=56514060, size=5860
[mp4 @ 0000024876f525c0] Invalid DTS: 53829090 PTS: 53823060 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56514060, dts=56516850, size=6851
[mp4 @ 0000024876f525c0] Invalid DTS: 53831880 PTS: 53829090 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56520090, dts=56526120, size=7342
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56526120, dts=56528820, size=7951
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56520090, dts=56526120, size=7342
[mp4 @ 0000024876f525c0] Invalid DTS: 53841150 PTS: 53835120 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56526120, dts=56528820, size=7951
[mp4 @ 0000024876f525c0] Invalid DTS: 53843850 PTS: 53841150 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56532060, dts=56538090, size=7998
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56538090, dts=56540790, size=8181
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56532060, dts=56538090, size=7998
[mp4 @ 0000024876f525c0] Invalid DTS: 53853120 PTS: 53847090 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56538090, dts=56540790, size=8181
[mp4 @ 0000024876f525c0] Invalid DTS: 53855820 PTS: 53853120 in output stream 0:0, replacing by guess
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56544030, dts=56550060, size=8707
[mpegts @ 0000024876dec540] Invalid timestamps stream=0, pts=56550060, dts=56552850, size=8878
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56544030, dts=56550060, size=8707
[mp4 @ 0000024876f525c0] Invalid DTS: 53865090 PTS: 53859060 in output stream 0:0, replacing by guess
[hls @ 000002487687c880] Invalid timestamps stream=0, pts=56550060, dts=56552850, size=8878
[mp4 @ 0000024876f525c0] Invalid DTS: 53867880 PTS: 53865090 in output stream 0:0, replacing by guess




This continues to fill the screen and scroll with the same type of lines of text and then after a couple of hours it does eventually download the video but without sound.



I am trying to work out why this is happening and why the video downloads without sound.



Some key information :



- 

- I am using windows + powershell but also experience the same thing on
Linux (Kubuntu)
- I am using the latest versions of FFMPEG, youtube-dl node.js
- The program (destreamer) brings up a chromium window to authenticate.
In the Chromium window the video doesn't actually play properly and
gives Error code 0x20400003 The video plays fine in all other
browsers I have including Edge, Chrome, and Firefox









Thanks for your help !


-
Salty Game Music
31 mai 2011, par Multimedia Mike — GeneralHave you heard of Google’s Native Client (NaCl) project ? Probably not. Basically, it allows native code modules to run inside a browser (where ‘browser’ is defined pretty narrowly as ‘Google Chrome’ in this case). Programs are sandboxed so they aren’t a security menace (or so the whitepapers claim) but are allowed to access a variety of APIs including video and audio. The latter API is significant because sound tends to be forgotten in all the hullabaloo surrounding non-Flash web technologies. At any rate, enjoy NaCl while you can because I suspect it won’t be around much longer.
After my recent work upgrading some old music synthesis programs to user more modern audio APIs, I got the idea to try porting the same code to run under NaCl in Chrome (first Nosefart, then Game Music Emu/GME). In this exercise, I met with very limited success. This blog post documents some of the pitfalls in my excursion.
Infrastructure
People who know me know that I’m rather partial — to put it gently — to straight-up C vs. C++. The NaCl SDK is heavily skewed towards C++. However, it does provide a Python tool called init_project.py which can create the skeleton of a project and can do so in C with the'-c'
option :./init_project.py -c -n saltynosefart
This generates something that can be built using a simple ‘make’. When I added Nosefart’s C files, I learned that the project Makefile has places for project-necessary CFLAGS but does not honor them. The problem is that the generated Makefile includes a broader system Makefile that overrides the CFLAGS in the project Makefile. Going into the system Makefile and changing
"CFLAGS ="
->"CFLAGS +="
solves this problem.Still, maybe I’m the first person to attempt building something in Native Client so I’m the first person to notice this ?
Basic Playback
At least the process to create an audio-enabled NaCl app is well-documented. Too bad it doesn’t seem to compile as advertised. According to my notes on the matter, I filled inPPP_InitializeModule()
with the appropriate boilerplate as outlined in the docs but got a linker error concerning get_browser_interface().Plan B : C++
Obviously, the straight C stuff is very much a second-class citizen in this NaCl setup. Fortunately, there is already that fully functional tone generator example program in the limited samples suite. Plan B is to copy that project and edit it until it accepts Nosefart/GME audio instead of a sine wave.The build system assumes all C++ files should have .cc extensions. I have to make some fixes so that it will accept .cpp files (either that, or rename all .cpp to .cc, but that’s not very clean).
Making Noise
You’ll be happy to know that I did successfully swap out the tone generator for either Nosefart or GME. Nosefart has a slightly fickle API that requires revving the emulator frame by frame and generating a certain number of audio samples. GME’s API is much easier to work with in this situation — just tell it how many samples it needs to generate and give it a pointer to a buffer. I played NES and SNES music play through this ad-hoc browser plugin, and I’m confident all the other supported formats would have worked if I went through the bother of converting the music data files into C headers to be included in the NaCl executable binaries (dynamically loading data via the network promised to be a far more challenging prospect reserved for phase 3 of the project).Portable ?
I wouldn’t say so. I developed it on Linux and things ran fine there. I tried to run the same binaries on the Windows version of Chrome to no avail. It looks like it wasn’t even loading the .nexe files (NaCl executables).Thinking About The (Lack Of A) Future
As I was working on this project, I noticed that the online NaCl documentation materialized explicit banners warning that my NaCl binaries compiled for Chrome 11 won’t work for Chrome 12 and that I need to code to the newly-released 0.3 SDK version. Not a fuzzy feeling. I also don’t feel good that I’m working from examples using bleeding edge APIs that feature deprecation as part of their naming convention, e.g., pp::deprecated::ScriptableObject().Ever-changing API + minimal API documentation + API that only works in one browser brand + requiring end user to explicitly enable feature = … well, that’s why I didn’t bother to release any showcase pertaining to this little experiment. Would have been neat, but I strongly suspect that this is yet another one of those APIs that Google decides to deprecate soon.
See Also :
-
Are there any alternatives to SharedArrayBuffer, or methods for video editing in a web browser ?
26 juillet 2023, par Govinda RegmiI'm working on a web-based video editing application using ffmeg that heavily relies on SharedArrayBuffer. Unfortunately, I've encountered a roadblock with the "Cross-Origin-Embedder-Policy : require-corp | credentialless" and "Cross-Origin-Opener-Policy : same-origin" headers. While these headers allow the usage of SharedArrayBuffer, they restrict other essential features, such as rendering images from an s3 bucket and script of TinyMce text editor.


I am trying to achieve
video editor like this


I am using "next" : "12.1.6" and
I tried to implement ffmeg like this :


import { useEffect, useState } from "react";

import { useDebounce } from "use-debounce";
import { createFFmpeg, fetchFile } from "@ffmpeg/ffmpeg";

import styles from "../videoEditor.module.scss";
import RangeInput from "../range-input/RangeInput";
import * as helpers from "../../../../utils/videoHelpers";

const FF = createFFmpeg({
 log: true,
 corePath: "https://unpkg.com/@ffmpeg/core@0.10.0/dist/ffmpeg-core.js",
});

(async function () {
 await FF.load();
})();

export const VideoTrimmer = ({
 videoFile,
 trimmedVideoFile,
 isConfirmClicked,
 setTrimmedVideoFile,
 onConfirmClickHandler,
}) => {
 const [URL, setURL] = useState([]);
 const [thumbNails, setThumbNails] = useState([]);
 const [videoMeta, setVideoMeta] = useState(null);
 const [inputVideoFile, setInputVideoFile] = useState(null);
 const [thumbnailIsProcessing, setThumbnailIsProcessing] = useState(false);

 const [rStart, setRstart] = useState(0);
 const [debouncedRstart] = useDebounce(rStart, 500);

 const [rEnd, setRend] = useState(10);
 const [debouncedRend] = useDebounce(rEnd, 500);

 const handleLoadedData = async (e) => {
 const el = e.target;
 const meta = {
 name: inputVideoFile.name,
 duration: el.duration,
 videoWidth: 50,
 videoHeight: 50,
 };
 setVideoMeta(meta);
 const thumbNails = await getThumbnails(meta);
 setThumbNails(thumbNails);
 };

 const getThumbnails = async ({ duration }) => {
 if (!FF.isLoaded()) await FF.load();
 setThumbnailIsProcessing(true);
 let MAX_NUMBER_OF_IMAGES = 15;
 let NUMBER_OF_IMAGES = duration < MAX_NUMBER_OF_IMAGES ? duration : 15;
 let offset =
 duration === MAX_NUMBER_OF_IMAGES ? 1 : duration / NUMBER_OF_IMAGES;

 const arrayOfImageURIs = [];
 FF.FS("writeFile", inputVideoFile.name, await fetchFile(inputVideoFile));

 for (let i = 0; i < NUMBER_OF_IMAGES; i++) {
 let startTimeInSecs = helpers.toTimeString(Math.round(i * offset));

 try {
 await FF.run(
 "-ss",
 startTimeInSecs,
 "-i",
 inputVideoFile.name,
 "-t",
 "00:00:1.000",
 "-vf",
 `scale=150:-1`,
 `img${i}.png`,
 );
 const data = FF.FS("readFile", `img${i}.png`);

 let blob = new Blob([data.buffer], { type: "image/png" });
 let dataURI = await helpers.readFileAsBase64(blob);
 FF.FS("unlink", `img${i}.png`);
 arrayOfImageURIs.push(dataURI);
 } catch (error) {
 // console.log({ message: error });
 }
 }
 setThumbnailIsProcessing(false);

 return arrayOfImageURIs;
 };
 const handleTrim = async () => {
 // setTrimIsProcessing(true);
 let startTime = ((rStart / 100) * videoMeta.duration).toFixed(2);
 let offset = ((rEnd / 100) * videoMeta.duration - startTime).toFixed(2);
 try {
 FF.FS("writeFile", inputVideoFile.name, await fetchFile(inputVideoFile));
 await FF.run(
 "-ss",
 helpers.toTimeString(startTime),
 "-i",
 inputVideoFile.name,
 "-t",
 helpers.toTimeString(offset),
 "-c",
 "copy",
 "ping.mp4",
 );
 const data = FF.FS("readFile", "ping.mp4");
 const dataURL = await helpers.readFileAsBase64(
 new Blob([data.buffer], { type: "video/mp4" }),
 );

 setTrimmedVideoFile(dataURL);
 } catch (error) {
 // console.log(error);
 } finally {
 // setTrimIsProcessing(false);
 }
 };

 const handleRangeChange = (type, event) => {
 const limit = parseInt((120 / videoMeta.duration) * 100);
 if (type === "start") {
 if (rEnd - rStart > limit) {
 setRend(parseInt(event.target.value) + limit);
 setRstart(parseInt(event.target.value));
 } else {
 setRstart(parseInt(event.target.value));
 }
 } else if (type === "end") {
 if (rEnd - rStart > limit) {
 setRstart(parseInt(event.target.value) - limit);
 setRend(parseInt(event.target.value));
 } else {
 setRend(parseInt(event.target.value));
 }
 }
 };

 useEffect(() => {
 if (videoMeta?.duration > 120) {
 const limit = parseInt((120 / videoMeta.duration) * 100);
 setRend(limit);
 }
 }, [videoMeta?.duration]);

 useEffect(() => {
 const videoFormData = new FormData();
 if (videoFile) {
 videoFormData.append("file", videoFile);
 const handleChange = async () => {
 setInputVideoFile(videoFile);
 setURL(await helpers.readFileAsBase64(videoFile));
 };
 handleChange();
 }
 }, []);

 useEffect(() => {
 if (videoMeta) {
 onConfirmClickHandler(handleTrim);
 }
 }, [isConfirmClicked]);

 useEffect(() => {
 if (debouncedRend == rEnd && debouncedRstart == rStart && videoMeta) {
 handleTrim();
 }
 }, [debouncedRend, debouncedRstart, videoMeta]);

 return (
 <>
 <article classname="grid_txt_2">
 
 {trimmedVideoFile ? (
 
 ) : (
 
 )}
 
 </article>
 
 >
 );
};



next.config.js


const nextConfig = {
 async headers() {
 return [
 {
 source: "/(.*)",
 headers: [
 { key: "Cross-Origin-Opener-Policy", value: "same-origin" },
 { key: "Cross-Origin-Embedder-Policy", value: "credentialless" },
 ],
 },
 ];
 },
 
};



This works seamlessly in Chrome and Edge, but it encounter issues (SharedArrayBuffer is not defined) in Firefox and Safari. How can we ensure it functions impeccably across all major browsers ?


When utilizing key : "Cross-Origin-Embedder-Policy", value : "require-corp" , I encounter an error while fetching images/scripts from cross-origin sources, resulting in "net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 200 (OK)". Cany you suggest me how can I resolve this issue ?