
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (69)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (5049)
-
Reddit api only giving video and not its audio
25 mars 2023, par Rudra SharmaI am using Reddit API to play videos on my app but the audio is not playing with the video.


This is my code. I am using chewie package and I have no idea if the problem is in the player or Reddit Api. Also I am new to flutter. The code plays reddit videos on my app on chewie video player.


Future<void> _loadVideos() async {
 try {
 final videoUrls =
 await RedditApi.getVideoUrlsFromSubreddit('IndianDankMemes');

 setState(() {
 _videoUrls.addAll(videoUrls);
 });
 } catch (e) {
 print(e);
 }
 }

 Widget _buildVideosList() {
 return ListView.builder(
 itemCount: _videoUrls.length,
 itemBuilder: (context, index) {
 return Padding(
 padding: const EdgeInsets.all(8.0),
 child: Chewie(
 controller: ChewieController(
 videoPlayerController: VideoPlayerController.network(
 _videoUrls[index],
 ),
 aspectRatio: 9 / 16,
 autoPlay: true,
 looping: true,
 autoInitialize: true,
 ),
 ),
 );
 },
 );
 }
}

class RedditApi {
 static const String BASE_URL = 'https://www.reddit.com';
 static const String CLIENT_ID = 'my client id';
 static const String CLIENT_SECRET = 'my client secret';

 static Future> getVideoUrlsFromSubreddit(
 String subredditName) async {
 final response = await http.get(
 Uri.parse('$BASE_URL/r/$subredditName/top.json?limit=10'),
 headers: {'Authorization': 'Client-ID $CLIENT_ID'});

 if (response.statusCode == 200) {
 final jsonData = jsonDecode(response.body);
 final postsData = jsonData['data']['children'];

 final videoUrls = <string>[];

 for (var postData in postsData) {
 if (postData['data']['is_video']) {
 videoUrls.add(postData['data']['media']['reddit_video']
 ['fallback_url']);
 }
 }

 return videoUrls;
 } else {
 throw Exception("Failed to load videos from subreddit");
 }
 }
}```

If you are suggesting for ffmpeg please give me code as well as I said I am new to flutter. 

I have checked my client id and client secret is correct as well. Also if there is any other package I can add to make the task easy.

</string></void>


-
JSmpeg is not playing audio from websocket stream
5 juin 2023, par NikI am trying to stream RTSP to web browser using ffmpeg through web socket relay written in node js taken from https://github.com/phoboslab/jsmpeg , and on the browser i am using JSMpeg to display the RTSP stream, the video is playing fine, but audio is not playing,


The ffmpeg command :


ffmpeg -rtsp_transport tcp -i rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 
 -f mpegts -c:v mpeg1video -c:a mp2 http://127.0.0.1:8081/stream_from_ffmpeg/



The node js web socket relay :


// Use the websocket-relay to serve a raw MPEG-TS over WebSockets. You can use
// ffmpeg to feed the relay. ffmpeg -> websocket-relay -> browser
// Example:
// node websocket-relay yoursecret 8081 8082
// ffmpeg -i <some input="input"> -f mpegts http://localhost:8081/yoursecret

var fs = require('fs'),
 http = require('http'),
 WebSocket = require('ws');

if (process.argv.length < 3) {
 console.log(
 'Usage: \n' +
 'node websocket-relay.js <secret> [ ]'
 );
 process.exit();
}

var STREAM_SECRET = process.argv[2],
 STREAM_PORT = process.argv[3] || 8081,
 WEBSOCKET_PORT = process.argv[4] || 8082,
 RECORD_STREAM = false;

// Websocket Server
var socketServer = new WebSocket.Server({port: WEBSOCKET_PORT, perMessageDeflate: false});
socketServer.connectionCount = 0;
socketServer.on('connection', function(socket, upgradeReq) {
 socketServer.connectionCount++;
 console.log(
 'New WebSocket Connection: ',
 (upgradeReq || socket.upgradeReq).socket.remoteAddress,
 (upgradeReq || socket.upgradeReq).headers['user-agent'],
 '('+socketServer.connectionCount+' total)'
 );
 socket.on('close', function(code, message){
 socketServer.connectionCount--;
 console.log(
 'Disconnected WebSocket ('+socketServer.connectionCount+' total)'
 );
 });
});
socketServer.broadcast = function(data) {
 socketServer.clients.forEach(function each(client) {
 if (client.readyState === WebSocket.OPEN) {
 client.send(data);
 }
 });
};

// HTTP Server to accept incoming MPEG-TS Stream from ffmpeg
var streamServer = http.createServer( function(request, response) {
 var params = request.url.substr(1).split('/');

 if (params[0] !== STREAM_SECRET) {
 console.log(
 'Failed Stream Connection: '+ request.socket.remoteAddress + ':' +
 request.socket.remotePort + ' - wrong secret.'
 );
 response.end();
 }

 response.connection.setTimeout(0);
 console.log(
 'Stream Connected: ' +
 request.socket.remoteAddress + ':' +
 request.socket.remotePort
 );
 request.on('data', function(data){
 socketServer.broadcast(data);
 if (request.socket.recording) {
 request.socket.recording.write(data);
 }
 });
 request.on('end',function(){
 console.log('close');
 if (request.socket.recording) {
 request.socket.recording.close();
 }
 });

 // Record the stream to a local file?
 if (RECORD_STREAM) {
 var path = 'recordings/' + Date.now() + '.ts';
 request.socket.recording = fs.createWriteStream(path);
 }
})
// Keep the socket open for streaming
streamServer.headersTimeout = 0;
streamServer.listen(STREAM_PORT);

console.log('Listening for incoming MPEG-TS Stream on http://127.0.0.1:'+STREAM_PORT+'/<secret>');
console.log('Awaiting WebSocket connections on ws://127.0.0.1:'+WEBSOCKET_PORT+'/');
</secret></secret></some>


The front end code




 
 
 
 
 <code class="echappe-js"><script src='http://stackoverflow.com/feeds/tag/jsmpeg.min.js'></script>

 
 
 
 
 
<script>&#xA; let url;&#xA; let player;&#xA; let canvas = document.getElementById("video-canvas");&#xA; let ipAddr = "127.0.0.1:8082";&#xA; window.onload = async() => {&#xA; url = `ws://${ipAddr}`;&#xA; player = new JSMpeg.Player(url, { canvas: canvas, });&#xA; };&#xA;&#xA; </script>





