
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 (20)
-
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (5695)
-
heroku discord.py bot doesn't play music
30 août 2022, par bon hoI'm making music bot with discord.py and using heroku. bot is playing music my localhost but heroku host is not playing music.


I found what cause a bug.
It working nicely in heroku-20, but not working in heroku-22 stack.


How can I use heroku-22 stack without error ?
What can I do ?


I'm sorry my english is bad.


my code :


import youtube_dl
import discord
from discord import app_commands,Interaction
import asyncio
import os

class MyClient(discord.Client):
 async def on_ready(self):
 await self.wait_until_ready()
 await tree.sync()
 print(f"login at {self.user}")
 
intents= discord.Intents.all()
client = MyClient(intents=intents)
tree = app_commands.CommandTree(client)

youtube_dl.utils.bug_reports_message = lambda: ''
ytdl_format_options = {
 'format': 'bestaudio/best',
 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
 'restrictfilenames': True,
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': False,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0', # bind to ipv4 since ipv6 addresses cause issues sometimes
}

ffmpeg_options = {
 'options': '-vn',
}
ytdl = youtube_dl.YoutubeDL(ytdl_format_options)
class YTDLSource(discord.PCMVolumeTransformer):
 def __init__(self, source, *, data, volume=0.5):
 super().__init__(source, volume)

 self.data = data

 self.title = data.get('title')
 self.url = data.get('url')

 @classmethod
 async def from_url(cls, url, *, loop=None, stream=True):
 loop = loop or asyncio.get_event_loop()
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))
 if 'entries' in data:
 # take first item from a playlist
 data=data['entries'][0]
 filename = data['url'] if stream else ytdl.prepare_filename(data)
 return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)
queue={}
@tree.command(name="play", description="play music")
async def playmusic(interaction:Interaction,url_title:str,playfirst:bool=False):
 await interaction.response.send_message("I'm looking for music!!")
 guild=str(interaction.guild.id)
 try:
 queue[guild]
 except KeyError:
 queue[guild]=[]
 if interaction.user.voice is None:
 await interaction.edit_original_response(content="you must join any voice channel")
 else:
 voice_client: discord.VoiceClient = discord.utils.get(client.voice_clients, guild=interaction.guild)
 if voice_client == None:
 await interaction.user.voice.channel.connect()
 voice_client: discord.VoiceClient = discord.utils.get(client.voice_clients, guild=interaction.guild)
 player = await YTDLSource.from_url(url_title, loop=None)
 if playfirst and len(queue[guild])>1:
 queue[guild].insert(1,player)
 else:
 queue[guild].append(player)
 if not voice_client.is_playing():
 voice_client.play(player,after=None)
 await interaction.edit_original_response(content=f"{player.title} playing!!")
 else:
 await interaction.edit_original_response(content=f"{player.title} enqueued!")
 await asyncio.sleep(7)
 await interaction.delete_original_response()

client.run(token)



