
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (53)
-
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 (7686)
-
Interfacing to an Xbox Optical Drive
1er octobre 2013, par Multimedia Mike — xboxThe next generation Xbox is going to hit the streets soon. But for some reason, I’m still interested in the previous generation’s unit (i.e., the original Xbox). Specifically, I’ve always wondered if it’s possible to use the original Xbox’s optical drive in order to read Xbox discs from Linux. I was never curious enough to actually buy an Xbox just to find out but I eventually came across a cast-off console on a recycle pile.
I have long known that the Xbox has what appears to be a more or less standard optical drive with a 40-pin IDE connector. The only difference is the power adapter which I surmise is probably the easiest way to turn a bit of standardized hardware into a bit of proprietary hardware. The IDE and power connectors look like this :
Thus, I wanted to try opening an Xbox and plugging the optical drive into a regular PC, albeit one that supports IDE cables, and allow the Xbox to supply power to the drive. Do you still have hardware laying around that has 40-pin IDE connectors ? I guess my Mac Mini PPC fits the bill, but I’ll be darned if I’m going to pry that thing open again. I have another IDE-capable machine buried in my closet, last called into service when I needed a computer with a native RS-232 port 3 years ago. The ordeal surrounding making this old computer useful right now can be another post entirely.
Here’s what the monstrosity looks like thanks to characteristically short IDE cable lengths :
Process :
- Turn on Xbox first
- Turn on PC
Doing these things in the opposite order won’t work since the kernel really wants to see the drive when booting up. Inspecting the
'dmesg'
log afterward reveals interesting items :<br />
hdd: PHILIPS XBOX DVD DRIVE, ATAPI CD/DVD-ROM drive<br />
hdd: host max PIO5 wanted PIO255(auto-tune) selected PIO4<br />
hdd: UDMA/33 mode selected<br />
[...]<br />
hdd: ATAPI DVD-ROM drive, 128kB Cache<br />Why is that interesting ? When is the last time to saw disk devices prefixed by ‘hd’ rather than ‘sd’ ? Blast from the past. Oh, and the optical drive’s vendor string clearly indicates that this is an Xbox drive saying ‘hi !’.
Time To Read
When I first studied an Xbox disc in a normal optical drive, I noticed that I was able to read 6992 2048-byte sectors — about 14 MB of data — as reported by the disc table of contents (TOC). This is just enough data to play a standard DVD video animation that kindly instructs the viewer to please use a proper Xbox. At this point, I estimated that there must be something special about Xbox optical drive firmware that knows how to read alternate information on these discs and access further sectors.I ran my TOC query tool with an Xbox Magazine demo disc in the optical drive and it reported substantially more than 6992 sectors, enough to account for more than 2 GB of data. That’s promising. I then tried running
'dd'
against the device and it was able to read… about 14 MB, an exact quantity of bytes that, when divided by 2048 bytes/sector, yields 6992 sectors.Future (Past ?) Work
Assuming Google is your primary window into the broader internet, the world is beginning to lose its memory of things pertaining to the original Xbox (Microsoft’s naming scheme certainly doesn’t help searches). What I’m saying is that it can be difficult to find information about this stuff now. However, I was able to learn that a host needs to perform a sort of cryptographic handshake with the drive at the SCSI level before it is allowed to access the forbidden areas of the disc. I think. I’m still investigating this and will hopefully post more soon. -
Browser downloads video stream instead of playing it
25 février 2019, par ilmixI’m trying to stream video from IP camera to browser using
ffmpeg
andffserver
but if I try to open stream in any browser it starts downloading it instead of playing. I’ve tried to display video using<video></video>
tag but that doesn’t work either : Here is the code I used :<video width="800" height="600" controls="controls">
<source src="http://10.10.7.19:8090/cam4.mp4" type="video/mp4">
</source></video>The stream works fine in vlc, it is H.264 stream. ffserver shows buffer underflow errors when I try to view it in chrome.
When I try to open it in firefox I getNo video with supported format and MIME type found
error on video element.How do I make it work ? Also, are there any tools for debugging video streams on Chrome or Firefox (console doesn’t show any errors) ?
-
Downloader downloads high quality video but muted
5 avril 2023, par Stef-LevI have created a next.js video downloader and I want to download videos of the highest quality. When I trigger the download I only get a muted mp4 file (in high quality) and a muted mp3 file. Here is the api file. How could I download the video, the audio and then merge them with ffmpeg correctly ?


