
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (35)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...) -
Les thèmes de MediaSpip
4 juin 20133 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
Thèmes MediaSPIP
3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)
Sur d’autres sites (4027)
-
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 ?

-
Pims.open Throws "UnkownFormat Error" with "Invalid Argument" On One Machine But Not on Another
12 août 2021, par KaceBellamyI'm trying to do some video processing for a physics experiment, and I want to do it on my much more powerful Windows desktop computer as opposed to my Mac laptop.


The following code works like a dream when run as a Jupyter notebook on my Mac :


import matplotlib as mpl
from mpl_toolkits import mplot3d
import pims
import trackpy as tp 

@pims.pipeline
def gray(image):
 return image[:, :, 1] # Take just the green channel

frames = gray(pims.open('output.mp4'))



but on my Windows machine I get this error :


---------------------------------------------------------------------------
UnknownFormatError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_12152/704954007.py in <module>
 1 #Actually converts the video. Might be VERY processor intensive... or not?
----> 2 frames = gray(pims.open('output.mp4')) #Make the File Name whatever file you like!

~\miniconda3\lib\site-packages\pims\api.py in open(sequence, **kwargs)
 207 warn(message)
 208 exceptions += message + '\n'
--> 209 raise UnknownFormatError("All handlers returned exceptions:\n" + exceptions)
 210 
 211 

UnknownFormatError: All handlers returned exceptions:
<class> errored: [Errno 22] Invalid argument: 'output.mp4'
<class> errored: [Errno 22] Invalid argument: 'output.mp4'
<class> errored: Could not load meta information
=== stderr ===

ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
C:\Users\Callum\OneDrive - The University of Chicago\output.mp4: Invalid argument
<class> errored: MoviePy error: failed to read the duration of file output.mp4.
Here are the file infos returned by ffmpeg:

ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
output.mp4: Invalid argument
</class></class></class></class></module>


output.mp4 is just a run of the mill video file taken on a CCD camera ; I've tried converting it to a .MOV, I've tried other video files taken on different cameras, and I've tried running the file through FFmpeg to impose a 30 fps framerate ; everything I've tried works fine on my Mac and throws the above error on my Windows machine.


For reference, I installed necessary packages for this code on both machines this morning, so it should all be up to date and the same on both.


Any ideas as to what's up ? Thanks !


-
FFMPEG and FFPlay can access rtsp stream from one ip, but from other ip, it can't
28 mai 2022, par CrearThe situation is kind of complex. I was archiving several CCTV camera feeds (rtsp, h264, no audio) through OpenCV, which worked but the CPU utilization was too high and started to lose some frames time by time.


To reduce the CPU utilization, I started to use FFMPEG to skip the decoding and encoding processes, which worked perfectly on my home machine. However, when I connected to my university VPN and tried to deploy it on our lab server, FFmpeg couldn't read any frame, ffplay couldn't get anything either. However, OpenCV, VLC Player and IINA Player could still read and display the feed.


In Summary,


1 FFMPEG/ffplay


1.1 can only read the feed from my home network(Wi-Fi, optimum)


1.2 from other two networks, the error message says : "Could not find codec parameters for stream 0 (Video : h264, none) : unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options"


2 IINA/VLC Player, OpenCV
These tools can get the video all the time.


I'm wondering whether it's related to some specific port access, that the ffmpeg required but the others don't. I'd appreciate it if anyone can provide any suggestions.


As references, the tested ffplay command is simple :


ffplay 'the rtsp address'



Thanks



Update


More tests have been performed.


By specifying rtsp_transport as TCP, ffplay can play the video, but FFmpeg can't access the video. (In the beginning, when both FFmpeg and ffplay worked through my home network, it was UDP)
The FFmpeg command is as follows :


ffmpeg -i rtsp://the_ip_address/axis-media/media.amp -hide_banner -c:v copy -s 1920x1080 -segment_time 00:30:00 -f segment -strftime 1 -reset_timestamps 1 -rtsp_transport tcp "%Y-%m-%d-%H-%M-%S_Test.mp4"



Please help...