
Recherche avancée
Autres articles (40)
-
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 -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (6658)
-
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 ?
-
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 ?
-
Changed metadata print option to accept general urls
8 juillet 2016, par Sami HultChanged metadata print option to accept general urls
This is an - once again - updated patch, that uses avio_write instead
of avio_puts to stream clean text output without null characters. Works
now for me as intended.Changes metadata filter to accept general urls as file argument without
breaking former behaviour. As a byproduct, it also allows for writing to
file "-" if specified as "file :-".Example :
ffmpeg -i test.wav -filter_complex "silencedetect=n=-40dB:d=0.1,ametadata=mode=print:file=’pipe\:4’" -f null
Signed-off-by : Sami Hult <sami.hult@gmail.com>
Reviewed-by : Paul B Mahol <onemda@gmail.com>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>