import ytdl from "ytdl-core";
import fs from "fs";
import { Server } from "socket.io";
import ffmpeg from "fluent-ffmpeg";

export default async function handler(req, res) {
 if (res.socket.server.io) {
 console.log("Socket is already running");
 res.end();
 return;
 }
 console.log("Socket is initializing");
 const io = new Server(res.socket.server);
 res.socket.server.io = io;

 io.on("connection", async (socket) => {
 console.log(socket.id, "socketID");

 const sendError = async (msg) => {
 socket.emit("showError", msg);
 };

 const sendProgress = async (msg) => {
 console.log(msg);
 socket.emit("showProgress", msg);
 };

 const sendComplete = async (msg) => {
 console.log(msg);
 socket.emit("showComplete", msg);
 };

 const downloadVideo = async (url) => {
 try {
 const videoInfo = await ytdl.getInfo(url);
 const outputPath = path.join(
 process.cwd(),
 "mp4s",
 `${videoInfo.videoDetails.title}.mp4`
 );
 const audioPath = path.join(
 process.cwd(),
 "mp4s",
 `${videoInfo.videoDetails.title}.mp3`
 );

 const videoFormat = ytdl.chooseFormat(videoInfo.formats, {
 quality: "highestvideo",
 filter: "videoonly",
 });
 const audioFormat = ytdl.chooseFormat(videoInfo.formats, {
 quality: "highestaudio",
 filter: "audioonly",
 });
 const videoStream = ytdl(url, { quality: videoFormat.itag });
 const audioStream = ytdl(url, { quality: audioFormat.itag });

 const videoOutput = fs.createWriteStream(outputPath);
 const audioOutput = fs.createWriteStream(audioPath);

 audioStream.pipe(audioOutput);
 videoStream.pipe(videoOutput);

 let downloadedBytes = 0;
 let totalBytes =
 videoFormat.contentLength || videoInfo.length_seconds * 1000000;

 videoOutput.on("data", (chunk) => {
 downloadedBytes += chunk.length;
 const progress = Math.round((downloadedBytes / totalBytes) * 100);
 sendProgress({ progress });
 });

 videoOutput.on("error", (err) => {
 console.error(err);
 sendError({
 status: "error",
 message: "An error occurred while writing the video file",
 });
 });

 audioOutput.on("error", (err) => {
 console.error(err);
 sendError({
 status: "error",
 message: "An error occurred while writing the audio file",
 });
 });

 videoOutput.on("finish", () => {
 audioOutput.on("finish", () => {
 if (fs.existsSync(outputPath) && fs.existsSync(audioPath)) {
 const outputFile = path.join(
 process.cwd(),
 "mp4s",
 `${videoInfo.videoDetails.title}-with-audio.mp4`
 );
 const command = ffmpeg()
 .input(outputPath)
 .input(audioPath)
 .outputOptions("-c:v copy")
 .outputOptions("-c:a aac")
 .outputOptions("-b:a 192k")
 .outputOptions("-strict -2")
 .output(outputFile)
 .on("end", () => {
 fs.unlink(outputPath, () => {});
 fs.unlink(audioPath, () => {});
 sendComplete({
 status: "success",
 });
 })
 .on("error", (err) => {
 console.error("ffmpeg error:", err.message);
 sendError({
 status: "error",
 message:
 "An error occurred while processing the audio and video files",
 });
 });
 command.run();
 } else {
 console.error("Output or audio file not found");
 sendError({
 status: "error",
 message: "Output or audio file not found",
 });
 }
 });
 });
 } catch (error) {
 console.error(error);
 sendError({
 status: "error",
 message: "An error occurred while downloading the video",
 });
 }
 };
 socket.on("downloadVideo", downloadVideo);
 });
 res.end();
}



I am also using socket.io to show the progress in the frontend, but for some reason I don't get the progress correctly. Is it possible to do that ?