Recherche avancée

Médias (91)

Autres articles (93)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP 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 (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (7805)

  • Cannot stream video from VLC docker

    4 avril 2023, par Snake Eyes

    I have Dockerfile :

    


    FROM fedora:34

ARG VLC_UID="1000"
ARG VLC_GID="1000"

ENV HOME="/data"


RUN groupadd -g "${VLC_GID}" vlc && \
    useradd -m -d /data -s /bin/sh -u "${VLC_UID}" -g "${VLC_GID}" vlc && \
    dnf upgrade -y && \
    rpm -ivh "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-34.noarch.rpm" && \
    dnf upgrade -y && \
    dnf install -y vlc && \
    dnf install -y libaacs libbdplus && \
    dnf install -y libbluray-bdj && \
    dnf clean all

USER "vlc"

WORKDIR "/data"

VOLUME ["/data"]

ENTRYPOINT ["/usr/bin/cvlc"]


    


    And then run :

    


    docker run -d -v "d:\path":/data -p 8787:8787 myrepo/myvlc:v1 file:///data/Sample.mkv --sout '#transcode {vcodec=h264,acodec=mp3,samplerate=44100}:std{access=http,mux=ffmpeg{mux=flv},dst=0.0.0.0:8787/stream.flv}'


    


    I get error :

    


    2023-04-04 12:19:11 [000055933c090060] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
2023-04-04 12:19:11 [000055933c09d680] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
2023-04-04 12:19:11 [000055933c09d680] main interface error: no suitable interface module
2023-04-04 12:19:11 [000055933bf26ad0] main libvlc error: interface "dbus,none" initialization failed
2023-04-04 12:19:11 [000055933c08d7a0] main interface error: no suitable interface module
2023-04-04 12:19:11 [000055933bf26ad0] main libvlc error: interface "globalhotkeys,none" initialization failed
2023-04-04 12:19:11 [000055933c08d7a0] dummy interface: using the dummy interface module...
2023-04-04 12:19:11 [00007f3b84001250] stream_out_standard stream out error: no mux specified or found by extension
2023-04-04 12:19:11 [00007f3b84000f30] main stream output error: stream chain failed for `standard{mux="",access="",dst="'#transcode"}'
2023-04-04 12:19:11 [00007f3b90000c80] main input error: cannot start stream output instance, aborting
2023-04-04 12:19:11 [00007f3b7c001990] stream_out_standard stream out error: no mux specified or found by extension
2023-04-04 12:19:11 [00007f3b7c001690] main stream output error: stream chain failed for `standard{mux="",access="",dst="'#transcode"}'
2023-04-04 12:19:11 [00007f3b90000c80] main input error: cannot start stream output instance, aborting


    


    I mention that I'm using cvlc and I can't stream that mkv file.

    


    I tried as well --sout '#transcode{scodec=none}:http{mux=ffmpeg{mux=flv},dst=:8787/}' but same errors.

    


    How can I solve it ?

    


  • OpenCV is able to read the stream but VLC not

    25 avril 2023, par Ahmet Çavdar

    I'm trying to stream my webcam frames to an UDP address. Here is my sender code.

    


    cmd = ['ffmpeg', '-y', '-f', 'rawvideo', '-pixel_format', 'bgr24', '-video_size', f'{width}x{height}', 
       '-i', '-', '-c:v', 'mpeg4','-preset', 'ultrafast', '-tune', 'zerolatency','-b:v', '1.5M',
       '-f', 'mpegts', f'udp://@{ip_address}:{port}']
p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
camera = cv2.VideoCapture(0)
while True:
    ret, frame = camera.read()
    cv2.imshow("Sender",frame)
    if not ret:
        break
    p.stdin.write(frame.tobytes())
    p.stdin.flush()
    if cv2.waitKey(1) & 0xFF == ord('q'):
            break


    


    This Python code can make stream successfully. I can read the stream with this receiver code.

    


    q = queue.Queue()
def receive():
    cap = cv2.VideoCapture('udp://@xxx.x.xxx.xxx:5000')
    ret, frame = cap.read()
    q.put(frame)
    while ret:
        ret, frame = cap.read()
        q.put(frame)
def display():
    while True:
        if q.empty() != True:
            frame = q.get()
            cv2.imshow('Receiver', frame)
        k = cv2.waitKey(1) & 0xff
        if k == 27:  # press 'ESC' to quit
            break
tr = threading.Thread(target=receive, daemon=True)
td = threading.Thread(target=display)
tr.start()
td.start()
td.join()


    


    But I can not watch the stream from VLC. I'm going to Media->Open Network Stream->
udp ://@xxx.x.xxx.xxx:5000 to watch stream. After some seconds, the timer that located bottom left of VLC starts to increase but there are no frames in screen, just VLC icon.

    


    I checked firewall rules, opened all ports to UDP connections. I am using my IP address to send frames and watch them.
Also, I tried other video codecs like h264, hvec, mpeg4, rawvideo.
Additionally, I tried to watch stream by using Windows Media Player but it didn't work.

    


    What should I do to fix this issue ?

    


  • threading with open cv and FFMPEG

    3 février 2023, par share2020 uis

    I'm working on a project which get several CCTV streams and preform some processing with OpenCV. Then I want to get those streams back with rtmp/rtsp protocols.

    


    I can use openCV with threading in python and preform my processing and return in scale of 4 frames from each stream sequentially.
Is there any way to use this python library and FFMPEG to send each stream to corresponding rtmp/rtsp with FFMPG ?

    


    `class LoadStreams:  # multiple IP or RTSP cameras
  def __init__(self, sources='streams.txt', img_size =(1290,720)):
      self.mode = 'images'
      self.img_size = img_size


      if os.path.isfile(sources):
          with open(sources, 'r') as f:
              sources = [x.strip() for x in f.read().splitlines() if len(x.strip())]
      else:
          sources = [sources]

      n = len(sources)
      self.imgs = [None] * n
      self.sources = sources
      for i, s in enumerate(sources):
          cap = cv2.VideoCapture(eval(s) if s.isnumeric() else s)
          assert cap.isOpened(), 'Failed to open %s' % s
          w = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
          h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
          self.fps = cap.get(cv2.CAP_PROP_FPS) % 100
          _, self.imgs[i] = cap.read()  # guarantee first frame
          thread = Thread(target=self.update, args=([i, cap]), daemon=True)
          print(' success (%gx%g at %.2f FPS).' % (w, h, self.fps))
          thread.start()


  def update(self, index, cap):
      n = 0
      while cap.isOpened():
          n += 1
          # _, self.imgs[index] = cap.read()
          cap.grab()
          if n == 4:  # read every 4th frame
              _, self.imgs[index] = cap.retrieve()
              n = 0
          time.sleep(0.01)  # wait time

  def __iter__(self):
      self.count = -1
      return self

  def __next__(self):
      self.count += 1
      img0 = self.imgs.copy()
      if cv2.waitKey(1) == ord('q'):  # q to quit
          cv2.destroyAllWindows()
          raise StopIteration`


    


    enter image description here

    


    Being able to use ffmpeg for n frames from A_in streaming to A_out url and get n from B_in url stream to B_out url.