
Recherche avancée
Autres articles (81)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5302)
-
How to use youtube-dl inside ffmpeg
3 décembre 2022, par Dương Phương NamI tried to record a live stream video by this code. I add that code inside render.cmd



ffmpeg -i $(youtube-dl -f 95 -g https://www.youtube.com/watch?v=v2_knJ1RwlQ) -c copy render.ts



but i got this error $(youtube-dl : No such file or directory



anyone help me please


-
Downloading youtube mp3 - metadata encoding issue (python, youtube-dl, ffmpeg)
21 novembre 2018, par mopsiokI’m trying to download audio from youtube with youtube-dl.exe and ffmpeg.exe (Windows 7), but I am having some troubles with encoding. I have to parse metadata manually, because when I try to use
--metadata-from-title "%(artist) - %(title)" --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=DaU94Ld3fuM
I get ERROR : Could not interpret title of video as "%(artist) - %(title)"
Anyway, I wrote some code to save metadata with ffmpeg :
def download(url, title_first=False):
if (0 == subprocess.call('youtube-dl --extract-audio --audio-format mp3 %s' % url)):
#saves file in current directory in format: VID_TITLE-VID_ID.mp3
video_id = url[url.find('=')+1:] #video id from URL (after ?v=)
for f in os.listdir('.'):
if video_id in f:
filename = f
break
os.rename(filename, video_id+'.mp3') #name without non-ascii chars (for tests)
video_title = filename[: filename.find(video_id)-1]
output = video_title + '.mp3'
title, artist = '', ''
try: #parsing the title
x = video_title.find('-')
artist = video_title[:x].strip()
title = video_title[x+1:].strip()
if (title_first): output = '%s - %s.mp3' % (title, artist)
except:
pass
x = 'ffmpeg -i "%s" -metadata title="%s" -metadata artist="%s" -acodec copy -id3v2_version 3 -write_id3v1 1 "%s"' \
% (video_id+'.mp3', title, artist, output)
print x
subprocess.call(x)The file is downloaded and then cropped to given start and duration times (the code above is a simplified version). Filename is fine, but when I open the file with AIMP3, it shows rubbish instead of non-ascii characters :
I’ve tried to re-encode the final command with iso-8859-2, utf-8 and mbcs :
x = x.decode('cp1250').encode('iso-8859-2')
But non-ascii chars are still not readable. Passing an unicode command returns UnicodeEncodeError...
Any idea how to solve this problem ?
-
Downloading youtube mp3 - metadata encoding issue (python, youtube-dl, ffmpeg)
21 mai 2015, par mopsiokI’m trying to download audio from youtube with youtube-dl.exe and ffmpeg.exe (Windows 7), but I am having some troubles with encoding. I have to parse metadata manually, because when I try to use
--metadata-from-title "%(artist) - %(title)" --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=DaU94Ld3fuM
I get ERROR : Could not interpret title of video as "%(artist) - %(title)"
Anyway, I wrote some code to save metadata with ffmpeg :
def download(url, title_first=False):
if (0 == subprocess.call('youtube-dl --extract-audio --audio-format mp3 %s' % url)):
#saves file in current directory in format: VID_TITLE-VID_ID.mp3
video_id = url[url.find('=')+1:] #video id from URL (after ?v=)
for f in os.listdir('.'):
if video_id in f:
filename = f
break
os.rename(filename, video_id+'.mp3') #name without non-ascii chars (for tests)
video_title = filename[: filename.find(video_id)-1]
output = video_title + '.mp3'
title, artist = '', ''
try: #parsing the title
x = video_title.find('-')
artist = video_title[:x].strip()
title = video_title[x+1:].strip()
if (title_first): output = '%s - %s.mp3' % (title, artist)
except:
pass
x = 'ffmpeg -i "%s" -metadata title="%s" -metadata artist="%s" -acodec copy -id3v2_version 3 -write_id3v1 1 "%s"' \
% (video_id+'.mp3', title, artist, output)
print x
subprocess.call(x)The file is downloaded and then cropped to given start and duration times (the code above is a simplified version). Filename is fine, but when I open the file with AIMP3, it shows rubbish instead of non-ascii characters :
I’ve tried to re-encode the final command with iso-8859-2, utf-8 and mbcs :
x = x.decode('cp1250').encode('iso-8859-2')
But non-ascii chars are still not readable. Passing an unicode command returns UnicodeEncodeError...
Any idea how to solve this problem ?