
Recherche avancée
Autres articles (43)
-
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (4872)
-
ffmpeg 'error parsing the packet header' when concatenating mp3 files
27 décembre 2020, par DtomperI 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.
During the exportation I kept getting the following error :

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



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


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.

-
checkasm/vf_eq : add test for vf_eq
18 septembre 2019, par Ting Fucheckasm/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> -
expected str, bytes or os.PathLike object, not NoneType for subprocess of ffmpeg
15 janvier 2024, par ejmin ejoniI 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