Recherche avancée

Médias (91)

Autres articles (105)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

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

  • Cannot open RTMP stream with FFMPEG Java Cannot assign requested address

    12 novembre 2023, par lastpeony4

    I am trying to open an RTMP stream with avformat_open_input and for some reason i keep getting Cannot assign requested address error.
    
My RTMP URL is correct because i can watch the stream using VLC Player and ffmpeg command line :
    
ffmpeg -i rtmp://1.1.1.1/app/teststream -vcodec copy -acodec copy output.mp4

    


    int timeout = 2500;
setConnectionTimeout(timeout);

AVDictionary optionsDictionary = new AVDictionary();

String timeoutStr = String.valueOf(this.timeoutMicroSeconds);
av_dict_set(optionsDictionary, "timeout", timeoutStr, 0);

int analyzeDurationUs = 1500 * 1000;
String analyzeDuration = String.valueOf(analyzeDurationUs);
av_dict_set(optionsDictionary, "analyzeduration", analyzeDuration, 0);

int ret;

if ((ret = avformat_open_input(inputFormatContext, streamUrl, null, optionsDictionary)) < 0) {
  // ERROR Cannot assign requested address
}


    


    I am using org.bytedeco:ffmpeg:5.1.2-1.5.8 (ffmpeg-5.1.2-1.5.8.jar)

    


    Why i can't open it ?

    


  • Sending big packets gets Bad Address error

    30 mars 2012, par Roi

    Im writing a live webcam stream using ffmpeg and sdl on C.
    my platform is linux.

    my application is a client server based.
    The client is reading from the webcam, produce an AVPacket, then send to server.

    My problem is, that the AVPacket struct has a member named data which is approximately 600k.
    At first, i had not checked the send() return value,
    So, of course the packet had failed to send completely.

    But after I checked, the send() returns Bad Address error at the second iteration of the big packet.
    the length of the data packet must be correct because is supplied from the AVPacket struct.

    It sends 2 members of the AVPacket before, so the server is up and functional.

    The problematic section :

       int send_video_data(video_client_t *client, void* buf, int length)
       {
           int rc;

           while (length > 0)
           {
              if ((rc = send(client->sockfd, buf, length, 0)) == -1) {
                        perror("failed sending data to server");
                        exit(1);
               }

               length-=rc;
               buf+=rc;
           }

           return 0;

       }

    Any one got any ideas why it's not working ?
    Thanks in advanced !

  • Can't upload folder with large amount of files to google storage. I using "@ffmpeg-installer/ffmpeg" and @google-cloud/storage

    20 juillet 2022, par Dmytro

    I upload file to google storage using "@ffmpeg-installer/ffmpeg" and @google-cloud/storage in my node.js App.
Step 1. file uploading to fs is in child processes - one process for each type of resolution (totaly six).
step 2. encription (converting to stream)
step 3. upload to google storage

    


    I use "Upload a directory to a bucket" in order to send the video from the client to the Google Cloud Storage bucket.

    


    This way is working fine only with small video.

    


    for example when I upload video with duration one hour it split on chunk and totally I get more three thousands files. But the problem occurs when there are more than 1500 files

    


    So actually i upload folder with large amount of files, but not all of this files are uploaded to cloud.

    


    maybe someone had the similar problem and helps fix it.

    


    

    

    const uploadFolder = async (bucketName, directoryPath, socketInstance) => {
    try {
      let dirCtr = 1;
      let itemCtr = 0;
      const fileList = [];

      const onComplete = async () => {
        const folderName = nanoid(46);

        await Promise.all(
          fileList.map(filePath => {
            const fileName = path.relative(directoryPath, filePath);
            const destination = `${ folderName }/${ fileName }`;

            return storage
              .bucket(bucketName)
              .upload(filePath, { destination })
              .then(
                uploadResp => ({ fileName: destination, status: uploadResp[0] }),
                err => ({ fileName: destination, response: err })
              );
          })
        );

        if (socketInstance) socketInstance.emit('uploadProgress', {
          message: `Added files to Google bucket`,
          last: false,
          part: false
        });

        return folderName;
      };

      const getFiles = async directory => {
        const items = await fs.readdir(directory);
        dirCtr--;
        itemCtr += items.length;
        for(const item of items) {
          const fullPath = path.join(directory, item);
          const stat = await fs.stat(fullPath);
          itemCtr--;
          if (stat.isFile()) {
            fileList.push(fullPath);
          } else if (stat.isDirectory()) {
            dirCtr++;
            await getFiles(fullPath);
          }
        }
      }

      await getFiles(directoryPath);

      return onComplete();
    } catch (e) {
      log.error(e.message);
      throw new Error('Can\'t store folder.');
    }
  };