
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (32)
-
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...) -
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 (3186)
-
`ffmpeg -f concat` don't work when all input streams appear to have the same spec
2 octobre 2024, par RoyMy
ffmpeg
command :

ffmpeg -safe 0 -f concat -i list.txt -c copy out.mp4



My 1st input file :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Applications\ffmpeg_6.0_full\a.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:04.97, start: 0.000000, bitrate: 40 kb/s
 Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 27 kb/s, 30 fps, 30 tbr, 30k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264



My 2nd input file :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Applications\ffmpeg_6.0_full\b.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp41isom
 creation_time : 2023-03-08T06:47:13.000000Z
 artist : Microsoft Game DVR
 title : PUBG: BATTLEGROUNDS
 Duration: 00:10:00.16, start: 0.000000, bitrate: 20885 kb/s
 Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 20739 kb/s, 30 fps, 30 tbr, 30k tbn (default)
 Metadata:
 creation_time : 2023-03-08T06:47:13.000000Z
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 131 kb/s (default)
 Metadata:
 creation_time : 2023-03-08T06:47:13.000000Z
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]



The above command outputs some warning signals :


[mov,mp4,m4a,3gp,3g2,mj2 @ 0000025239902d40] Auto-inserting h264_mp4toannexb bitstream filter
[mp4 @ 00000252396fe5c0] Non-monotonous DTS in output stream 0:1; previous: 218112, current: 150024; changing to 218113. This may result in incorrect timestamps in the output file.
...
a lot of them
...
frame=25992 fps=21754 q=-1.0 Lsize= 1519621kB time=00:14:49.39 bitrate=13996.8kbits/s speed= 744x
video:9649kB audio:1519216kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown



The resultant video can play the first part of the video correctly, then the video players either skips directly to the end of the video (MPC-HC), or don't render anything at all while timer passes as normal (VLC).


My impression of the concat is that it requires all videos to have the same spec, which I think my input achieved (all the "Steam #0:0", etc, line matches). I only see the following difference, which I assumed that should be okay :


- 

- Metadata are different both for the whole input (e.g. "major_brand") and for each stream (e.g. "encoder"). I assumed that metadata won't affect the processing.
- The order of video/audio streams are different in the two inputs : the 1st input file has audio then video ; the 2nd input file has video then audio. I assumed that ffmpeg knows the difference and won't concat a video stream to an audio stream.






The full output of the command can be found in this pastebin : https://pastebin.com/Z5q97Uyg


-
avcodec/sanm : better frame size detection for old codecs
11 mars, par Manuel Laussavcodec/sanm : better frame size detection for old codecs
The size of the video frame (FOBJ) of the old codecs (ANIMv0/1/2) can
very reliably be determined :ANIMv0/1 (=Rebel Assault 1) uses a 384x242 internal buffer for
everything. The codec parameters only describe the size and offset
of the specific FOBJ on that buffer.ANIMv2 titles usually use one of the fullscreen codecs (37/47/48)
as first FOBJ, and their dimensions can generally be trusted.RA2 uses 424x260 as internal buffer, use that if encountered :
08PLAY.SAN does not use codec37 so we need to guess using the
codec coordinates.ignore sizes smaller than 2x2 or larger than 800x600.
some game videos have an initial fobj with either 1x1 or -1x-1
pixels in size, ignore them with a warning (Full Throttle
and the Rebel Assault 2 xxRETRY.SAN videos).Once a known/valid dimension set has been discovered, use it and
don't change it for subsequent FOBJs, rather clamp the large frame
to the determined dimensions.Tested with RA1, RA2, Full Throttle, Dig, Outlaws, SotE and MotS
videos.Signed-off-by : Manuel Lauss <manuel.lauss@gmail.com>
-
ffmpeg doesn't work, when starting up it doesn't play music, it gives errors
14 août 2024, par Оля Михееваimport discord
from discord import FFmpegPCMAudio
import os
import random
from gtts import gTTS
import asyncio

TOKEN="***"
VOICE_CHANNEL_ID=11122224444

class Voice_Bot(discord.Client):
 def __init__(self):
 intents = discord.Intents.default()
 intents.message_content = True
 intents.voice_states=True
 super().__init__(intents=intents)
 print(os.getcwd())
 self.sounds_hello = os.listdir(os.path.join('sounds','hello'))
 self.sounds_bye = os.listdir('sounds\\bye')
 self.sounds = os.listdir('sounds\\nature')

 async def on_ready(self): 
 self.voice_channel = self.get_channel(VOICE_CHANNEL_ID) 
 if self.voice_channel == None:
 print('Не удалось подключиться к голосовому каналу.')
 return
 self.voice_client = await self.voice_channel.connect()
 print('Бот подключен к голосовому каналу')
 await self.text_to_speech("Lets play Guess the Tune")
 
 async def on_message(self,message):
 if message.author==self.user:
 return
 if message.content.startswith("game"):
 await self.text_to_speech("let's start the game guess the melody")
 music=os.listdir("sounds\\music")
 self.melody=random.choice(music)
 await self.play_sound(f"sounds\\music\\{self.melody}")
 elif message.content==self.melody[0:len(self.melody)-4]:
 if (self.voice_client.is_playing()):
 self.voice_client.stop()
 await self.text_to_speech(f"Congratulations, {message.author.name} answered correctly! To continue, type game")
 else:
 if (self.voice_client.is_playing()):
 self.voice_client.stop()
 await self.text_to_speech(f"Unfortunately, {message.author.name} did not guess. To continue, write game")


 async def on_voice_state_update(self,member,before,after):
 if member.id ==self.user.id:
 print('Someone entered or left the voice channel.')
 else:
 try:
 if before.channel == None:
 print(f'{member.name} entered the voice channel {after.channel}.')
 await self.play_sound(f'sounds\\hello\\{random.choice(self.sounds_hello)}')
 elif after.channel == None:
 print(f'{member.name} left the voice channel {before.channel}.')
 await self.play_sound(f'sounds\\bye\\{random.choice(self.sounds_bye)}')
 except Exception as e:
 print(f"Error in on_voise_state_update: {e}")

 async def text_to_speech(self,text):
 try:
 tts = gTTS(text=text, lang ="en")
 tts.save("text.mp3")
 except Exception as e:
 print(f"Error e: {e}")
 await self.voice_channel.send(text)
 await self.play_sound("text.mp3")

 def play_sound(self,path):
 print(path)
 source=discord.FFmpegPCMAudio(source=path, executable="ffmpeg\\bin\\ffmpeg.exe")
 if (self.voice_client.is_playing()):
 self.voice_client.stop()
 self.voice_client.play(source) 

client = Voice_Bot()
client.run(TOKEN)



[enter image description here](https://i.sstatic.net/ys8Xza0w.jpg)