
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (76)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
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 ; (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (5453)
-
ffmpeg stops capturing whole hour of HTTP stream after some time
7 juillet 2020, par CompuChipFirst of all, sorry if I'm using the wrong terminology. I've been playing around with nginx and I'm still a bit confused about RTMP and HLS and other acronyms.


I've managed to setup OBS to stream to an nginx server, which takes the RTMP stream and chops it into pieces for HLS. Here's the relevant part of the nginx configuration file.


rtmp {
 server {
 listen 1935;
 chunk_size 4000;
 ping 30s;
 deny play all;

 application live {
 live on;
 hls on;
 hls_nested on; # Create a new folder for each stream
 hls_path /mnt/hls/live;
 hls_fragment 3s;
 hls_fragment_naming timestamp;
 hls_playlist_length 60s;
 }
 }
}

http {
 server {
 listen 81 ssl;

 #creates the http-location for our full-resolution (desktop) HLS stream - "http://localhost:8080/live/test/index.m3u8"
 location /live {
 # Elided caching and CORS for brevity

 alias /mnt/hls/live;
 add_header Cache-Control no-cache;
 index index.m3u8;
 }
 }
}



This works well, I can view the stream in VLC or on a website and it looks smooth. Now I wanted to add some logging : I'd like to write full hours (starting at xx:00:00 and ending at xx:59:59) to a file named
log_yyyymmdd_hh.mp4
, e.g.log_20200707_18.mp4
for the files of 7 July 2020, 18:00 - 19:00 hrs. So I've set up an hourly cron job with the following ffmpeg command :

ffmpeg -i https://stream.example.com:81/live/<streamkey> -preset veryfast -maxrate 2000k \
 -bufsize 2000k -g 60 -t 3600 -y /var/video/log/$(date +\%Y\%m\%d_\%H00).mp4 >/dev/null 2>&1
</streamkey>


At first this seemed to work well, so I left it running happily for about 24 hours. When I checked, most of my hourly files were small ( 100MB) files of about 10 to 15 minutes long. It seems like any small delay in the stream will cause
ffmpeg
to stop writing to the file. I suspect such hiccups may for example be caused by an OBS plugin and I'll need to look into that, but I would prefer thatffmpeg
will retry for some time before giving up. What arguments should I be passing toffmpeg
to make it not break when the stream is down for, say, up to a second every now and then ?.

When I view back the HLS files there don't seem to be any noticeable gaps, so eventually all the data arrives. I went for the
crontab
solution withffmpeg
because when recording from nginx I could not figure out how to start recording at the start of the whole hour.

-
av_hwdevice_iterate_types returns an empty list
9 juillet 2020, par Ruslan AblyazovI used an example https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c


The av_hwdevice_iterate_types function returns an empty list. What could be the reason ?


And
avcodec_find_decoder_by_name("h264_cuvid")
returns NULL.

FFmpeg version :


ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-ladspa --enable-libpulse --enable-libsoxr --enable-libspeex --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-nonfree --disable-ffplay --enable-libxvid --enable-cuda --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100



The command
ffmpeg -c:v h264_cuvid -i 7.mp4 71.mp4
outputs :

...
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (libx264))
....



And it works.


The command
ffmpeg-hwaccel cuda-i 7.mp4 71.mp4
outputs :

...
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
....



The command
ffmpeg -codecs
outputs :

...
 DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_v4l2m2m nvenc nvenc_h264 )
 D.VIL. hap Vidvox Hap
 DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_v4l2m2m hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_v4l2m2m )
 ...



-
How to use ffmpeg to change the h264 properties, yuv, fps, tbr, tbn, and tbc of an mp4 file ?
23 août 2020, par bguizUsing ffmpeg, I would like to convert a video file such that its video stream changes like so :


- 

- Current video stream :
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2560x1080 [SAR 4:3 DAR 256:81], 60 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
- Target video stream :
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 2560x1080, 272 kb/s, 20 fps, 20 tbr, 10240 tbn, 40 tbc (default)






(values that differ : h264 properties, yuv, fps, tbr, tbn, and tbc)


... and its audio stream changes like so :


- 

- Current audio stream :
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s (default)
- Target audio stream :
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)






(values that differ : aac properties)


How can I do this ?



Detailed version


I would like to be able to concatenate, without re-encoding,
main.mp4
, followed byoutro.mp4
, using the following commands :

echo "file 'main.mp4'" > concat.txt
echo "file 'outro.mp4'" >> concat.txt
ffmpeg \
 -f concat \
 -safe 0 \
 -i concat.txt \
 -c copy \
 concat.mp4



What results is a file which plays till the end of
main.mp4
, and then the video freezes, and I hear the audio ofoutro.mp4
. The same video frame then stays on, with no sound, for an extra 30 minutes (end time shown in VLC).

My assumption is that these files are incompatible with each other in some way that prevents them from being concatenated using
-codec copy
(without re-encoding).

Here is the
ffprobe
output formain.mp4
:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'main.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.45.100
 Duration: 01:13:00.65, start: 0.000000, bitrate: 348 kb/s
 Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 2560x1080, 272 kb/s, 20 fps, 20 tbr, 10240 tbn, 40 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)
 Metadata:
 handler_name : SoundHandler



Here is the
ffprobe
output foroutro.mp4
:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'outro.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.45.100
 Duration: 00:00:04.12, start: 0.000000, bitrate: 254 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2560x1080 [SAR 4:3 DAR 256:81], 60 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s (default)
 Metadata:
 handler_name : Stereo



How can I convert
outro.mp4
, such that I may concatenate the files without re-encoding ?

Note that I am OK with re-encoding the
outro.mp4
on its own,
I simply want to avoid re-encoding during the concatenation step,
and avoid re-encodingmain.mp4
.


ffmpeg build


$ ffmpeg -version
ffmpeg version 4.3-2~18.04.york0 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version='2~18.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100



- Current video stream :