
Recherche avancée
Médias (1)
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (111)
-
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 -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (10337)
-
Play h.264 video stream in html page
12 juin 2017, par e2l3nI am using ffmpeg and vlc on linux to produce MPEG transport stream (
mpegts
) over HTTP. Basicallyffmpeg
captures the screen and producesh.264
stream usingmpegts
and thenvlc
is used as a server that delivers the stream overhttp
. That’s how I manage to accomplish this.ffmpeg -f x11grab -s 1280x800 -r 30 -i :0.0+0,0 -f alsa -ac 2 -i pulse -vcodec libx264 -preset ultrafast -s 1280x800 -threads 0 -f mpegts - | vlc -I dummy - --sout '#std{access=http,mux=ts,dst=:3030}
And some useful log about the resulting stream :
Output #0, mpegts, to 'pipe:':
Metadata:
encoder : Lavf57.72.101
Stream #0:0: Video: h264 (libx264), yuv444p(progressive), 1280x800, q=-1--1, 30 fps, 90k tbn, 30 tbc
Metadata:
encoder : Lavc57.96.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
Metadata:
encoder : Lavc57.96.101 mp2All looks good except for that I am unable to play the stream in a HTML page. Could someone point me at some solution to either render the stream in HTML page or change the stream type so that it gets rendered.
Thank you in advance !EDIT :
I’ve noticed something weird. The<video></video>
fails to play mp4 files on Firefox (51.0.1) for Ubuntu (I have also tested on Windows 8 with Chrome).
I simply useffmpeg
to record screen for 10 seconds and produce .mp4 video (see below).ffmpeg -video_size 1280x800 -framerate 25 -f x11grab -i :0.0+0,0 -t 00:00:10 ~/Workspace/videostream/output.mp4
And then play the output.mp4 video with the following snippet.
<video width="480" height="320" controls="controls">
<source src="output.mp4" type="video/mp4">
</source></video>This simply does not play although I can open the video with any other media player. The media info (using MediaInfo, v0.7.96) of the
output.mp4
file is :GENERAL: MPEG-4 (Base Media): 1.007 MiB, 10s 0ms; 1 Video stream: AVC; Overall bit rate: 825 Kbps; Writing application: Lavf57.72.101
VIDEO: 2 343 Kbps, 1280*800(16:10), at 25.000 fps, MPEG Video (Version 2) (Main@High 1440)However, if I replace the
output.mp4
with any other.mp4
file, it does play in Firefox. So, this leads me to conclude that it is not a browser issue but something with the way I exploitffmpeg
. Below is the media info of a proper.mp4
file that successfully runs in the browser.GENERAL: MPEG-4 (Base Media/Version 2): 48.4 MiB, 2mn 50s; 1 Video stream: AVC; 1 Audio stream: AAC; Overall bit mode rate: Variable; Overall bit rate: 2 385 Kbps;
VIDEO: 2 256 Kbps, 1280*720(16:9), at 25.000 fps, AVC (Main@L3.1) (CABAC / 3 Ref Frames); ISO media produced by Google Inc.
AUDIO:
126 Kbps, 44.1 KHz, 2 channels, AAC (LC), ISO media produced by Google Inc.And here is the media info of the output file that results from redirecting the h.264 mpegts stream using the
ffmpeg
command with -pix_fmt yuv420p./ffmpeg -t 00:00:10 -f x11grab -s 1280x800 -r 30 -i :0.0+0,0 -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -s 1280x800 -threads 0 -f mpegts - > ~/Workspace/file.ts
:GENERAL: MPEG-TS: 2.93 MiB, 9s 960ms; 1 Video stream: MPEG Video; 1 Menu stream: MPEG Video; Overall bit rate mode: Variable; Overall bit rate: 2 465 Kbps;
VIDEO: 2 343 Kbps, 1280*800(16:10), at 25.000 fps, MPEG Video (Version 2) (Main@High 1440) -
Video play in slow motion while converting webm file to mp4 using ffmpeg
14 novembre 2019, par Hardik KothariI am using ffmpeg-static-electron in electron app for converting webm file to mp4 and that file will be play in mobile app as android and ios.
Here I am using ffmpeg command for converting webm file to mp4.
await execa(ffmpegPath, [
'-i',
inputPath,
'-f',
'mp4',
'-vcodec','libx264', // video codec
'-acodec','aac', // audio codec
'-b:v', '6400k', // video bitrate
'-b:a', '4800k', // audio bitrate
'-strict', 'experimental', // standard
'-r',
'30000/1001',
'-crf',
'26',
'-g',
'16',
'-movflags',
'faststart',
'-preset',
'veryfast',
outputPath,
])I used ’-g’ to 16 for solving a dragging progress issue in android player but it increasing the app size.
Here you can check it out this https://video.stackexchange.com/questions/21892/why-cant-my-video-play-from-where-i-drag-the-playback-barSome time It is working fine but some time sound coming through garbled and sounded like robot with slow-motion video
Here is log file for normal video :https://textuploader.com/1o1mlI want a best conversion (WebM to Mp4) with lower file size.Anyone please help.
-
Discord bot cannot play youtube video for more than 60sec
18 octobre 2020, par Antoine WeberA few weeks back I started a discord bot as a side project for fun.
Since yesterday i've been trying to allow my bot to search youtube videos and play them in voice channels (mostly for songs).


The bot correctly searches youtube with the query and finds the youtube video, starts playing it, but for some reason, after 60 sec (no matter of the video, always the same time), the bot suddenly provides no more audio, and then gets stuck somewhere (not a single error message, but the bots just stops responding).


Here are the code snippets :


# first two words are activation keywords for the bot, then its the youtube query
query = ' '.join(message.message.content.split()[2:])
youtube = build("youtube", "v3", developerKey=yt_token)
search_response = youtube.search().list(q=query, part="id,snippet", maxResults=5).execute()
video_id = search_response['items'][0]['id']['videoId']
video_url = "https://www.youtube.com/watch?v=" + video_id

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([video_url])
await play_audio(message, 'song.mp3')



(I delete the song.mp3 after playing)


my ydl options are


ydl_opts = {
 "postprocessors":[{
 "key": "FFmpegExtractAudio", # download audio only
 "preferredcodec": "mp3", # other acceptable types "wav" etc.
 "preferredquality": "192" # 192kbps audio
 }],
 "format": "bestaudio/best",
 "outtmpl": "song.mp3"
}



and also my play_audio function is


async def play_audio(message, audio_name):
 channel = message.message.author.voice.channel
 vc = await channel.connect()
 time.sleep(0.5)
 vc.play(discord.FFmpegPCMAudio(audio_name))
 while vc.is_playing():
 time.sleep(1)
 vc.stop()
 await vc.disconnect()



I know the time.sleep() call is blocking but I don't really core for now.


Any one had this issue ? For short videos (less than 60sec), everything works fine. Maybe an ffmpeg option ?