
Recherche avancée
Autres articles (98)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP 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 (...)
Sur d’autres sites (8270)
-
DirectShow Encryption and Decryption Filters incorrect path leading to wrong decoding ?
11 mai 2016, par Michael Chi LamSituation : I’m creating two DirectShow Filters cryptography. I’ve written them as In place transformations however it’s not working as planned, I believe it has something to do my encoding and decoding paths. My source is an AVI and my output a encrypted MP4. (Encryption Filter) for my decryption filter I take in a mp4 and render the video. However when I attempt to render the video, the play back is a black screen.
AVI to MP4 on GraphStudioNext :
Both of them works, however when I insert my Cryptography(This is the encryption, I got lazy and didn’t rename it properly) and Decryption filter respectively it doesn’t work
I placed my Encrypt and Decrypt side by side (See below) and it generates an mp4 that I can play back.
Question : Is there a filter I am missing on the decoding path ? (Mp4 to Render)
-
Encoded Video's path gets changed in database after encoding with ffmpeg and celery and works as normal without celery
16 novembre 2020, par DannyI have this code to transcode video and it works well without celery. With celery, the path of the file in the database shows a different path and the video cannot be played in the browser, but it saves the file in the correct location in the pc.


If I don't use celery, then the file path in database is
media/videos/videos/<filename>.mp4</filename>
and file also gets saved here. This way the template is able to play the video. But if I use celery, the output gets saved inmedia/videos/videos/<filename>.mp4</filename>
but the path in database will bemedia/<filename>.mp4</filename>
somehow and thus template can't play the video.

Is it because my page gets updated before the task ? and not getting saved properly ?


views.py


def post(self, *args, **kwargs):
 form = VideoPostForm(self.request.POST or None, self.request.FILES or None)
 if form.is_valid():
 video = form.save(commit=False)
 video.user = self.request.user
 video.save()
 form.save_m2m()
 # task_video_encoding(video.id)
 task_video_encoding.delay(video.id)
 return redirect('videos:my_video_home')
 else:
 raise ValidationError('Check all form fields.')



encoding.py


def encode_video(video_id):
 video = VideoPost.objects.get(id = video_id)
 input_file_path = video.temp_file.path
 # print(input_file_path)
 input_file_name = video.title
 #get the filename (without extension)
 filename = os.path.basename(input_file_path)
 # print(filename)
 # path to the new file, change it according to where you want to put it
 output_file_name = os.path.join('{}.mp4'.format(filename))
 # print(output_file_name)
 # output_file_path = os.path.join(settings.MEDIA_ROOT, output_file_name)
 output_file_path = os.path.join(settings.MEDIA_ROOT, 'videos', 'videos', output_file_name)
 # print(output_file_path)

 for i in range(1):
 subprocess.call([settings.VIDEO_ENCODING_FFMPEG_PATH, '-i', input_file_path, '-codec:v', 'libx264', '-crf', '-preset',
 '-b:v', '3000k', '-maxrate', '-bufsize', '6000k', '-vf', 'scale=-2:720',
 '-codec:a', 'aac', '128k', '-strict', '-2', output_file_path])
 # Save the new file in the database
 video.file = output_file_name
 video.save(update_fields=['file'])
 print(video.file)
 video.temp_file.delete()



models


class VideoPost(models.Model):
 user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, blank=True, null=True)
 title = models.TextField(max_length=1000)
 temp_file = models.FileField(upload_to='videos/temp_videos/', validators=[validate_file_extension], null=True)
 file = models.FileField(upload_to='videos/videos/', validators=[validate_file_extension], blank=True, max_length=255)
 post_date = models.DateTimeField(auto_now_add=True, verbose_name="Date Posted")
 updated = models.DateTimeField(auto_now_add=True, verbose_name="Date Updated")
 slug = models.SlugField(blank=True, unique=True, max_length=255)



Can anyone help me how to change this code in a way to show the converted video properly in the template.


-
mpegaudioenc : Remove broken integer-only quantization code path
9 novembre 2013, par Diego Biurrun