
Recherche avancée
Autres articles (60)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
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 (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)
Sur d’autres sites (4643)
-
Mp4 Video File not playing after downloading using Content Disposition php but it plays when it streams directly from the server
1er juin 2021, par Razor RasshI'm trying to combine a video and audio file using the FFMPEG and it worked successfully for me. The FFMPEG successfully created the MP4 file in the target destination folder. When I'm trying to download the Video file from the destination folder using Content-Disposition in Php. The server successfully downloads the Video file from the exact target folder.


The problem is that when I'm trying to play the video using VLC or any other player, nothing happened. The VLC player just launched and do nothing. I checked the downloaded file size with the video file located on the server and found that they both are the same size.


The code I used for creating Video file and content disposition is,



 $downloadFolderPath = "/var/www/html/temp/{$downloadFolderName}";
 $result = mkdir($downloadFolderPath, 0777); 
 $downloadFileName = "$downloadFolderPath/$filename";
 //echo $downloadFileName;
 $command = $ffmpeglocation." -i $audio_link -i $link -c:v copy -c:a aac -preset fast -crf 20 $downloadFileName 2>&1";
 shell_exec($command);

 $file=fopen($downloadFileName,'r');
 header("Content-Type:video/mp4");
 
 header("Content-Disposition: attachment; filename=$filename");
 
 header('Content-Description: File Transfer');
 header('Content-Type: application/octet-stream');
 
 header('Content-Disposition: attachment; filename="'.basename($downloadFileName).'"');
 header('Expires: 0');
 header('Cache-Control: must-revalidate');
 header('Pragma: public'); 
 header('Content-Length: ' . filesize($downloadFileName)); 
 flush(); // Flush system output buffer
 readfile($downloadFileName); 
 die();



The above code did its purpose by properly downloading the video file hosted on the server. But after downloading, the video file is not playing. I tried to access the file directly through the URL of the file in the browser and it plays fluently in the browser.


Help me out. Sorry for the bad english.


-
Discord.py music_cog, bot joins channel but plays no sound
20 juin 2021, par OzzyI have started using python a week ago or so. I have watched all the related videos on YT and checked google pages etc. But still no luck. My bot perfectly joins to the voice channel and when i use play it downloads and presumebly starts the play function but there is no sound or anything, it just joins and waits 1-2 mins then leaves with timeout error.


from discord.ext import commands
import logging

from youtube_dl import YoutubeDL

logging.basicConfig(level=logging.INFO)


class music_cog(commands.Cog):
 def __init__(self, bot):
 self.bot = bot

 # all the music related stuff
 self.is_playing = False

 # 2d array containing [song, channel]
 self.music_queue = []
 self.YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True', 'no_warnings': 'False'}
 self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
 'options': '-vn'}

 self.vc = ""

 # searching the item on youtube
 def search_yt(self, item):
 with YoutubeDL(self.YDL_OPTIONS) as ydl:
 try:
 info = ydl.extract_info("ytsearch:%s" % item, download=False)['entries'][0]
 except Exception:
 return False

 return {'source': info['formats'][0]['url'], 'title': info['title']}

 def play_next(self):
 if len(self.music_queue) > 0:
 self.is_playing = True

 # get the first url
 m_url = self.music_queue[0][0]['source']

 # remove the first element as you are currently playing it
 self.music_queue.pop(0)

 self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 else:
 self.is_playing = False

 # infinite loop checking
 async def play_music(self):
 if len(self.music_queue) > 0:
 self.is_playing = True

 m_url = self.music_queue[0][0]['source']

 # try to connect to voice channel if you are not already connected

 if self.vc == "" or not self.vc.is_connected() or self.vc == None:
 self.vc = await self.music_queue[0][1].channel.connect()
 else:
 await self.vc.move_to(self.music_queue[0][1])

 print(self.music_queue)
 # remove the first element as you are currently playing it
 self.music_queue.pop(0)

 self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 else:
 self.is_playing = False

 @commands.command(name="play", help="Plays a selected song from youtube")
 async def p(self, ctx, *args):
 query = " ".join(args)

 voice_channel = ctx.author.voice
 if voice_channel is None:
 # you need to be connected so that the bot knows where to go
 await ctx.send("Connect to a voice channel!")
 else:
 song = self.search_yt(query)
 if type(song) == type(True):
 await ctx.send(
 "Could not download the song. Incorrect format try another keyword. This could be due to playlist or a livestream format.")
 else:
 await ctx.send("Song added to the queue")
 self.music_queue.append([song, voice_channel])

 if self.is_playing == False:
 await self.play_music()

 @commands.command(name="queue", help="Displays the current songs in queue")
 async def q(self, ctx):
 retval = ""
 for i in range(0, len(self.music_queue)):
 retval += self.music_queue[i][0]['title'] + "\n"

 print(retval)
 if retval != "":
 await ctx.send(retval)
 else:
 await ctx.send("No music in queue")

 @commands.command(name="skip", help="Skips the current song being played")
 async def skip(self, ctx):
 if self.vc != "" and self.vc:
 self.vc.stop()
 await ctx.send("Stopped!")
 # try to play next in the queue if it exists
 await self.play_music()
 await ctx.send("Skipped!")


def setup(bot):
 bot.add_cog(music_cog(bot))



I enabled logs to be sure, when it connects there's just that info :


INFO:discord.voice_client:Connecting to voice... | INFO:discord.voice_client:Starting voice handshake... (connection attempt 1)


I have also checked FFMPEG and its Path, tried different codes and methods but even though they work there is no sound. Also I installed discord.py[voice] too.


I appreciate help already, thanks.


-
webm Video file is around 1GB (expected to be 45 minutes), but only plays 5 minutes and stops. how to repair with ffmpeg ?
25 juillet 2021, par AcidMicrowaveI have a .webm video file that is expected to be 45 minutes (this is how long the recording was). It was 45mins of 720p and the filesize is around 1GB.


The video file stops playing after 5 minutes. When I tried converting it with ffmpeg, to see if there is any damage, the conversion happens, but only the first 5 minutes are output with a 30MB file. During conversion, the console shows the following warnings :




[webm @ 0x7ffa2181f000] Non-monotonous DTS in output stream 0:1 ; previous : 299933, current : 299893 ; changing to 299933. This may result in incorrect timestamps in the output file.






[webm @ 0x7ffa2181f000] Non-monotonous DTS in output stream 0:1 ; previous : 299933, current : 299913 ; changing to 299933. This may result in incorrect timestamps in the output file.






[libopus @ 0x7ffa2180f800] Queue input is backward in time




(These errors appear many many many times..... I assume over 1000x.. are these corrupted frames ?)


I would appreciate any help,


Thank you very much.