Recherche avancée

Médias (91)

Autres articles (55)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (6691)

  • expected str, bytes or os.PathLike object, not NoneType for subprocess of ffmpeg

    15 janvier 2024, par ejmin ejoni

    I dont know much about ffmpeg, subprocess and its functions, im trying to take a screenshot form a video and save it at my other field of my model.
this is my model :

    


    class SubSong(models.Model):
song = models.ForeignKey(SongPage, on_delete=models.CASCADE, related_name='related_song')
create = jmodels.jDateField(auto_now_add=True)
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='related_user')
video = models.FileField(upload_to='sub_video/',)
like = models.ManyToManyField(User, blank=True, )
total_like = models.PositiveIntegerField(default=0)
is_allowed = models.BooleanField(default=False)
image_sub = ThumbImage(upload_to='sub_songs/', default='1.jpg')

def __str__(self):
    return self.song.title


    


    and views.py

    


        if request.method == 'POST':
    authen(request)
    form = MyTryForm(request.POST, request.FILES)
    if form.is_valid():
        data = form.cleaned_data
        x = SubSong.objects.create(song_id=id,
                                   user_id=request.user.id,
                                   video=data['video'], )
        path = x.video.name
        out = path.replace('sub_video/', '').replace('mp4', 'jpg')
        z=subprocess.check_output(
            ffmpeg.input('media/' + path, ss='00:00:50').filter(
                'thumbnail').output('media/sub_songs/' + out, vframes=1).run(), text=True)
        x.image_sub=z
        x.save()
        messages.success(request, 'ویدیوی شما با موفقیت ارسال شد ، پس از بررسی منتشر خواهد شد')
        return redirect(request.META.get('HTTP_REFERER'))

    else:
        messages.error(request, 'ویدیوی شما بارگداری نشد')
        return redirect(request.META.get('HTTP_REFERER'))


    


    it can save the video and also default picture 1.jpg at image_sub. also it can save scrrenshot at the media/sub_song/.but my problem is that it gives me error :
expected str, bytes or os.PathLike object, not NoneType
how i should return the screen from subprocess to save it as my image_sub field ? and why do this error raise ? i dont want to see this error again

    


  • avformat/tls : fix {} error for the GNUTLS case

    27 septembre 2013, par Michael Niedermayer
    avformat/tls : fix {} error for the GNUTLS case
    

    Found-by :" Geek.Song" <ffmpeg@gmail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavformat/tls.c
  • Discord Music bot dosnt play Livestreams anymore

    11 janvier 2019, par Silvinator

    My Discord bot played YT Livestreams all the time, but it stoped working today. The only message i get (in the console) is stream. It plays normal videos, but no streams. the question is, why it stopped working. I did not change any code. Anyone got a idea ?

    client.on("message", async message => {
       var args = message.content.substring(prefix.length).split(" ");
       if (!message.content.startsWith(prefix)) return;
     var searchString = args.slice(1).join(' ');
            var url = args[1] ? args[1].replace(/&lt;(.+)>/g, '$1') : '';
            var serverQueue = queue.get(message.guild.id);
       switch (args[0].toLowerCase()) {
         case "play":
       var voiceChannel = message.member.voiceChannel;
                    if (!voiceChannel) return message.channel.send(`Du willst mit mir Karaoke singen? Da ich eh nichts besseres zu tun habe. Du suchst aber den Voice Channel aus!`);
                    var permissions = voiceChannel.permissionsFor(message.client.user);
                    if (!permissions.has('CONNECT')) {
                            return message.channel.send('I cannot connect to your voice channel, make sure I have the proper permissions!');
                    }
                    if (!permissions.has('SPEAK')) {
                            return message.channel.send('I cannot speak in this voice channel, make sure I have the proper permissions!');
                    }
         if (url.match(/^https?:\/\/(www.youtube.com|youtube.com)\/playlist(.*)$/)) {
                            var playlist = await youtube.getPlaylist(url);
                            var videos = await playlist.getVideos();
                            for (const video of Object.values(videos)) {
                                    var video2 = await youtube.getVideoByID(video.id); // eslint-disable-line no-await-in-loop
                                    await handleVideo(video2, message, voiceChannel, true); // eslint-disable-line no-await-in-loop
                            }
                            return message.channel.send(`Ich habe wohl keine andere wahl... Ich habe **${playlist.title}** der playlist zugefügt`);
                    } else {
                            try {
                                    var video = await youtube.getVideo(url);
                            } catch (error) {
                                    try {
                                            var videos = await youtube.searchVideos(searchString, 10);
                                            var index = 0;
                                            var videoIndex = 1;
                                            var video = await youtube.getVideoByID(videos[videoIndex - 1].id);
                                    } catch (err) {
                                            console.error(err);
                                            return message.channel.send('Gibt es den Song überhaupt?');
                                    }
                            }
                            return handleVideo(video, message, voiceChannel);
                    }
    break;
         case "skip":
                    if (!message.member.voiceChannel) return message.channel.send('Du musst schon in den Voice Channel gehen, baka!');
                    if (!serverQueue) return message.channel.send('Du musst schon ein song auswählen, baka!');
                    serverQueue.connection.dispatcher.end('Skip command has been used!');
                    return undefined;
           break;
         case "stop":
                    if (!message.member.voiceChannel) return message.channel.send('Du musst schon in den Voice Channel gehen, baka!');
                    if (!serverQueue) return message.channel.send('Du musst schon einen Song auswählen, baka');
       serverQueue.connection.dispatcher.end('Stop command has been used!');
                    serverQueue.songs = [];
                    return undefined;
    break;
         case "minfo":
                    if (!serverQueue) return message.channel.send('Ich spiele immer noch nichts!');
                    return message.channel.send(`ퟎ