
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (103)
-
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 -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (8341)
-
Some download errors in my discrod musicbot
24 avril 2021, par takugranoI am making my music bot for discord
but i am having some problem with uploading videos


@client.command()
async def play(ctx, url : str):
 song_there=os.path.isfile("song.mp3")
 try:
 if song_there:
 os.remove("song.mp3")
 except PermissionError:
 await ctx.send("music is playing right now, use !stop command")
 return
 voiceChannel=discord.utils.get(ctx.guild.voice_channels,name='General')
 await voiceChannel.connect()
 voice=discord.utils.get(client.voice_clients,guild=ctx.guild)



 ydl_opts={
 'format':'bestaudio/best',
 'postprocessors':[{
 'key':'FFmpegExtractAudio',
 'preferredcodec':'mp3',
 'preferredquality': '192',
 }],
 }
 with youtube_dl.YoutubeDL(ydl_opts)as ydl:
 ydl.download([url])
 for file in os.listdir("./"):
 if file.endswith(".mp3"):
 os.rename(file,"song.mp3")
 voice.play(discord.FFmpegPCMAudio("song.mp3"))



in my programm I have more code but it is not that important.
After compile i have this :


[youtube] 5RGaoLpBASw: Downloading webpage
[download] Destination: F1 Tokyo Drift-5RGaoLpBASw.m4a
[download] 100% of 1.11MiB in 00:00 
[ffmpeg] Correcting container in "F1 Tokyo Drift-5RGaoLpBASw.m4a"
 ERROR: 
 Ignoring exception in command play:



and this :


raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError



and this :


raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: 



and finally this :


raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: DownloadError: ERROR: 



but on my discord server nothing but connecting the bot to the channel happens
however, a file with the .m4a extension appears in the programm directory, which I need to play.


how can i fix these errors ?


-
Download m3u8 segments with ffmpeg without writing the .ts files to disk
22 avril 2021, par O RI am trying to download m3u8 segments from an HLS live stream with ffmpeg without writing the .ts files to disk. I intend to run opencv on the image data in real time. Here is what I have tried, but I am only able to get one segment at a time and don't know how to just keep it in memory without writing to disk. When inspecting the network requests using developer tools on the Twitch site, I see the m3u8's arriving in real time, although, these don't work in the script. I have to refresh the page and get the URL of the first request that arrives, which is a URL not ending in .m3u8 (the one i'm using in the script)


import requests
import m3u8

url = 'https://usher.ttvnw.net/api/channel/hls/gernaderjake.m3u8?allow_source=true&fast_bread=true&p=4466372&play_session_id=d66db58de3bf6be70a5f5824bbb72763&player_backend=mediaplayer&playlist_include_framerate=true&reassignments_supported=true&sig=2b97079328898fdae56b041616be6fc7b01bd13c&supported_codecs=avc1&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22gernaderjake%22%2C%22channel_id%22%3A1423946%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3A%22ec6cb1f95615ed0b%22%2C%22expires%22%3A1618772589%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Afalse%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%22173.22.40.125%22%2C%22version%22%3A2%7D&cdm=wv&player_version=1.3.0'

r = requests.get(url)

m3u8_master = m3u8.loads(r.text)

playlist_url = m3u8_master.data['playlists'][0]['uri']

r = requests.get(playlist_url)

playlist = m3u8.loads(r.text)

playlist.data['segments'][0]['uri']

r = requests.get(playlist.data['segments'][0]['uri'])

with open('video.ts', 'wb') as f:
 for segment in playlist.data['segments']:
 url = segment['uri']
 r = requests.get(url)
 f.write(r.content)



-
How to download a video from m3u8 with aes-128, IV with FFMPEG ? [closed]
13 avril 2021, par AWrrI've tried with a tutorial that prompted me to download the m3u8 file and then stream it with vlc but that didn't work. It just created a 160 bytes .mp4 file that couldn't be played.


When I opened it, it contains a line in the form of :


#EXT-X-KEY:METHOD=AES-128,URI="license://G",IV=0x08


I've read some threads talking aboout a .key file, but this one doesn't have a .key in the "URI=" section and I don't really knoe how to get one, if I needed it.


Will
ffmpeg -i playlist.m3u8 -c copy -bsf:a aac_adtstoasc output.mkv
work just fine ?

Edit : I've tried it and it showed this :


At the start

Unable to open key file


At the end


Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 494kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)```