
Recherche avancée
Autres articles (84)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
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 (9001)
-
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 ?

-
Concatenate / Join MP4 files using ffmpeg and windows command line batch NOT LINUX
10 septembre 2022, par julesverneI've written a batch script that attempts to take a generic introductory title video (MP4) that runs for 12 seconds and attaches it to the beginning of 4 other MP4 videos (same video but each has a different language audio track)



According to ffmpeg syntax here : http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files the concat demuxer needs to be run from a text file that looks like this :



# this is a comment
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'




I believe everything in my script up until the point of joining the files appears to be working correctly. But I get this error :



[concat @ 04177d00] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\frenchfile.mp4'
filelistFrench.txt: Invalid data found when processing input
[concat @ 03b70a80] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\spanishfile.mp4'
filelistSpanish.txt: Invalid data found when processing input
[concat @ 0211b960] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\basquefile.mp4'
filelistBasque.txt: Invalid data found when processing input
[concat @ 03a20a80] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'
filelistEnglish.txt: Invalid data found when processing input




I believe the issue lies in the text file I'm creating. Please excuse my n00b ignorance, but sometimes new script makers like myself get confused about developer jargon and may take things literally.



So when I look at that example text file they gave, am I correct in thinking THIS is what my text file should look like ?



# this is a comment
Titlefile.mp4 'C:\Users\Joe\1May\session3\readyforfinalconversion\Titlefile.mp4'
Englishfile.mp4 'C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'




Again, am I being too literal ? are the quotations correct ? Are the slashes correct ? In the example they provide the slashes in the path are / instead of normal windows \ . I'll provide the entire script in case it helps.



@echo off

setlocal EnableDelayedExpansion

rem Create an array of languages
set i=0
for %%a in (French Spanish Basque English) do (
 set /A i+=1
 set term[!i!]=%%a
)

rem Get the title video file name from user

set /p titlevideofilename=What is the title video file 

name?

rem create a path variable for the title video file

set pathtotitlevideo=%~dp0%titlevideofilename%

rem Get the names of the different language video files to append to the title video
rem create a path variable for each different language video files

for /L %%i in (1,1,4) do (
 set /p language[%%i]=what is the name of the !term

[%%i]! file you want to append after the title video?
 set pathtofile[%%i]=%~dp0!language[%%i]!
)

rem create data file for ffmpeg based on variable data

for /L %%i in (1,1,4) do (
 echo # this is a comment>>filelist!term[%

%i]!.txt
 echo file '%pathtotitlevideo%'>>filelist!term[%

%i]!.txt
 echo file '!pathtofile[%%i]!'>>filelist!term[%

%i]!.txt
)

cls

rem join files using ffmpeg concat option

for /L %%i in (1,1,4) do (
 c:\ffmpeg\ffmpeg\bin\ffmpeg.exe -loglevel error -f 

concat -i filelist!term[%%i]!.txt -c copy !language[%

%i]!.!term[%%i]!.withtitle.mp4
)

endlocal

:eof
exit




EDIT

Thanks to @foxidrive making me look at the simplicity of it... it occurred to me that Apparently I wasn't being literal enough. I made these 3 changes and script works perfectly now
1 : "file" in there example literally meant the word "file" 
2 : needed the use of single quotes not double quotes as it shows in there example. 
3 : Used "\" instead of "/" as they have in there example.


So NOW my code to create the text files looks like this :



rem create data file for ffmpeg based on variable data

for /L %%i in (1,1,4) do (
 echo # this is a comment>>filelist!term[%

%i]!.txt
 echo file '%pathtotitlevideo%'>>filelist!term[%

%i]!.txt
 echo file '!pathtofile[%%i]!'>>filelist!term[%

%i]!.txt
)




So NOW my text file looks like this :



# this is a comment 
file 'C:\Users\Joe\1May\session3\readyforfinalconversion\Titlefile.mp4'
file 'C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'



-
Anomalie #3462 (Nouveau) : Gestion des documents utilisés dans les rubriques - suppression impossi...
5 juin 2015, par Pascal VerrierBonjour,
Je constate une modification liée à l’utilisation de documents/images au sein du texte explicatif d’une rubrique.
Dans SPIP 2.1.27 l’édition de rubrique permet l’ajout de documents (bloc Ajouter une image à gauche), cette fonctionnalité a apparemment été supprimée dans la 3.0.19.Cela n’interdit pas de saisir des codes type
(correspondant à des éléments de la médiathèque chargés auparavant) dans le texte de description de la rubrique, ce qui permet d’utiliser ces contenus dans la présentation d’une rubrique : ils sont bien affichés, mais contrairement à ce qui se passait sur les versions précédentes, on n’a pas en bas de page rubrique du backoffice (exec=naviguer&id_rubrique=N) le rappel des documents liés, or en regardant dans la médiathèque on peut constater que le lien a bien été réalisé (lors de l’enregistrement) entre les documents utilisés et la rubrique.
Cela se complique lorsque l’on décide de supprimer une rubrique utilisant, ou ayant utilisé des documents.
Si je reprends ma rubrique, j’en supprime ou déplace tous les articles, j’en supprime le contenu texte, je n’obtiens jamais le bouton "Supprimer cette rubrique". En fait les documents utilisés y sont liés et tant que ces liens existent la suppression est impossible. C’est le même comportement que sur les versions précédentes* à cela près que l’absence de la liste des documents liés (normalement affichés en bas de page, ou à gauche en édition) n’aide pas vraiment à comprendre pourquoi cette rubrique ne peut être supprimée. Seul indice, sous l’identifiant de rubrique est indiqué "N documents". Autre curiosité la rubrique est d’office considérée comme active, et elle apparaît sur l’espace public, même si elle ne contient aucun article. C’est ainsi que l’on se retrouve avec une rubrique vide, impossible à supprimer, et affichée dans les menus de l’espace public.
En supprimant manuellement les liens document/rubrique depuis la médiathèque le lien "Supprimer cette rubrique" réapparaît.
(* : je ne suis pas certain par ailleurs que le fait de ne pas pouvoir supprimer une rubrique à laquelle des documents sont liés soit réellement justifié)
Ce choix de supprimer l’ajout de documents dans l’édition de rubriques est-il intentionnel ? Pourrait-on retrouver le mécanisme existant dans les articles et dans SPIP 2.1 ?
Serait-il envisageable de pouvoir supprimer directement une rubrique vide sans avoir à se préoccuper de l’existence de ces liens avec les documents ?
Merci.