The above code works fine and plays the video, but no audio is playing
Things I tried :


Changed the audio context state inside the player object from suspended to running


player.audioOut.context.onstatechange = async () => {
 console.log("Event triggered by audio");

 if (player.audioOut.context === "suspended") {
 await player.audioOut.context.resume();
 }
}



-
play video with secure link in laravel ffmpeg
1er mars 2023, par abc abcI convert my video file to m3u8 with ffmpeg and upload in download host.
I have no problem when I want to display Blade in Laravel without a secure link.


Now, I am asking my friends to help me display those videos using a safe link, something like this link :




I did it myself without a secure link and got the output.
These are the routes I defined :


Route::get('/video/secret/{key}', function ($key) {
 return Storage::disk('secrets')->download('29/' . $key);
})->name('video.key');
 
Route::get('/video/{playlist}', function ($playlist) {
 return FFMpeg::dynamicHLSPlaylist()
 ->fromDisk('static')
 ->open("stream/video/29/{$playlist}")
 ->setKeyUrlResolver(function ($key) {
 return route('video.key', ['key' => $key]);
 })
 ->setMediaUrlResolver(function ($mediaFilename) {
 return Storage::disk('static')->url("stream/video/29/{$mediaFilename}");
 })
 ->setPlaylistUrlResolver(function ($playlistFilename) {
 return route('video.playlist', ['playlist' => $playlistFilename]);
 });
})->name('video.playlist');



This is the source of the video :


<code class="echappe-js"><script src="https://cdn.rawgit.com/video-dev/hls.js/18bb552/dist/hls.min.js"></script>

<script>&#xA; document.addEventListener(&#x27;DOMContentLoaded&#x27;, () => {&#xA; const source = "{{ route(&#x27;video.playlist&#x27;, [&#x27;playlist&#x27; => &#x27;29.m3u8&#x27;]) }}";&#xA; const video = document.querySelector(&#x27;#video&#x27;);&#xA; &#xA; const defaultOptions = {};&#xA; &#xA; if (!Hls.isSupported()) {&#xA; video.src = source;&#xA; var player = new Plyr(video, defaultOptions);&#xA; } else {&#xA; // For more Hls.js options, see https://github.com/dailymotion/hls.js&#xA; const hls = new Hls();&#xA; hls.loadSource(source);&#xA; &#xA; // From the m3u8 playlist, hls parses the manifest and returns&#xA; // all available video qualities. This is important, in this approach,&#xA; // we will have one source on the Plyr player.&#xA; hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {&#xA; &#xA; // Transform available levels into an array of integers (height values).&#xA; const availableQualities = hls.levels.map((l) => l.height)&#xA; availableQualities.unshift(0) //prepend 0 to quality array&#xA; &#xA; // Add new qualities to option&#xA; defaultOptions.quality = {&#xA; default: 0, //Default - AUTO&#xA; options: availableQualities,&#xA; forced: true,&#xA; onChange: (e) => updateQuality(e),&#xA; }&#xA; // Add Auto Label&#xA; defaultOptions.i18n = {&#xA; qualityLabel: {&#xA; 0: &#x27;Auto&#x27;,&#xA; },&#xA; }&#xA; &#xA; hls.on(Hls.Events.LEVEL_SWITCHED, function (event, data) {&#xA; var span = document.querySelector(".plyr__menu__container [data-plyr=&#x27;quality&#x27;][value=&#x27;0&#x27;] span")&#xA; if (hls.autoLevelEnabled) {&#xA; span.innerHTML = `AUTO (${hls.levels[data.level].height}p)`&#xA; } else {&#xA; span.innerHTML = `AUTO`&#xA; }&#xA; })&#xA; &#xA; // Initialize new Plyr player with quality options&#xA; var player = new Plyr(video, defaultOptions);&#xA; });&#xA; &#xA; hls.attachMedia(video);&#xA; window.hls = hls;&#xA; }&#xA; &#xA; function updateQuality(newQuality) {&#xA; if (newQuality === 0) {&#xA; window.hls.currentLevel = -1; //Enable AUTO quality if option.value = 0&#xA; } else {&#xA; window.hls.levels.forEach((level, levelIndex) => {&#xA; if (level.height === newQuality) {&#xA; console.log("Found quality match with " &#x2B; newQuality);&#xA; window.hls.currentLevel = levelIndex;&#xA; }&#xA; });&#xA; }&#xA; }&#xA; });&#xA; </script>



But these work without secure links and signatures.
I want to create a secure link using token, signature and expires for each part of the video.
It means to close the direct access on the download host and to access the video files only through Laravel.
Thank you if anyone knows how to help.


Something similar to the following link to display the video :