
Recherche avancée
Autres articles (64)
-
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 ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (8055)
-
Why i'm failing to download mp4 file using youtube-dl in python
9 décembre 2019, par JoaoPython noob :(
I created a script that downloads any youtube video.
Then the script inserts a subtitle into the video and that works fine.
However, I have a problem, I can’t make the script always download the video in mp4. Most of the time it is downloaded in mkv and i can’t understand why that happens and how can I change the code in order to always download the video in the format I prefer.
The function in charge to download the video is this one :
def video_download():
#global resolution
try:
print(linkvideo)
ydl_opts = {
'format': 'bestvideo[ext=mp4]+bestaudio/best',
'outtmpl': video_id+"."+'%(ext)s'
#'bestvideo': 'mp4',
#'bestaudio': 'm4a',
#'ext': 'mp4'
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([linkvideo])
result = ydl.extract_info("{}".format(linkvideo))
title = result.get("id", None)
videoext = result.get("ext", None)
resolution = result.get("resolution", None)
except:
print("falhou")
pass
global ficheiro
ficheiro2 = str(title)+"."+"mkv"
ficheiro =""
for i in ficheiro2:
if (i == '"' or i =="'" or i =="/"):
pass
else:
ficheiro += iCan any one help me ? Thanks in advance.
I got it, thanks to everyone who tried to help me.
The problem is this : when we try to download any video with the opts i’ve selected, youtube-dl will download the best video/audio combination in the same file, so I’ve added the following in my code :
ytdl = YoutubeDL()
result = ytdl.extract_info(linkvideo, download=False)
formats = result['formats']
formato = ""
formatoaudio = ""
extaudio = ""
for format in formats:
if format['format_note'] == "1080p" and format['ext'] == "mp4":
print(format)
formato = (format['format_id'])
break
else:
print("no 1080p mp4?!")
if formato == "":
for format in formats:
if format['format_note'] == "720p" and format['ext'] == "mp4":
print(format)
formato = (format['format_id'])
break
else:
print("no 720p mp4")Then I did the same to the sound file, checking if there is any m4a or webm sound file. To finish I’m joining both files using FFmpeg.
Maybe this is not the best solution, but I’m still learning. :)
Thank you all
-
How to get ffmpeg configuration similar to that of youtube for 480p and 1080p video ? I have got a function but the output quality is too low
14 avril 2021, par prehistoricbeastHey guys I am learning to develop a website that converts videos to youtube quality (or close enough) 480p and 1080p, I am not much familiar with ffmpeg and struggling with its documentation.


I have these functions,


video_480p = subprocess.call([FFMPEG_PATH, '-i', input_file, '-codec:v', 'libx264', '-crf', '20', '-preset', 'medium',
 '-b:v', '1000k', '-maxrate', '1000k', '-bufsize', '2000k','-vf', 'scale=-2:480', '-codec:a', 'aac', '-b:a',
 '128k', '-strict', '-2', file_480p])



similarly I have another function,


new_video = subprocess.call([FFMPEG_PATH, '-i', input_file, '-codec:v', 'libx264', '-crf', '20', '-preset', 'medium',
 '-b:v', '1000k', '-maxrate', '1000k', '-bufsize', '2000k','-vf', 'scale=-2:1080', '-codec:a', 'aac', '-b:a',
 '128k', '-strict', '-2', output_file])



Both these functions, transcode the video, but returns low quality videos, Can anyone provide me with the right settings for 480p and 1080p which is similar or close to youtube quality ?


Thanks


-
How to save youtube audio url (m4a/webm) as mp3 Using php ? [closed]
7 janvier 2020, par Mwt Lakshan