
Recherche avancée
Médias (3)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (71)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer
Sur d’autres sites (6497)
-
after restarting the page in the browser, the player stops loading
28 juillet 2024, par UximyI have a problem which is that when I start icecast server on ubuntu and not only on ubuntu but also on windows regardless of the operating system, when I first go to the radio station in icecast2 http://localhost:8000/radio the music plays but after restarting the page in the browser, the player stops loading, I tried the solution with nocache in the browser in the address bar, nothing helps, I looked at many users configs, they did not encounter such problems, I will leave my config below, I also wrote a code on nodejs I will also leave it below, the problem plays the same that if I go to a direct icecast link, what I will do through the node js code + ffmpeg, also about the logs, nothing outputs even a hint of any error that is related to this problem


Config IceCast :


<icecast>
 <location>Earth</location>
 <admin>icemaster@localhost</admin>
 <hostname>localhost</hostname>

 <limits>
 <clients>100</clients>
 <sources>10</sources>
 524288
 60
 30
 10
 1
 65536
 </limits>

 <authentication>
 hackme
 hackme
 admin
 hackme
 </authentication>

 
 <port>8000</port>
 0.0.0.0
 
 
 
 <port>8443</port>
 0.0.0.0
 <ssl>1</ssl>
 

 
 <header value="*"></header>
 <header value="Origin, X-Requested-With, Content-Type, Accept"></header>
 <header value="GET, POST, OPTIONS"></header>
 <header value="no-cache, no-store, must-revalidate"></header>
 <header value="no-cache"></header>
 <header value="0"></header>
 

 
 <mount type="normal">
 /radio
 <password>mypassword</password>
 <public>1</public>
 100
 Anime Vibes
 Anime Vibes
 <genre>various</genre>
 audio/ogg
 65536
 
 
 <header value="*"></header>
 <header value="Origin, X-Requested-With, Content-Type, Accept"></header>
 <header value="GET, POST, OPTIONS"></header>
 <header value="no-cache, no-store, must-revalidate"></header>
 <header value="no-cache"></header>
 <header value="0"></header>
 
 </mount>

 <fileserve>1</fileserve>

 <paths>
 <logdir>/var/log/icecast2</logdir>
 <webroot>/etc/icecast2/web</webroot>
 <adminroot>/etc/icecast2/admin</adminroot>
 
 <alias source="/" destination="/status.xsl"></alias>
 
 /etc/icecast2/cert/icecast.pem
 
 </paths>

 <logging>
 <accesslog>access.log</accesslog>
 <errorlog>error.log</errorlog>
 <playlistlog>playlist.log</playlistlog>
 <loglevel>1</loglevel> 
 <logsize>10000</logsize> 
 <logarchive>1</logarchive>
 </logging>
</icecast>



Code Node.js :


const express = require('express');
const { spawn } = require('child_process');
const path = require('path');
const fs = require('fs');
const https = require('https');
const app = express();
const port = 3000;

const privateKey = fs.readFileSync('./cert/privateKey.key', 'utf8');
const certificate = fs.readFileSync('./cert/certificate.crt', 'utf8');

const credentials = {
 key: privateKey,
 cert: certificate
};

app.use(express.static(path.join(__dirname)));

// Check if playlist file exists
const playlistPath = path.join(__dirname, 'playlist.txt');
if (!fs.existsSync(playlistPath)) {
 console.error('Playlist file does not exist');
 process.exit(1);
}

console.log(`Playlist path: ${playlistPath}`);

// Start FFmpeg process to create continuous stream from playlist
const ffmpegProcess = spawn('ffmpeg', [
 '-re',
 '-f', 'concat',
 '-safe', '0',
 '-protocol_whitelist', 'file,http,https,tcp,tls',
 '-i', playlistPath,
 '-c:a', 'libvorbis',
 '-f', 'ogg',
 '-tls', '1',
 'icecast://source:mypassword@localhost:8443/radio'
]);

ffmpegProcess.stdout.on('data', (data) => {
 console.log(`FFmpeg stdout: ${data}`);
});

ffmpegProcess.stderr.on('data', (data) => {
 console.error(`FFmpeg stderr: ${data}`);
});

ffmpegProcess.on('close', (code) => {
 console.log(`FFmpeg process exited with code ${code}`);
});

app.get('/radio', (req, res) => {
 res.setHeader('Content-Type', 'audio/ogg');
 res.setHeader('Transfer-Encoding', 'chunked');

 const requestOptions = {
 hostname: 'localhost',
 port: 8443,
 path: '/radio',
 method: 'GET',
 headers: {
 'Accept': 'audio/ogg'
 },
 rejectUnauthorized: false
 };

 const request = https.request(requestOptions, (response) => {
 response.pipe(res);

 response.on('end', () => {
 res.end();
 });
 });

 request.on('error', (err) => {
 console.error(`Request error: ${err.message}`);
 res.status(500).send('Internal Server Error');
 });

 request.end();
});
https.globalAgent.options.ca = [certificate];
// Create HTTPS server
const httpsServer = https.createServer(credentials, app);

httpsServer.listen(port, () => {
 console.log(`Server is running at https://localhost:${port}`);
});



I hope for your help and any advice, thanks in advance


-
ffmpeg-php loading videos but not generating jpeg (thumbnails)
16 mars 2021, par Ali HamdarThe website is now running on :
finlandbooking.online


