
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (78)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (6798)
-
With apulsator in ffempeg - How do I make so one side does not completely become silent ?
3 avril 2022, par corgrathI am trying to learn more about signal processing and the
apulsator
effect in ffmpeg.

http://ffmpeg.org/ffmpeg-filters.html#apulsator


With the most default example :


ffmpeg -y -i input.mp3 -af "apulsator=hz=0.0625:timing=hz:mode=sine" output.mp3


You can clearly hear that the sound travels from left to right and then back to left, as expected.


However, I am trying to understand how/if it is possible that sound volume does not completely becomes silent, but perhaps 10% of the volume, while the other side gets 90%.


What I am trying to achieve is that one side does not completely becomes silent.


If this cannot be achieved solely by the
apulsator
settings, what other effects or ways can I achieve this using ffmpeg ?

Any advice is appreciated !


-
How to add a token verification in url with Laravel when playing HLS videos ?
31 mars 2022, par PhilipI have been playing with Laravel and FFMPEG for few weeks but got stuck. Hope someone could help here. Thank you in advanced.


Background


I have a video website build with Laravel 9. I use FFMPEG to convert uploaded MP4 to HLS with laravel-ffmpeg package. AES encryption is applied. Then I store the converted m3u8 playlist, key and ts file in Storage path with symlinks created to public folder. I stored the path in database and call it in view file. I use plyr + hls.js to play the video. Everything is working fine.


However, I would like to further protect my videos from being played by other website. I blocked the cross domain access in Nginx but seem it only check the referrer which could be faked. I can see many video websites that their m3u8 path contains a token parameter :


https://some-domain.com/videos/index.m3u8?token=abc123456



I am trying to do the same but stuck.


These are my Laravel files


VideoController


This will convert mp4 to m3u8 , key, ts files and save to database


FFMpeg::fromDisk('videos')
 ->open($queue->path)
 ->exportForHLS()
 ->withRotatingEncryptionKey(function($filename,$content) use($queue){
 Storage::disk('videos')->put('m3u8/'.$queue->video->slug.'/'.$filename, $content);
 })
 ->setSegmentLength(10) // optional
 ->setKeyFrameInterval(48) // optional
 ->onProgress(function ($percentage, $remaining, $rate) use($queue){
 $queue->update([
 'is_processing'=>true,
 'percentage'=>$percentage,
 'remaining'=>$remaining,
 'rate'=>$rate,
 ]);
 })
 ->addFormat($resolution_720)
 ->save($m3u8_path);



blade file


This will show the m3u8 playlist path and pass to js file


@if (isset($video->play_url) && $video->play_url != '')
 <div class="col-12 mb-3 single-video">
 <video playsinline="playsinline" controls="controls" muted="muted">

 </video>
 <code class="echappe-js"><script> &#xA; var m3u8 = "{{ $video->play_url }}" &#xA; var token = &#x27;token_xxxxxxxx&#x27;&#xA; </script>


@endif



js file


This will play the video (with plyr player)


const player = new Plyr('#player');
if(typeof(m3u8) != "undefined" && m3u8 !== null){
 m3u8 = m3u8 + '?token=' + token
 console.log(m3u8,token)
 var video = document.getElementById('player');
 if(Hls.isSupported()) {
 var hls = new Hls();
 hls.loadSource(m3u8);
 hls.attachMedia(video);

 }else if (video.canPlayType('application/vnd.apple.mpegurl')) {
 video.src = m3u8;

 }

}



If I remove "token" from the above code. The video plays fine. But now I could like to check if the token valid before returning the file. I remove the symlink to prevent direct access to the file.


public_path('m3u8') => storage_path('app/videos/m3u8'),



Route


in web.php, I added few routes to check the token


Route::get('/m3u8/{slug}/{filename}.m3u8', [VideoController::class, 'get_m3u8'])->name('video.m3u8');
 Route::get('/m3u8/{slug}/{filename}.ts', [VideoController::class, 'get_ts'])->name('video.ts');
 Route::get('/m3u8/{slug}/{filename}.key', [VideoController::class, 'get_key'])->name('video.key');



Then in VideoController


public function get_m3u8(Request $request ,$slug ,$filename)
{
 if($request->token == 123){
 return response()->file(storage_path('app/videos/m3u8/'.$slug.'/'.$filename .'.m3u8'),[
 'Content-Type' => 'application/x-mpegURL',
 ]);
 }else{
 return abort('403');
 }
}



But the video cannot be played. Because when loading index.m3u8, it loads index_0_1200.m3u8 next and then load the rest of ts files which all do not contain the token. But I cannot add to token duration the conversion from mp4 to hls because in actually case the token will be dynamic such as adding timestamp.


Please advise. Thank you. My final aim is to prevent other from using the m3u8 playlist and key files to play my ts files. It will consume a lot of bandwidth.


Video Seek Scroll (60FPS)
Trying to achieve an effect of seeking through a video when the page is scrolled. This has been achieved by exporting all frames of the video to JPEG images, pre-loading the images, and rendering them to a canvas
. However, this approach uses a lot of bandwidth and takes a long time to load on slow networks.


Trying to achieve the same effect by rendering a video
to a canvas
does not play as smoothly as the image-based approach.


Here is a working demo with the video-based approach :


https://codesandbox.io/s/infallible-chaum-grvi0r?file=/index.html


Since HTMLMediaElement.fastSeek() doesn't have widespread browser coverage, how can one achieve a realtime playback rate of 30-60 FPS ?


Here is the relevant code for the effect (see CSB link above for the full code) :


const video = document.querySelector("video");
const canvas = document.querySelector("canvas");
const ctx = canvas.getContext("2d");

(function tick() {
 requestAnimationFrame(tick);

 const { scrollHeight, clientHeight, scrollTop } = document.body;
 const maxScroll = scrollHeight - clientHeight;
 const scrollProgress = scrollTop / maxScroll;

 canvas.width = document.body.clientWidth;
 canvas.height = document.body.clientHeight;

 // This is the line that causes the issue
 video.currentTime = video.duration * scrollProgress;

 ctx.clearRect(0, 0, canvas.width, canvas.height);
 ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
})();