
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (78)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
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. -
Supporting all media types
13 avril 2011, parUnlike 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 (8243)
-
Nodejs ffmpeg "The input file path can not be empty" error, but files exist
29 octobre 2022, par 0sziI'm trying to merge an audio file with a video file from the same source (Youtube)


In the following code I first read in the console parameters wirh commander then i define the videoOutput dir and download the highset res. video from youtube with node-ytdl-core. After that I download the audio for the video. and in the callback of the video.on("end", ....)
i call the function merge()


const path = require('path');
const fs = require('fs');
const readline = require("readline");
const ytdl = require('ytdl-core');
const { program } = require('commander');
const ffmpeg = require('ffmpeg');

program
 .option("--url, --url <url>", "Youtube video url")
 .option("--name, --name <name>", "Name of the video in hard drive")

program.parse(process.argv);


const options = program.opts();
let url = options.url;
let name = options.name;

let videoOutput = path.resolve(`./video${name}.mp4`);

let video = ytdl(url, {
 quality: "highestvideo"
});

let starttime = 0;

video.pipe(fs.createWriteStream(videoOutput));

video.once('response', () => {
 starttime = Date.now();
});

video.on('progress', (chunkLength, downloaded, total) => {
 const percent = downloaded / total;
 const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;
 const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;
 readline.cursorTo(process.stdout, 0);
 process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);
 process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);
 process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);
 process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);
 readline.moveCursor(process.stdout, 0, -1);
 });

 video.on('end', () => {
 process.stdout.write('\n\n');
 });


// repeat for audio
video = ytdl(url, {
 quality: "highestaudio"
});
 
starttime = 0;

let audioOutput = path.resolve(`./audio${name}.mp3`);

video.pipe(fs.createWriteStream(audioOutput));

video.once('response', () => {
 starttime = Date.now();
});

video.on('progress', (chunkLength, downloaded, total) => {
 const percent = downloaded / total;
 const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;
 const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;
 readline.cursorTo(process.stdout, 0);
 process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);
 process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);
 process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);
 process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);
 readline.moveCursor(process.stdout, 0, -1);
 });


function merge(){
 ffmpeg()
 .input("./videotest.mp4") //your video file input path
 .input("./audiotest.mp3") //your audio file input path
 .output("./finished.mp4") //your output path
 .outputOptions(['-map 0:v', '-map 1:a', '-c:v copy', '-shortest'])
 .on('start', (command) => {
 console.log('TCL: command -> command', command)
 })
 .on('error', (error) => console.log("errrrr",error))
 .on('end',()=>console.log("Completed"))
 .run() 
}

video.on('end', () => {
 process.stdout.write('\n\n');
 merge();
});

</name></url>


But even though the files are there ffmpeg throws me this error :



I also tried this in the video-end callback, because maybe the audio is finished downloading before the video, still doesn't work. I've also tried to rename the outputDirs for the files and keep the old files and rerun the script so the files are 100% there. Still doesn't work.


I have also tried absolute paths ("C :/..." also with backslash "C :\...") but I still get the error message that the input file path can't be empty.


Appreciate any piece of advise or help !


-
Saving OpenCV output in Motion JPEG format. Getting a "'MJPG' is not supported with codec id 7" error
23 novembre 2022, par portsampleI'd like to save video camera output in motion JPEG (MJPG) format. The below code,


import cv2
import numpy as np

cap = cv2.VideoCapture(0)
if (cap.isOpened() == False): 
print("Unable to read camera feed")
frame_width = int(cap.get(3))
frame_height = int(cap.get(4))
frame_per_sec = int('10')

out = cv2.VideoWriter('output.mjpeg',cv2.VideoWriter_fourcc('M','J','P','G'), (frame_per_sec), (frame_width,frame_height))
while(True):
ret, frame = cap.read()
if ret == True: 
# Write the frame into the file 'output.mjpeg'
out.write(frame) 
# Display the resulting frame 
cv2.imshow('frame',frame)
# Press Q on keyboard to stop recording
if cv2.waitKey(1) & 0xFF == ord('q'):
 break
else:
break 
cap.release()
out.release()
cv2.destroyAllWindows()



While it will run, I am getting the following error(s),


[ WARN:0] OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
OpenCV: FFMPEG: tag 0x67706a6d/'mjpg' is not supported with codec id 7 and format 'mjpeg / raw MJPEG video'



What can I do to resolve these ? I've tried changing the case, ('M','J','P','G' to 'm','j','p','g') with no success.
Appreciate any suggestions regarding resolving the above issue, as well as the GStreamer issue. Thanks in advance.


-
lavu/pixdesc : handle xv30be in av_[read|write]_image_line
4 décembre 2022, par Philip Langdalelavu/pixdesc : handle xv30be in av_read_image_line
xv30be is an obnoxious format that I shouldn't have included in the
first place. xv30 packs 3 10bit channels into 32bits and while our
byte-oriented logic can handle Little Endian correctly, it cannot
handle Big Endian. To avoid that, I marked xv30be as a bitstream
format, but while that didn't produce FATE errors, it turns out that
the existing read/write code silently produces incorrect results, which
can be revealed via ubsan.In all likelyhood, the correct fix here is to remove the format. As
this format is only used by Intel vaapi, it's only going to show up
in LE form, so we could just drop the BE version. But I don't want to
deal with creating a hole in the pixfmt list and all the weirdness that
comes from that. Instead, I decided to write the correct read/write
code for it.And that code isn't too bad, as long as it's specialised for this
format, as the channels are all bit-aligned inside a 32bit word.