Sorry for this noob question first of all.
This is a social media script, when you upload a video, it shows a black thumbnail - you can play the video, but the thumbnail is black. I checked the issue with developers tools, it seems that it's showing error 404 - image not found. ffmpeg, as far as I understood, is supposed to generate an image and display it as a thumbnail. The image is supposed to be located in /uploads/images/ - Kindly check this part of the code and let me know why it's not working :


else if ($action == 'upload_post_video') {
if (empty($cl["is_logged"])) {
 $data['status'] = 400;
 $data['error'] = 'Invalid access token';
}
else {
 $data['err_code'] = "invalid_req_data";
 $data['status'] = 400;
 $post_data = $me['draft_post'];

 if (not_empty($_FILES['video']) && not_empty($_FILES['video']['tmp_name'])) {
 if (empty($post_data)) {
 $post_id = cl_create_orphan_post($me['id'], "video");
 $post_data = cl_get_orphan_post($post_id);

 cl_update_user_data($me['id'],array(
 'last_post' => $post_id
 ));
 }

 if (not_empty($post_data) && $post_data["type"] == "video") {
 if (empty($post_data['media'])) {
 $file_info = array(
 'file' => $_FILES['video']['tmp_name'],
 'size' => $_FILES['video']['size'],
 'name' => $_FILES['video']['name'],
 'type' => $_FILES['video']['type'],
 'file_type' => 'video',
 'folder' => 'videos',
 'slug' => 'original',
 'allowed' => 'mp4,mov,3gp,webm',
 );

 $file_upload = cl_upload($file_info);
 $upload_fail = false;
 $post_id = $post_data['id'];

 if (not_empty($file_upload['filename'])) {
 try {
 require_once(cl_full_path("core/libs/ffmpeg-php/vendor/autoload.php"));

 $ffmpeg = new FFmpeg(cl_full_path($config['ffmpeg_binary']));
 $thumb_path = cl_gen_path(array(
 "folder" => "images",
 "file_ext" => "jpeg",
 "file_type" => "image",
 "slug" => "poster",
 ));

 $ffmpeg->input($file_upload['filename']);
 $ffmpeg->set('-ss','3');
 $ffmpeg->set('-vframes','1');
 $ffmpeg->set('-f','mjpeg');
 $ffmpeg->output($thumb_path)->ready();
 } 

 catch (Exception $e) {
 $upload_fail = true;
 }

 if (empty($upload_fail)) {
 $img_id = $db->insert(T_PUBMEDIA, array(
 "pub_id" => $post_id,
 "type" => "video",
 "src" => $file_upload['filename'],
 "time" => time(),
 "json_data" => json(array(
 "poster_thumb" => $thumb_path
 ),true)
 ));

 if (is_posnum($img_id)) {
 $data['status'] = 200;
 $data['video'] = array(
 "source" => cl_get_media($file_upload['filename']),
 "poster" => cl_get_media($thumb_path),
 );
 }
 }
 }
 }
 else {
 $data['err_code'] = "total_limit_exceeded";
 $data['status'] = 400;
 }
 }
 else {
 cl_delete_orphan_posts($me['id']);
 cl_update_user_data($me['id'],array(
 'last_post' => 0
 ));
 }
 }
}



}


-
Muting ffmpeg warnings when loading video with OpenCV
26 mai 2017, par cbuchartI’m using OpenCV to process a set of MPEG videos. For some of them following warning is displayed when reading a frame or seeking (it is printed by the ffmpeg library).
[mpeg2video @ 026b0d20] warning : first frame is no keyframe
The thing is that such messages are printed together other valid output of my application and they are bothering final users. Is there any way to suppress such warning messages programmatically, other than re-coding the videos with an external tool ?
I’m already muting the standard output and error, as well as using a custom (dummy) OpenCV error handler. Below a MCVE for testing.
PS : I understand the warning and actually the full project handles those scenarios so videos are correctly read.
Example code to reproduce the problem
#include <iostream>
#include <opencv2></opencv2>core/core.hpp>
#include <opencv2></opencv2>highgui/highgui.hpp>
int handleError(int status, const char* func_name,
const char* err_msg, const char* file_name,
int line, void* userdata)
{
return 0;
}
int main()
{
std::cout << "Start!" << std::endl;
cv::VideoCapture reader;
if (!reader.open("Sample.mpg")) {
std::cout << "Failed opening video" << std::endl;
return 0;
}
cv::redirectError(handleError);
std::cout.setstate(std::ios_base::failbit);
std::cout << "std::cout mute test..." << std::endl; // OK, muted
std::cerr.setstate(std::ios_base::failbit);
std::cerr << "std::cerr mute test..." << std::endl; // OK, muted
cv::Mat tmpImage;
try {
tmpImage = tmpImage * tmpImage; // OK, OpenCV error muted
} catch (...) {}
// Here the warning is printed
reader.read(tmpImage);
std::cout.clear();
std::cerr.clear();
std::cout << "Finished!" << std::endl;
return 0;
}
</iostream>The
Sample.mpg
video can be downloaded from the Internet Archive : https://archive.org/download/ligouHDR-HC1_sample1/Sample.mpgThis is the current output of the program :
I’m using VS 2010 and OpenCV 2.4.10. Following DLLs are the only ones with the executable (no other OpenCV-related DLL is reachable in the PATH).
- opencv_core2410.dll
- opencv_ffmpeg2410.dll
- opencv_highgui2410.dll