
Recherche avancée
Autres articles (28)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
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 (...)
Sur d’autres sites (6714)
-
Multiple streams with ffmpeg and python opencv
27 janvier 2023, par share2020 uisI need to run multiple streams from python open cv to rtmp/rtsp with FFMPG. Now I can see two streams are going via ffmpeg (in console the information are mixed). In destinations the first stream is empty while second stream plays correctly (first stream metedata is reaching to destination).


Multiple stream semaratly in destination.


## st.txt = 'rtsp://ip:port/source/1' & 'rtsp://ip:port/source/2'
from multiprocessing.pool import ThreadPool
import cv2
import random
import subprocess

def f(x):
 name = (x.split('/'))[-1]
 y=30
 if len(x)==1:
 x = int(x)

 cam = cv2.VideoCapture(x)
 width = cam.get(cv2.CAP_PROP_FRAME_WIDTH)
 height = cam.get(cv2.CAP_PROP_FRAME_HEIGHT)
 fps = cam.get(cv2.CAP_PROP_FPS)
 def streamer():
 command = ['ffmpeg',
 '-r', str(fps ),
 '-y',
 '-f', 'rawvideo',

 '-pix_fmt', 'bgr24',
 '-s', "{}x{}".format(int(width),int(height)),
 '-i', '-',
 '-c:v', 'libx264',
 '-pix_fmt', 'yuv420p',
 '-preset', 'fast',
 '-bufsize','7000k',
 '-flvflags', 'no_duration_filesize', 
 '-g','180',
 '-f', 'flv',
 'rtmp://ip:port/live/'+ str(name)] 
 return command 
 p_stream = subprocess.Popen(streamer() , stdin=subprocess.PIPE)


 while cam.isOpened():
 ret, frame = cam.read()
 if not ret:
 break
 cv2.imshow(str(name),frame)
 p_stream.stdin.write(frame.tobytes()) 
 key = cv2.waitKey(1)
 
 if key == ('w'):
 cam.release()
 cv2.destroyAllWindows()
 break

 





def ls():
 with open(r'st.txt') as f:
 lns = [line.rstrip('\n') for line in f] 
 return lns


if __name__ == '__main__':
 
 pool = ThreadPool()
 results = pool.map(f, ls())



-
avconv_vaapi : fix double-free with some unsupported streams
9 mai 2016, par Mark Thompson -
avformat/utils : avoid discarded streams in av_find_default_stream_index()
6 avril 2015, par Michael Niedermayer