
Recherche avancée
Autres articles (86)
-
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...) -
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 (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (6036)
-
Anomalie #3576 : a travaillé sur cet article ...
8 novembre 2015, par Ben .Quand on l’a vu c’était avec jluc (qui est rédacteur sur le blog) et nous on voyait qu’il avait modifié cet article http://blog.spip.net/ecrire/?exec=article&id_article=780 ( qui n’a pas d’embeded)
-
Low latency video player on android
20 mai 2021, par Louis BlennerI'd like to be able to stream the video from my webcam to an Android app with a latency below 500ms, on my local network.


To capture and send the video over the network, I use ffmpeg.


ffmpeg -f v4l2 -i /dev/video0 -preset ultrafast -tune zerolatency -vcodec libx264 -an -vf format=yuv420p -f mpegts udp://192.168.1.155:5000



This command takes the webcam as an input, convert it and send it to a device using the mpegts protocol.

This is not a requirement, if another technique could work, I could change the way I send the video.

I am able to read the video on another PC from the local network with a latency below 500 ms, using commands like


gst-launch-1.0 -v udpsrc port=5000 ! video/mpegts ! tsdemux ! h264parse ! avdec_h264 ! fpsdisplaysink sync=false



or


mpv udp://0.0.0.0:5000 --no-cache --untimed --no-demuxer-thread --video-sync=audio --vd-lavc-threads=1 



So it is possible to have this range of latency.

I'd like to have the same thing on Android.

Here are my tries to do that.


Exoplayer


After looking at the different players available on Android studio, it seems like Exoplayer is the go-to choice.

I tried different options indicated in the live-streaming documentation, but I always end up with a stream taking seconds to start and with a latency of seconds.

I tried to add a Button to seek to the default position of the windows, but it results in a loading of several seconds.

DefaultExtractorsFactory extractorsFactory =
 new DefaultExtractorsFactory()
 .setTsExtractorFlags(DefaultTsPayloadReaderFactory.FLAG_IGNORE_AAC_STREAM);

 player = new SimpleExoPlayer.Builder(this)
 .setMediaSourceFactory(
 new DefaultMediaSourceFactory(this, extractorsFactory))
 .setLoadControl(new DefaultLoadControl.Builder()
 .setBufferDurationsMs(DefaultLoadControl.DEFAULT_MIN_BUFFER_MS, DefaultLoadControl.DEFAULT_MAX_BUFFER_MS, 200, 200)
 .build())
 .build();
 MyPlayerView playerView = findViewById(R.id.player_view);
 // Bind the player to the view.
 playerView.setPlayer(player);
 // Build the media item.
 MediaItem mediaItem = new MediaItem.Builder()
 .setUri(Uri.parse("udp://0.0.0.0:5000"))
 .setLiveMaxOffsetMs(500)
 .setLiveTargetOffsetMs(0)
 .setLiveMinOffsetMs(0)
 .build();
 // Set the media item to be played.
 player.setMediaItem(mediaItem);
 // Prepare the player.
 player.setPlayWhenReady(true);
 player.prepare();
 //player.seekToDefaultPosition();



This issue is about the same issue and the conclusion was that Exoplayer was not fit for this use case.




I'll be honest, ultra low-latency like this isn't ExoPlayer's main use-case




Vlc


Another try was to use the Vlc library.

But I was unable to have the same low latency stream as with the two previous players with Vlc.

I tried changing the preferences of Vlc to stream as fast as possible as described here

Input/Codecs -> x264 preset: ultrafast - zerolatency
Input/Codecs -> Access Module: UDP input
Input/Codecs -> Clock Jitter: 500
Audio: disable audio



I also tried reducing the different buffers.

However, I still have a latency of more than 1 seconds with that.

Gstreamer


Another try was to create a react-native project to use the different players available here.

One player that seemed promising was react-native-gstreamer because it uses gstreamer which is able to stream with low latency (gst-launch command).

But the library is now outdated.

Question


There were other tries, but none were successful.

Is there a problem with one of my approaches ?

And if not, Is there a player on Android (that I missed) which is able to achieve low latency stream like gstream or mpv on linux ?

-
Playing With File
8 septembre 2011, par Multimedia Mike — GeneralI played with the ‘file’ utility a long time ago because I wanted to make it recognize a large number of multimedia formats. I had trouble getting my changes to take. But I’m prepared to try again after many years.
Aiming at the Corpus
In my local mirror of the MPlayerHQ samples archive, I find 9853 unique files. So I run all of them through the ‘file’ command :’find /path/to/samples -type f -print0 | xargs -0 file —no-pad’
My Ubuntu installation has file v5.04. I also tested against 5.07 and the latest, 5.08. Here is the number of files each version was unable to identify (generically marking as ‘data’) :
5.04 1521 5.07 1405 5.08 1501
That seems like a regression for v5.08 until I dug into the details and saw quite a few items like this, indicating that the MPEG detection could use some work :
mov/mov-demux-infinite-loop.mpg : DOS-executable ( +mov/mg-‹demux-infinite-loop.mpg : data
image-samples/UNeedQT4.pntg : DOS-executable ( +imY- samples/UNeedQT4.pntg : data
Workflow
These are just notes to myself and perhaps anyone else who wants to add new file formats to be identified by the ‘file’ command.First, download either the latest release from the FTP or clone from Github. Do the usual unpack, ‘./configure’, ‘make’ routine. To use this newly-built version and its associated magic file :
./src/file —magic-file magic/magic.mgc <file>
To add a new format for ID, first, run the foregoing command to ensure that it’s not already identified. Then, check over the files in magic/Magdir and see which one might pertain to what you’re doing (it’s unlikely that your format will merit a new file in this directory). For example, for this round, I modified animation, audio, iff, and riff. Add or modify existing specs based on the copious examples in the directory and by consulting the appropriate man page (‘man 5 magic’).
Finally, run ‘make’ again which will regenerate the magic file. Invoke the above command again to use the modified magic file.
Before and After
On a selection of formats taken from the samples archive (renamed and cut down to a kilobyte because detection typically only relies on the first few bytes), here is the “before” :amv : RIFF (little-endian) data armovie : data bbc-dirac : data interplay-mve : data mtv : data nintendo-thp : data nullsoft-video : data redcode : data sega-film : data smacker : data trueaudio : data vqa : IFF data wavpack : data wc3-mve : IFF data wtv : data
And the “after” :
amv : RIFF (little-endian) data, AMV armovie : ARMovie bbc-dirac : BBC Dirac Video interplay-mve : Interplay MVE Movie mtv : MTV Multimedia File nintendo-thp : Nintendo THP Multimedia nullsoft-video : Nullsoft Video redcode : REDCode Video sega-film : Sega FILM/CPK Multimedia, 320 x 224 smacker : RAD Game Tools Smacker Multimedia version 2, 320 x 200, 100 frames trueaudio : True Audio Lossless Audio vqa : IFF data, Westwood Studios VQA Multimedia, 418 video frames, 320 x 200 wavpack : WavPack Lossless Audio wc3-mve : IFF data, Wing Commander III Video, PC version wtv : Windows Television DVR Media
After rerunning ‘file’ on the mphq corpus using the modified magic file, only 1329 files remain unidentified (down from 1501).
Going Forward
As mentioned, MPEG detection could probably be strengthened. However, a major weakness is QuickTime/MP4. Many files are not detected, probably owing to the many ways that QuickTime files can begin.