
Recherche avancée
Autres articles (89)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (14024)
-
How do I get duration of an In Memory Video in Python / Django ?
21 novembre 2019, par Lucas TononSo I was successfully using the following code to get the duration of a saved video in Django.
def get_video_length(file_path):
command = [
'ffprobe',
'-v',
'error',
'-show_entries',
'format=duration',
'-of',
'default=noprint_wrappers=1:nokey=1',
file_path
]
try:
output = check_output( command, stderr=STDOUT ).decode()
except CalledProcessError as e:
output = e.output.decode()
return outputBut now I need to get the duration of an uploaded file before saving it.
I have a serializer with a FileField and on validate method I should check the video duration.
For instance :class VideoSerializer(serializers.Serializer):
video = serializers.FileField(required=True, validators=[validate_media_extension, validate_video_duration])Then on validate_video_duration I needed to call some method like get_video_length, but I need an alternative to get the duration from the video in memory. The object that I have is an instance of InMemoryUploadedFile (https://docs.djangoproject.com/en/2.2/_modules/django/core/files/uploadedfile/)
-
releases doc formating
13 février 2013, par jonrohanm docs/releases.md
releases doc formating
-
ffmpeg : avfilter's anull says "Rematrix is needed between stereo and 0 channels but there is not enough information to do it"
12 juillet 2017, par kuanyuiI’m trying to write a transcoder according to FFMpeg’s official example with ffmpeg 3.2.4 (official prebuild Win32), and try to transcode a video with stereo audio stream source (from
avformat
’sdshow
).In the example code, which passes
anull
intoavfilter_graph_parse_ptr()
for audio stream, and"time_base=1/44100:sample_rate=44100:sample_fmt=s16:channels=2:channel_layout=0x3"
is passed intoavfilter_graph_create_filter()
, occurs error in the followingavfilter_graph_config()
:[auto-inserted scaler 0 @ 32f77600] w:iw h:ih flags:'bilinear' interl:0
[Parsed_null_0 @ 2e9d79a0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'in' and the filter 'Parsed_null_0'
[swscaler @ 3331bfe0] deprecated pixel format used, make sure you did set range correctly
[auto-inserted scaler 0 @ 32f77600] w:1920 h:1080 fmt:yuvj422p sar:1/1 -> w:1920 h:1080 fmt:yuv420p sar:1/1 flags:0x2
[libmp3lame @ 2e90a360] Channel layout not specified
[in @ 3866e8a0] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[Parsed_anull_0 @ 330e8820] auto-inserting filter 'auto-inserted resampler 0' between the filter 'in' and the filter 'Parsed_anull_0'
[auto-inserted resampler 0 @ 330e8dc0] [SWR @ 3809b620] Rematrix is needed between stereo and 0 channels but there is not enough information to do it
[auto-inserted resampler 0 @ 330e8dc0] Failed to configure output pad on auto-inserted resampler 0I’ve googled for days but didn’t find any clue for it. Doesn’t what
anull
do is only "Pass the audio source unchanged to the output", why libav want to resample stereo to 0 channel ? What’s going wrong ?