Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (44)

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Support audio et vidéo HTML5

    10 avril 2011

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

  • I am experiencing unsync between audio and video in my Janus stream originating from ffmpeg

    10 septembre 2019, par Alexander Novikov

    I am using Janus Gateway to stream a video taken from the video file and encoded by ffmpeg. The goal of the project is much more complicated but i tried to reduce it to the minimum possible to help troubleshooting.

    encoding is done this way :

    ffmpeg -re -thread_queue_size 4 -stream_loop -1 -i \
    /root/syncTest.mkv -c:v libvpx -vf scale="-1:360" -minrate 400k \
    -maxrate 600k -b:v 500k -an -deadline realtime -f rtp \
    rtp://127.0.0.1:5004?pkt_size=1200 -vn -ar 48000 -ac 2 -c:a libopus \
    -f rtp rtp://127.0.0.1:5002?pkt_size=1200

    I am using Streaming plugin and stream appears to be configured with no tricks :

    stream-1 :
    {
     type = "rtp";
     id = "1";
     description = "stream-1";
     audio = "yes";
     audioport = "5002";
     audiopt = "111";
     audiortpmap = "opus/48000/2";
     video = "yes";
     videoport = "5004";
     videopt = "100";
     videortpmap = "VP8/90000";
     data = "no";
     secret = "adminpwd";
    };

    Here are the links to my streaming plugin and Janus configs - i tried to play a bit with nack queue length and dtls timeout parameters but to no avail, they don’t change anything.

    https://codeda.com/data/janus.jcfg.txt
    https://codeda.com/data/janus.plugin.streaming.jcfg.txt

    Resulting video (screen capture of a WebRTC player page) is here : https://codeda.com/data/janusSyncIssue.mp4 - as you can see, there is a considerable unsync between video and audio.

    As i see it, the problem is that the video stream and audio stream are sent separately and either do not contain timecodes, or they are for some reason ignored. Obviously encoding video and encoding audio takes different time, more for video, so that results in a delayed video.

    Am i right suspecting this ? If so, how can i fix this ? I imagine there is some ffmpeg setting or Janus streaming plugin setting for that.

    Ah yes, processor is almost free, 80-85% free, on that server. Not a processor issue for sure.

  • Trouble downloading files in Dropbox Python API v2

    16 août 2019, par jack

    I’m trying to download .mov files from Dropbox, manipulate them with ffmpeg, and upload back to Dropbox, but I’m getting an error when I use the files_download method.

    I’m able to read files from Dropbox without any problem using dbx.files_list_folder

    When trying to download files, I’ve used the following :

    import dropbox
    access_token = 'MY TOKEN'
    dbx = dropbox.Dropbox(access_token)
    metadata,file=dbx.files_download('path to .mov file')

    and I get the error

    SSLError: HTTPSConnectionPool(host='content.dropboxapi.com', port=443): Max retries exceeded with url: /2/files/download (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

    I don’t know if this is a cause, but I didn’t use the Dropbox app key or app secret in setting things up. In going through the API v2 setup, it looked like all you need is the API Access token, but I’m wondering if there’s a permissions error.

    I’ll only be using this app for myself—it’s not meant for production.

  • Launch command from controller avoid loading page

    28 juin 2019, par JoakDA

    When I launch a command from a Symfony controller, the command is executed but the GET request does not finish.

    My command launchs a node.js script that receive rtsp frames transcoded from ffmpeg and broadcast it to a websocket.

    This is a Debian 9 server, running Symfony 4, PHP 7.3.5 and Apache2.

    This is my controller show action that calls the command :

       /**
        * Render view to show device details.
        * @param Request $request
        * @param $deviceid
        * @return Response
        * @Route("devices/show/{deviceid}", name="device_show", methods={"GET"})
        * @IsGranted("ROLE_OPERATOR")
        */
       public function showAction(Request $request, $deviceid)
       {
       try{
           //Find device to show from system
           $deviceToShow = $this->repository->find($deviceid);

           if ($deviceToShow) {
               $this->logger->debug('Show device: . Device has been found. Delete it... Data: ' . $deviceToShow->__toString());

               //Launch video streaming commands
               $command = new VideoServerCommand($this->entityManager, $this->logger, $this->getParameter('kernel.project_dir'));
               $input = new ArrayInput(array(
                   'secret' => str_replace(' ', '', $deviceToShow->getName()),
                   'http_port' => 8002,
                   'ws_port' => 8005
               ));
               $output = new BufferedOutput();
               $resultCode  = $command->run($input, $output);

               $content = $output->fetch();

               if ($resultCode === 0){
                   $this->logger->info('Call Video Server Command: Ok. Video Server started successfully. Console output: ' . $content);
               }else{
                   $this->logger->error('Call Video Server Command: Ko. Could not start video server. Console output: ' . $content);
               }

           }else{
               $message = $this->translator->trans('Device with identifier %deviceid% was not found.',
                   ['%deviceid%' => $deviceid]);

               $this->addFlash('error', $message);

               $this->logger->error('Show device: Ko. Device with identifier ' . $deviceid . ' was not found.');
           }
       }catch (Exception $exception) {
           $message = $this->translator->trans('Error while executing action. Error detail: %detail%.',
               ['%detail%' => $exception->getMessage()]);

           $this->addFlash(
               'error', $message
           );

           $this->logger->critical('Show device: Ko. Exception catched. Error detail: ' . $exception->getMessage());
       }

       $host = explode(':', $request->getUri());

       return $this->render('device/show.html.twig', array(
           'baseurl' => $host[1],
           'secret' => str_replace(' ', '', $deviceToShow->getName()),
           'device' => $deviceToShow,
       ));
       }

    And this is my command code that runs the node.js script

    protected function execute(InputInterface $input, OutputInterface $output)
       {
           try {
               $this->logger->info('Start web socket: Setup websocket server...');
               $this->io = new SymfonyStyle($input, $output);
               $now = new \DateTime();
               $this->io->title('Start websocket server ' . $now->format('d-m-Y G:i:s') . '...');

               //Get input parameters
               $secret = $input->getArgument('secret');
               $tcpPort = $input->getArgument('http_port');
               $wsPort = $input->getArgument('ws_port');

               $output->writeln([
                   'Video Server',// A line
                   '============',// Another line
                   'Starting Video Reception Socket...',// Empty line
               ]);

               //Call node websocket-relay.js
               $command = 'node ' . $this->path . '/assets/js/websocket-relay.js ' . $secret . ' ' . $tcpPort . ' ' . $wsPort;
               //Only want to execute for 60 seconds
               $nodeVideoRelay = new Process(exec($command));
               $nodeVideoRelay->setTimeout(60);
               $nodeVideoRelay->setIdleTimeout(60);

               try {
                   $nodeVideoRelay->run();

                   $this->logger->info('Start video streaming: OK. Video streaming successfully started...');
                   $this->io->success('Start video streaming: OK. Video streaming successfully started...');
                   $this->io->writeln($nodeVideoRelay->getOutput());
               } catch (ProcessTimedOutException $timedOutException) {
                   $nodeVideoRelay->stop(3, SIGINT);
                   $this->io->success('Start video streaming: Ok. Streaming finished.');
               }
               //}
           } catch (Exception $exception) {
               $this->logger->critical('Start video streaming: Ko. Exception catched. Error detail: ' . $exception->getMessage());
               $this->io->error('Start video streaming: Ko. Exception catched. Error detail: ' . $exception->getMessage());
           }
       }

    And the "websocket-relay.js" is an script got from https://github.com/phoboslab/jsmpeg/blob/master/websocket-relay.js

    The result is that the page is not loading. I have another command that process the RTSP stream using ffmpeg and send the date to a websocket.

    On the page that returns my controller action, it appears a canvas where the video will be rendered.

    I want to render the page as soon as possible and that the node.js script runs on background without blocking the main process.

    Thank you for helping me.