Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (53)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • 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

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (7871)

  • 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

    


  • checkasm/vf_eq : add test for vf_eq

    18 septembre 2019, par Ting Fu
    checkasm/vf_eq : add test for vf_eq
    

    Signed-off-by : Ting Fu <ting.fu@intel.com>
    Signed-off-by : Ruiling Song <ruiling.song@intel.com>

    • [DH] libavfilter/vf_eq.c
    • [DH] libavfilter/vf_eq.h
    • [DH] tests/checkasm/Makefile
    • [DH] tests/checkasm/checkasm.c
    • [DH] tests/checkasm/checkasm.h
    • [DH] tests/checkasm/vf_eq.c
    • [DH] tests/fate/checkasm.mak
  • ffmpeg 'error parsing the packet header' when concatenating mp3 files

    27 décembre 2020, par Dtomper

    I downloaded many songs from youtube and mixed them using this command : ffmpeg -f concat -safe 0 -i mylist.txt -map 0:a mixed.mp3 where mylist.txt is a list of all the downloaded files.&#xA;During the exportation I kept getting the following error :

    &#xA;

    [opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[opus @ 0000022f1bea3700] Error parsing the packet header.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;

    &#xA;

    After the mix was exported, I heard it and there was a weird sound playing when it was the turn of this song : https://www.youtube.com/watch?v=iY0RwKIG_BQ

    &#xA;

    At first, I used youtube-dl to download the song from python. After that, I used https://ytmp3.cc/ but none of them worked. I keep getting this error and that weird sound in the mix file.

    &#xA;