
Recherche avancée
Autres articles (100)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Installation en mode standalone
4 février 2011, parL’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
[mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)
Sur d’autres sites (12751)
-
Why FFmpeg is consuming more and more bandwith when restreaming a YouTube HLS stream ?
3 janvier 2023, par NiHuShuI've been creating a bot in Python which allows to copy one YouTube livestream and stream it to another channel using the HLS protocol.


This is the command I'm using in Python to start the FFmpeg process :


m3u8_url = streamlink.streams(stream_url)['1080p'].url
ffmpeg_process = Popen(
 ["ffmpeg", "-i", m3u8_url, "-c", "copy","-ignore_io_errors", "1", "-f", "hls", "-http_persistent", "1", '-attempt_recovery', '1',
 '-method', 'POST', '-hls_time', '1', '-hls_playlist_type', 'event', '-g', '5', '-reconnect_at_eof', '1',
 'https://a.upload.youtube.com/http_upload_hls?cid=' + stream_key + '&copy=0&file=stream.m3u8'])



I'm using streamlink to extract the 1080p m3u8 playlist of a given livestream and then using
"-c", "copy"
I'm just passing the raw HLS stream back to YouTube servers.

The problem is that at first FFmpeg is using around 1.5 Mbps for both upload and download, but as the stream progresses the used bandwidth per second grows substantially. After 5 hours FFmpeg uses 5 Mbps of upload and about half of that in download, but it just keeps on growing. It's gotten to a point where my VPS was blocked as after a few days it was using > 1500 Mbps of bandwidth (with 10 active streams).


The only thing that comes to my mind is that for some reason with every .ts segment, FFmpeg is trying to send all the previous ones as well. It might be worth mentioning that YouTube Studio is complaining that the incoming stream bandwith is too low and it should be 4.5 Mbps.


I've tried changing the "-method" from PUT to POST, which helped reducing the download bandwidth, but didn't change anything in regards to upload.


-
Batch Script to Download Video with youtube-dl and Convert with FFmpeg
24 octobre 2019, par Matt McManisI’m trying to
- Using a single
batch
script to - Download an
mp4
video using youtube-dl - Save the video’s original title to a batch variable
- Convert the video to
webm
with FFmpeg
I want to keep the original title, so it needs to read the title with
youtube-dl
, save it to a variable, and use that variable forFFmpeg
input/output filename.CMD Batch
1. Download Video
youtube-dl -f best "https://www.youtube.com/watch?v=TWNhqCHw0qc" -o "C:\Users\Matt\Downloads\%%(title)s.mp4" --merge-output-format mp4
2. Download Video using Loop
This is used to save the title to a variable
%%a
.for /f "delims=" %%a in ('youtube-dl -f best "https://www.youtube.com/watch?v=TWNhqCHw0qc" -o @"C:\Users\Matt\Downloads\%%(title)s.mp4" --merge-output-format mp4') do (echo example)
3. Final Script
Download Video, Save Title, Convert with FFmpegSorted
for /f "delims=" %%a in ('
youtube-dl
-f best "https://www.youtube.com/watch?v=TWNhqCHw0qc"
-o @"C:\Users\Matt\Downloads\%%(title)s.mp4"
--merge-output-format mp4
')
do (ffmpeg -y
-i "C:\Users\Matt\Downloads\%%a.mp4"
-c:v libvpx -b:v 1300K -crf 16 -pix_fmt yuv420p
-map 0:v:0? -sn
-c:a libvorbis -q:a 6 -ac 2 -map 0:a:0?
-f webm
"C:\Users\Matt\Downloads\%%a.webm"
)Inline
for /f "delims=" %%a in ('youtube-dl -f best "https://www.youtube.com/watch?v=TWNhqCHw0qc" -o @"C:\Users\Matt\Downloads\%%(title)s.mp4" --merge-output-format mp4') do (ffmpeg -y -i "C:\Users\Matt\Downloads\%%a.mp4" -c:v libvpx -b:v 1300K -crf 16 -pix_fmt yuv420p -map 0:v:0? -sn -c:a libvorbis -q:a 6 -ac 2 -map 0:a:0? -f webm "C:\Users\Matt\Downloads\%%a.webm")
Error
Before the script can ever reach
FFmpeg
,youtube-dl
fails to download the file. It says the file has already been downloaded, even when there is no file in the directory.[download] @C#\Users\Matt\Downloads\Color Balloons.mp4 has already
been downloaded - Using a single
-
When using youtube-dl with ffmpeg, what merge extension(mkv/mp4) can get best sound quality
16 mars 2021, par jokermeI use youtube-dl -F to display all video/audio list, and choose best video/audio source myself.


Then I use youtube-dl -f [video code]+[audio code] to download and automatically merge them.


As question title, when I use —merge-output-format, what output extension should be chosen then I can get a file with best sound quality. Is mkv ? Or is most suitable merge extension related to the extension of video/audio source ?


By the way, my using player is PotPlayer.