
Recherche avancée
Autres articles (49)
-
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 (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (4759)
-
How to the stream should be automatically restart after 10 seconds if the stream cut
2 mars 2023, par Mr_MilkyI will restart using this script . But sometime for some reason the stream goes cut....


How to the stream should be automatically restart after 10 seconds if the stream cut.


#!/bin/bash
while true;do
grep -c "Non-monotonous DTS in output stream" file.txt >nonmonotonus.txt
grep -c "Timestamps are unset in a packet for stream" file.txt >timestamp.txt
grep -c "PES packet size mismatch" file.txt >pespacket.txt
grep -c "Error while decoding stream" file.txt >errordecoding.txt
grep -c "Circular buffer overrun" file.txt >circularbuffer.txt
grep -c "Header missing" file.txt >header.txt
grep -c "Conversion failed" file.txt >conversion.txt

file=nonmonotonus.txt
file1=timestamp.txt
file2=pespacket.txt
file3=errordecoding.txt
file4=circularbuffer.txt
file5=header.txt
file6=conversion.txt

if (($(<"$file")>=3000)) || (($(<"$file1")>=500)) || (($(<"$file2")>=100)) || (($(<"$file3")>=1000)) || (($(<"$file4")>=500)) || (($(<"$file5")>=6)) || (($(<"$file6")>=1)); then
stream1 restart > restart.txt
sleep 1
fi
done
__________________________________________________________________________

FFmpeg -re -threads 3 -c:s webvtt -i "$INPUT_URL?source=null&overrun_nonfatal=1&fifo_size=1000000" \
 -c:v copy \
 -map 0:0 -map 0:1 \
 -c:a aac -b:a 128k -ar 48000 \
 -threads 4 -f hls -hls_time 2 -hls_wrap 15 \
 "manifest.m3u8" \
null > /dev/null 2>&1 2>file.txt & echo $! > $STREAM_PID_PATH




How to automatically restart the stream.. after cut the .ts file


Thankyou ...


-
FFMPEG Screen Flashing Green
18 novembre 2022, par Devin DixonI have this problem where my ffmpeg videos are flicking green. Example of the video is here :
https://www.glitch.fun/streams/31fea7e0-7523-4365-9780-31deee9e472c/watchrecording/efb841c0-4b87-4482-b165-990880a66f63


My ffmpeg command is this :


/usr/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -y -v info -f x11grab -draw_mouse 0 -r 60 -s 1920x1080 -thread_queue_size 14000 -i :0.0+0,0 -f alsa -thread_queue_size 14000 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v h264_vaapi -vf format=nv12|vaapi,hwupload -preset medium -maxrate 14000k -bufsize 14000k -pix_fmt yuv420p -r 60 -crf 25 -g 120 -tune zerolatency -f flv rtmp://ingest.bingewave.com/live/[output_to_livestream] -pix_fmt yuv420p -r 60 -b:v 15000k -maxrate 15000k -bufsize 15000k -c:v h264_vaapi -vf format=nv12|vaapi,hwupload -preset medium -keyint_min 24 -level 3.0 -g 120 -tune zerolatency -f flv rtmp://127.0.0.1:1935/live/[output_to_recording]



The reason why my fps and bitrate is so high and preset is so medium is because Glitch is an open source esports platform, and those kinds of settings are required for streaming of game graphics
The command has two outputs :


- 

- rtmp ://[output_to_livestream] goes to a livestream where users watch live
- rtmp ://127.0.0.1:1935/live/[output to recording] goes a goes to a file






And the output to the recording is captured by nginx and saved to a file as such :


rtmp {
 server {
 listen 1935;
 chunk_size 4096;

 application live {
 live on;
 #Set this to "record off" if you don't want to save a copy of your broadcasts
 record all;
 # The directory in which the recordings will be stored.
 record_path /var/www/html/recordings;
 record_unique on;
 record_suffix -%d-%b-%y-%T.flv;
 on_record_done http://127.0.0.1:3000/recorded;
 # Turn on HLS
 exec /usr/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -i rtmp://127.0.0.1:1935/live/$name -c:v copy -c:a copy -f flv rtmp://127.0.0.1/show/$name;
 }

 application show {
 live on;
 # Turn on HLS
 hls on;
 hls_path /mnt/hls/;
 hls_fragment 3;
 hls_playlist_length 60;
 # disable consuming the stream from nginx as rtmp
 deny play all;
 }
 }
}



So the part that goes to the live is fine, no green flickering at all. But the part that goes to the recording is one that goes the above issue :


-pix_fmt yuv420p -r 60 -b:v 15000k -maxrate 15000k -bufsize 15000k -c:v h264_vaapi -vf format=nv12|vaapi,hwupload -preset medium -keyint_min 24 -level 3.0 -g 120 -tune zerolatency -f flv rtmp://127.0.0.1:1935/live/[output_to_recording]



I
s there something I need to be changing here ?


-
Combining png and mp3, why using -loop 1 on image and -shortest tag doesn't cut the output length when audio ends ?
9 novembre 2022, par AlexanderI have several image and audio files and I want to combine each of the set to a separate video file where image is stretched to audio file length. For example a lion image should be displayed as long as the lion voice is being played. The output file should end when lion audio ends.


I also try to normalize output clips resolution since image files doesn't have same width/height.


Here is the command I'm currently running. Command is on one line but I made some line breaks here for your convenience.


-loop 1 
-i "C:\Temp\screenshot\clip_1.png"
-i "C:\Temp\audio\clip_1.mp3" 
-shortest 
-filter_complex "[0:v]scale=3000:-2:force_original_aspect_ratio=decrease" 
-c:v h264_nvenc 
-c:a aac 
-b:a 192k 
-y 
C:\Temp\clips\clip_1.mp4



To my understanding the
-loop 1
before image input should make it to loop infinite and-shortest
should end the video when shortest input (audio in this case) ends. In following example, the audio file is 6 seconds long but the output is always 20 seconds.

Here is the full output of ffmpeg :


ffmpeg version 2022-11-03-git-5ccd4d3060-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enabl
e-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --ena
ble-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --e
nable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 57. 40.100 / 57. 40.100
 libavcodec 59. 51.101 / 59. 51.101
 libavformat 59. 34.101 / 59. 34.101
 libavdevice 59. 8.101 / 59. 8.101
 libavfilter 8. 49.101 / 8. 49.101
 libswscale 6. 8.112 / 6. 8.112
 libswresample 4. 9.100 / 4. 9.100
 libpostproc 56. 7.100 / 56. 7.100
Input #0, png_pipe, from 'C:\Temp\screenshot\clip_1.png':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: png, rgba(pc), 640x148, 25 fps, 25 tbr, 25 tbn
[mp3 @ 0000016c26784a80] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from 'C:\Temp\audio\clip_1.mp3':
 Duration: 00:00:06.10, start: 0.000000, bitrate: 32 kb/s
 Stream #1:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
Stream mapping:
 Stream #0:0 (png) -> scale:default (graph 0)
 scale:default (graph 0) -> Stream #0:0 (h264_nvenc)
 Stream #1:0 -> #0:1 (mp3 (mp3float) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 0000016c267ab180] Too many bits 8192.000000 > 6144 per frame requested, clamping to max
Output #0, mp4, to 'C:\Temp\clips\clip_1.mp4':
 Metadata:
 encoder : Lavf59.34.101
 Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), rgba(pc, gbr/unknown/unknown, progressive), 3000x694, q=2-31, 2000 kb/s, 25 fps, 12800 tbn
 Metadata:
 encoder : Lavc59.51.101 h264_nvenc
 Side data:
 cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A
 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 144 kb/s
 Metadata:
 encoder : Lavc59.51.101 aac
frame= 504 fps=149 q=11.0 Lsize= 925kB time=00:00:20.00 bitrate= 378.8kbits/s speed=5.91x
video:852kB audio:67kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.645776%
[aac @ 0000016c267ab180] Qavg: 65496.695