
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (97)
-
À propos des documents
21 juin 2013, parQue faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
Document bloqué en file d’attente ?
Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...) -
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, 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 (9064)
-
Autogenerate HTML5 tags from YouTube-DL
13 novembre 2015, par Terence EdenI’m using youtube-dl to download videos I’ve stored on YouTube. It gives me the ability to download various formats, thumbnails, and subtitles.
Is there any way I can automatically generate an HTML5
<video></video>
snippet from the downloaded files ?For example, I’d like the end result to be .txt file containing :
<video poster="file-160.jpg">
<source src="file-135.mp4" type="video/mp4; codecs=mp4a.40.2, avc1.42001E">
<source src="file-43.webm" type="video/webm; codecs=vorbis, vp8.0">
...
<track kind="subtitles" src="file-160.en.srt">
</track></source></source></video>At the moment, I have a file list like :
- file-135.mp4
- file-18.mp4
- file-134.mp4
- file-160.mp4
- file-43.webm
- file-5.flv
- file-36.3gp
- file-17.3gp
- file-160.jpg
- file-160.en.srt
I can run some Python/Ruby/bash over them to generate the
<source src="..."></source>code>, but the problem is, I don't know what codecs each of those videos are, so I can't generate the <code>; codecs=
portion.Using
avconv
orffmpeg
I can get the codecs, but not in a suitable format for embedding into HTML.I’m wary of asking "what tool should I use" - but is there any way to get avconv/ffmpeg/youtube-dl to spit out the codec information in a format I can put into an HTML5 tag ?
Or, is there a way to get YouTube-DL only to spit out HTML5 compatible files with known codecs ?
-
Discord bot cannot play youtube video for more than 60sec
18 octobre 2020, par Antoine WeberA few weeks back I started a discord bot as a side project for fun.
Since yesterday i've been trying to allow my bot to search youtube videos and play them in voice channels (mostly for songs).


The bot correctly searches youtube with the query and finds the youtube video, starts playing it, but for some reason, after 60 sec (no matter of the video, always the same time), the bot suddenly provides no more audio, and then gets stuck somewhere (not a single error message, but the bots just stops responding).


Here are the code snippets :


# first two words are activation keywords for the bot, then its the youtube query
query = ' '.join(message.message.content.split()[2:])
youtube = build("youtube", "v3", developerKey=yt_token)
search_response = youtube.search().list(q=query, part="id,snippet", maxResults=5).execute()
video_id = search_response['items'][0]['id']['videoId']
video_url = "https://www.youtube.com/watch?v=" + video_id

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([video_url])
await play_audio(message, 'song.mp3')



(I delete the song.mp3 after playing)


my ydl options are


ydl_opts = {
 "postprocessors":[{
 "key": "FFmpegExtractAudio", # download audio only
 "preferredcodec": "mp3", # other acceptable types "wav" etc.
 "preferredquality": "192" # 192kbps audio
 }],
 "format": "bestaudio/best",
 "outtmpl": "song.mp3"
}



and also my play_audio function is


async def play_audio(message, audio_name):
 channel = message.message.author.voice.channel
 vc = await channel.connect()
 time.sleep(0.5)
 vc.play(discord.FFmpegPCMAudio(audio_name))
 while vc.is_playing():
 time.sleep(1)
 vc.stop()
 await vc.disconnect()



I know the time.sleep() call is blocking but I don't really core for now.


Any one had this issue ? For short videos (less than 60sec), everything works fine. Maybe an ffmpeg option ?


-
Converting youtube videos to mp3 in golang using a ffmpeg binary
19 août 2015, par BeraWith golang it’s possible to extract a mp3 file from a given youtube video url ?
Is needed to download a video in mp4 format and then extract the audio in the mp3 format.
Would be better to use a lib like youtube-dl to download the video in mp4 and after invoke a ffmpeg binary to extract the audio or there is a easy way using only go libraries or binds ?
thanks for your help.