
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 (34)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
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 (...)
Sur d’autres sites (3683)
-
avcodec/jpeglsenc : Move check out of loop
3 septembre 2020, par Andreas Rheinhardtavcodec/jpeglsenc : Move check out of loop
ls_encode_line() encodes a line of input, going from left to right. In
order to calculate a predicted value it uses the left and upper-left
value of the output picture (that is, it uses how a decoder would see
the already encoded part of the picture), unless this is the very first
pixel of this line in which case one uses the first pixel of the last
(upper) line and the line before the last line. Therefore the loop
contained a check for whether this is the beginning of a new line. This
commit moves said check out of the loop by initializing these values
before the loop and by updating these values at the end of the loop
body ; already read/calculated values are reused for this (the prediction
also needs the value of the upper pixel and this can be reused for the
upper left value of the next iteration of the loop).Reviewed-by : Paul B Mahol <onemda@gmail.com>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com> -
Equalizers, bassboost and reverb effect not working (using FFmpegMediaPlayer)
9 février 2018, par ArrenI’m currently using FFmpegMediaPlayer from github and the effects are not working in the phone but works perfectly in the emulator which of both are the same API 22.
The strange thing is that when I switch the code from FFmpegMediaplayer to standard android media player the effects start working again in the real phone device. But when I switch back to ffpmeg the effect only works in the emulator and not in the real device. My code is as below,
public void setupVisualizerFxAndUI() {
try {
mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId());
mEqualizer = new Equalizer(0, mMediaPlayer.getAudioSessionId());
mEqualizer.setEnabled(true);
try {
bassBoost = new BassBoost(0, mMediaPlayer.getAudioSessionId());
bassBoost.setEnabled(false);
BassBoost.Settings bassBoostSettingTemp = bassBoost.getProperties();
BassBoost.Settings bassBoostSetting = new BassBoost.Settings(bassBoostSettingTemp.toString());
bassBoostSetting.strength = (1000 / 19);
bassBoost.setProperties(bassBoostSetting);
mMediaPlayer.setAuxEffectSendLevel(1.0f);
presetReverb = new PresetReverb(0, mMediaPlayer.getAudioSessionId());
presetReverb.setPreset(PresetReverb.PRESET_NONE);
presetReverb.setEnabled(false);
mMediaPlayer.setAuxEffectSendLevel(1.0f);
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
if (homeActivity.isEqualizerEnabled) {
try {
bassBoost.setEnabled(true);
BassBoost.Settings bassBoostSettingTemp = bassBoost.getProperties();
BassBoost.Settings bassBoostSetting = new BassBoost.Settings(bassBoostSettingTemp.toString());
if (homeActivity.bassStrength == -1) {
bassBoostSetting.strength = (1000 / 19);
} else {
bassBoostSetting.strength = homeActivity.bassStrength;
}
bassBoost.setProperties(bassBoostSetting);
mMediaPlayer.setAuxEffectSendLevel(1.0f);
if (homeActivity.reverbPreset == -1) {
presetReverb.setPreset(PresetReverb.PRESET_NONE);
} else {
presetReverb.setPreset(homeActivity.reverbPreset);
}
presetReverb.setEnabled(true);
mMediaPlayer.setAuxEffectSendLevel(1.0f);
} catch (Exception e) {
e.printStackTrace();
}
}
if (homeActivity.isEqualizerEnabled && homeActivity.isEqualizerReloaded) {
try {
homeActivity.isEqualizerEnabled = true;
int pos = homeActivity.presetPos;
if (pos != 0) {
mEqualizer.usePreset((short) (pos - 1));
} else {
for (short i = 0; i < 5; i++) {
mEqualizer.setBandLevel(i, (short) homeActivity.seekbarpos[i]);
}
}
if (homeActivity.bassStrength != -1 && homeActivity.reverbPreset != -1) {
bassBoost.setEnabled(true);
bassBoost.setStrength(homeActivity.bassStrength);
presetReverb.setEnabled(true);
presetReverb.setPreset(homeActivity.reverbPreset);
}
mMediaPlayer.setAuxEffectSendLevel(1.0f);
} catch (Exception e) {
e.printStackTrace();
}
}where mMediaPlayer is ffmpeg...Other than that the library is working fine in regards to streaming. The only problem is that it doesn’t get any effect put in. I thought this might be a coding problem so I just switched ffmpeg with Android standard media player like I mentioned above and it works. FFmpeg - bass boost and equalizer only works in the emulator and not in real phone device.
Another strange thing was that the effect initially worked at first in debug run mode and stopped working after I signed the apk. From which point on it stopped working both in the debug as well as any other run modes i.e - release also....I’m not using any pro guard rules also.
Points to note :
1. Replacing FFmpegmediaplayer with Standard Media player the effects works.
2. Effects worked before signing the apk then stopped working in all run modes
3. Using the same code above for FFMpegmediaplayer effects only work in the
Emulator and not in real device.
4. Other than the effects problem, FFmpegmediaplayer is functional regarding
streaming and local playback - in real phone device as well as emulator. -
Ytdl-Core / FFMPEG in NodeJs : Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_split_0
25 mars 2023, par VenoMSo I'm using ytdl-core & ffmpeg to convert some videos from YouTube to MP4 and then manipulate them in a way or take screenshots. But the issue I'm facing is - some videos are downloaded and are completely playable, but others are corrupt.


This is the error I get when I try to take screenshot of the corrupted video :




Error : ffmpeg exited with code 1 : Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_split_0




And obviously, error is there because the video is corrupted, but WHY is that the case ?


Here's my code (read TL ;DR below) :


router.post("/screenshot", async (req, res) => {
 const urlToScreenshot = req.body.url;
 const timestamp = parseInt(req.body.t, 10);
 const YouTubeURL = `https://youtube.com/watch?v=${urlToScreenshot}`;
 const filename = uuidv4();

 const videoPath = `${filePath}/${filename}.mp4`;

 const downloadStartTime = timestamp - 3;
 const downloadEndTime = timestamp + 3;

 const videoStream = ytdl(YouTubeURL, {
 quality: "highest",
 });

 const ffmpegCommand = ffmpeg(videoStream)
 .setStartTime(downloadStartTime)
 .duration(downloadEndTime - downloadStartTime)
 .outputOptions("-c:v", "libx264")
 .outputOptions("-c:a", "copy")
 .outputOptions("-b:v", "10M")
 .outputOptions("-filter:v", "scale=1920:1080")
 .outputOptions("-q:v", "1")
 .outputOptions("-reconnect", "1") // enable reconnection attempts
 .outputOptions("-ignore_io_errors", "1") // ignore input/output errors
 .on("end", async () => {
 console.log("Video downloaded successfully: " + videoPath);

 const screenshotPath = `${filePath}/${filename}.png`;
 ffmpeg(videoPath)
 .screenshots({
 count: 1,
 timemarks: ["1"],
 folder: filePath,
 filename: `${filename}.png`,
 })
 .on("end", async () => {
 console.log(`Screenshot saved successfully: ${screenshotPath}`);
 try {
 const cloudinaryResult = await cloudinary.uploader.upload(
 screenshotPath
 );
 const screenshotUrl = cloudinaryResult.secure_url;
 console.log(`Screenshot uploaded to Cloudinary: ${screenshotUrl}`);
 // await unlink(videoPath);
 console.log(`Video file deleted: ${videoPath}`);
 // await unlink(screenshotPath);
 console.log(`Screenshot file deleted: ${screenshotPath}`);
 res.status(200).json({ screenshotUrl });
 } catch (err) {
 console.error(
 "An error occurred while uploading the screenshot to Cloudinary:",
 err
 );
 // await unlink(videoPath);
 // await unlink(screenshotPath);
 res.status(500).send("Internal Server Error");
 }
 })
 .on("error", async (err) => {
 console.error("An error occurred while taking the screenshot:", err);
 // await unlink(videoPath);
 // await unlink(screenshotPath);
 res.status(500).send("Internal Server Error");
 });
 })
 .on("error", async (err) => {
 console.error("An error occurred while downloading the video:", err);
 await unlink(videoPath); // delete the file on error
 res.status(500).send("Internal Server Error");
 })
 .save(videoPath);

 // console.log(ffmpegCommand);
});



Code Summary : Basically I'm passing the videoID and timestamp (because I want to download a certain section of the video, not the whole video), it downloads the video, then takes a screenshot of the video at a certain timestamp (i.e 1st second) and sends the screenshot to Cloudinary (a cloud file storage).


This works fine for 50% of the videos I've tried, but doesn't for other videos.


Here's a picture of a corrupt video and a working video.








Some help would be greatly appreciated !