-
FFmpeg conversion to Photo-JPEG is blocky [duplicate]
26 mai 2017, par Richard210363This question already has an answer here :
I am converting .mp4 files to .mov with the Photo-JPEG codec to use in After Effects to reduce render times.
I have looked up the FFmpeg commands to do this and come up with :
ffmpeg -i tower-bridge.mp4 -an -pix_fmt yuvj420p -vcodec mjpeg -f mov -y tower-bridge.mov
This works but when I look at the output video it is quite blocky ; like a mosaic.
During the conversion I get this message :
[swscaler @ 0000000008c97fe0] deprecated pixel format used, make sure you did set range correctly
Research on-line suggests I can ignore this message.
What can I do to improve the output quality ?
MediaInfo report on Input file :
Complete name : F :\london-tower-bridge.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/avc1/mp42)
File size : 18.7 MiB
Duration : 13 s 625 ms
Overall bit rate : 11.5 Mb/sID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L4
Format settings, CABAC : No
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 13 s 625 ms
Bit rate : 11.5 Mb/s
Maximum bit rate : 26.8 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.231
Stream size : 18.7 MiB (100%)
Writing library : Zencoder Video Encoding SystemMediaInfo report on Output file :
Complete name : F :\london-tower-bridge.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.02 (qt )
File size : 16.1 MiB
Duration : 13 s 625 ms
Overall bit rate mode : Variable
Overall bit rate : 9 912 kb/s
Writing application : Lavf57.72.101ID : 1
Format : JPEG
Codec ID : jpeg
Duration : 13 s 625 ms
Bit rate mode : Variable
Bit rate : 9 910 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.199
Stream size : 16.1 MiB (100%)
Language : English -
How to force specific AVInputFormat in code (FFMPEG) ?
18 février 2020, par kugipark++Plaease understand that maybe some words or sentences could not be correct English.++
I’m novice programmer and developing a video player app for Android which can play 5ch .avi video from http. It based on ffplay.c in FFMPEG libarary.
Currently I have 2 problems for this below. It has occured only in android devices.
1) Too much time taken for detecting format.
- opening and finding stream info takes more than a minute when I trying to open 5ch video source whereas normal .mp4 (h264) source open almost immediately.
2) Demuxing is too slow when it comes to large size video.
- If the resolution of video getting larger, then displaying frame rate getting slower even though there are enough memory, network and CPU resources physically.
To resolve my problem, I tried to force the format and decoders but I couldn’t found some information for specifying the input source in code level.
The official doc site only refers to a sentence about those parameters like "If non-NULL, this parameter forces a specific input format. Otherwise the format is autodetected.". So I don’t have any clues how to set the number of streams, decoders, decoders’ private options, and etc. (And also which parameters should I manage.) If someone knows how to set the options(like AVDictionary), and pass to the av functions, please let me know an exmple. The source contains 2 video streams, 1 audio stream, and 2 more extra streams (for custom data like gps). The stream information of video is below. I printed it manually, and these are auto-detected information.---------- File format information ----------
flags=2097152
video_codec_id=0 (NONE)
audio_codec_id=0 (NONE)
ctx_flags=0
data_codec_id=0 (NONE)
format_whitelist=(null)
iformat=0xa19d0d2c
---------- Stream information ----------
stream 1 of 5:
----- common ----------
bit_rate: 11383235
bits_per_coded_sample: 24
bits_per_raw_sample: 0
codec_id: 0x1C (H264)
codec_tag: 875967048
extradata_size: 0
level: -99
profile: -99
sample_rate: 0
----- Video Stream ----------
chroma_location: 0
color_primaries: 2
color_space: 2
color_trc: 2
field_order: 0
format: -1 (NONE)
height: 1080
width: 1920
sample_aspect_ratio.den: 1
sample_aspect_ratio.num: 0
video_delay: 0
----------------------------------------
stream 2 of 5:
----- common ----------
bit_rate: 6185438
bits_per_coded_sample: 24
bits_per_raw_sample: 0
codec_id: 0x1C (H264)
codec_tag: 875967048
extradata_size: 0
level: -99
profile: -99
sample_rate: 0
----- Video Stream ----------
chroma_location: 0
color_primaries: 2
color_space: 2
color_trc: 2
field_order: 0
format: -1 (NONE)
height: 720
width: 1280
sample_aspect_ratio.den: 1
sample_aspect_ratio.num: 0
video_delay: 0
----------------------------------------
stream 3 of 5:
----- common ----------
bit_rate: 352800
bits_per_coded_sample: 16
bits_per_raw_sample: 0
codec_id: 0x10000 (PCM_S16LE)
codec_tag: 1
extradata_size: 0
level: -99
profile: -99
sample_rate: 22050
----- Audio Stream ----------
block_align: 2
channels: 1
channel_layout: 0
color_range: 0
frame_size: 0
initial_padding: 0
seek_preroll: 0
trailing_padding: 0
----------------------------------------
stream 4 of 5:
----- common ----------
bit_rate: 15625
bits_per_coded_sample: 0
bits_per_raw_sample: 0
codec_id: 0x0 (NONE)
codec_tag: 0
extradata_size: 0
level: -99
profile: -99
sample_rate: 0
----- Subtitle Stream ----------
----------------------------------------
stream 5 of 5:
----- common ----------
bit_rate: 33862
bits_per_coded_sample: 0
bits_per_raw_sample: 0
codec_id: 0x0 (NONE)
codec_tag: 0
extradata_size: 0
level: -99
profile: -99
sample_rate: 0
----- Subtitle Stream ----------