
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (79)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
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 (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (11638)
-
discord bot music with youtube dl not stuck at webpage downloading
22 septembre 2021, par patricebailey1998So I'm trying to make a music bot which just joins,plays,stops and resume music. However my bot can join and leave a voice channel fine, however when i do my /play command it get stuck on
[youtube] oCveByMXd_0: Downloading webpage
(this is output in vscode) and then does nothing after. I put some print statement (which you can see in the code below and it prints 1 and 2 but NOT 3). Anyone had this issue ?

MUSIC BOT FILE


import discord
from discord.ext import commands
import youtube_dl

class music(commands.Cog):
 def __init__(self, bot):
 self.bot = bot
 
 @commands.command()
 async def join(self, ctx):
 if(ctx.author.voice is None):
 await ctx.reply("*You're not in a voice channel.*")
 voiceChannel = ctx.author.voice.channel
 if(ctx.voice_client is None): # if bot is not in voice channel
 await voiceChannel.connect()
 else: # bot is in voice channel move it to new one
 await ctx.voice_client.move_to(voiceChannel)

 @commands.command()
 async def leave(self, ctx):
 await ctx.voice_client.disconnect()
 
 @commands.command()
 async def play(self,ctx, url:str = None):
 if(url == None):
 await ctx.reply("*Check your arguments!*\n```/play VIDEO_URL```")
 else:
 ctx.voice_client.stop() # stop current song
 
 # FFMPEG handle streaming in discord, and has some standard options we need to include
 FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
 YTDL_OPTIONS = {"format":"bestaudio"}
 vc = ctx.voice_client
 
 # Create stream to play audio and then stream directly into vc
 with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:
 info = ydl.extract_info(url, download=False)
 print("1")
 url2 = info["formats"][0]["url"]
 print("2")
 source = await discord.FFmpegOpusAudio.from_probe(url2,FFMPEG_OPTIONS)
 print("3")
 vc.play(source) # play the audio
 await ctx.send(f"*Playing {info['title']} -* ퟎ
-
How to Download YouTube Videos in 1080p with English Subtitles Using yt-dlp with Python 3
30 juillet 2024, par edge selcukI am trying to download YouTube videos using
yt-dlp
in Python 3.9. I want to download videos in 1080p quality and if 1080p is not available, it should download the best available quality. The audio and video files should be merged into a single MP4 file, and I haveffmpeg
installed to handle the merging process.

Here is my script :


import os
import sys
from yt_dlp import YoutubeDL

def download_video(url):
 output_dir = r"/path" # Update this path

 # Ensure the output directory exists
 if not os.path.exists(output_dir):
 os.makedirs(output_dir)
 
 ydl_opts = {
 'format': '(bestvideo[height<=1080][ext=mp4]/bestvideo)+bestaudio/best',
 'merge_output_format': 'mp4',
 'write_auto_sub': True,
 'writesubtitles': True,
 'subtitleslangs': ['en'],
 'subtitlesformat': 'vtt',
 'embedsubtitles': True,
 'outtmpl': os.path.join(output_dir, '%(title)s.%(ext)s'),
 'postprocessors': [{
 'key': 'FFmpegVideoConvertor',
 'preferedformat': 'mp4',
 }],
 }

 with YoutubeDL(ydl_opts) as ydl:
 ydl.download([url])

if __name__ == "__main__":
 if len(sys.argv) != 2:
 print("Usage: python download_video.py ")
 sys.exit(1)

 youtube_url = sys.argv[1]
 download_video(youtube_url)



This script successfully downloads the video in 1080p quality or the best available quality and merges the audio and video files as intended. However, it does not download the subtitles as intended.


I have
ffmpeg
installed for merging the video and audio files. How can I modify this script to ensure that English subtitles are downloaded and embedded in the video file ?

-
Can not get frames from youtube video using FFmpegMediaMetadataRetriever
27 juin 2019, par Ahasan RatulI have been trying to extract a frame from a youtube video using FFmpegMediaMetadataRetriever in my android studio project. whenever I use the youtube url inside setDataSource, the app crashes. I am totally new in android studio and haven’t worked with FFmpeg before. I would appreciate if anyone can help me out. Also, I am sorry if I have asked a really silly/easy question.
import wseemann.media.FFmpegMediaMetadataRetriever;
.....
private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS: {
Log.i(TAG, "OpenCV loaded successfully");
mOpenCvCameraView.enableView();
try {
initializeOpenCVDependencies();
} catch (IOException e) {
e.printStackTrace();
}
}
break;
default: {
super.onManagerConnected(status);
}
break;
}
}
};
private void initializeOpenCVDependencies() throws IOException {
tick =0;
//extract frame at 2 second using FFmpegMediaMetadataRetriever
FFmpegMediaMetadataRetriever mmr = new FFmpegMediaMetadataRetriever();
mmr.setDataSource("https://youtu.be/f-ehTcWC6dc");
Bitmap b = mmr.getFrameAtTime(2000000, FFmpegMediaMetadataRetriever.OPTION_CLOSEST);
mmr.release();
objMat = new MatOfPoint2f();
sceneMat = new MatOfPoint2f();
obj_corners = new Mat(4, 1, CvType.CV_32FC2);
img = new Mat();
img2 = new Mat();
}in the build.gradle, I have added the following dependencies
dependencies {
//FFmpegMediaMetadataRetriever dependencies
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.14'
implementation project(path: ':openCVLibrary340dev')
}error that I get is :
E/AndroidRuntime : FATAL EXCEPTION : main
Process : com.example.jeverfun, PID : 8877
java.lang.RuntimeException : Unable to resume activity com.example.jeverfun/com.example.jeverfun.jevercamera : java.lang.IllegalArgumentException : setDataSource failed : status = 0xFFFFFFFF
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3581)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by : java.lang.IllegalArgumentException : setDataSource failed : status = 0xFFFFFFFF
at wseemann.media.FFmpegMediaMetadataRetriever.setDataSource(Native Method)
at com.example.jeverfun.jevercamera.initializeOpenCVDependencies(jevercamera.java:373)
at com.example.jeverfun.jevercamera.access$100(jevercamera.java:59)
at com.example.jeverfun.jevercamera$1.onManagerConnected(jevercamera.java:347)
at com.example.jeverfun.jevercamera.onResume(jevercamera.java:469)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
at android.app.Activity.performResume(Activity.java:7117)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
I/MediaMetadataRetrieverJNI : release
Application terminated.