
Recherche avancée
Autres articles (37)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, 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 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (5196)
-
2023-04-18 18:25:05 INFO discord.player ffmpeg process ##### successfully terminated with return code of 0
19 avril 2023, par I_am_thingI am making a discord music bot with discord.py and ctx, it uses Spotify


I am using FFmpeg for my music feature. This is my !play code


client_id = ''
client_secret = ''
client_credentials_manager = SpotifyClientCredentials(client_id=client_id, client_secret=client_secret)
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)

bot.volume = 0.5 # initial volume of the bot (can be changed)

@bot.command()
async def play(ctx, *, track_query):
 # check if the query is a valid Spotify link
 if 'open.spotify.com/track/' in track_query:
 track_id = track_query.split('/')[-1] # extract the track ID from the link
 else:
 # search for tracks with the given name
 track_results = sp.search(q=track_query, type='track', limit=1)
 if len(track_results['tracks']['items']) == 0:
 await ctx.send(f'Sorry, I could not find any track with the name "{track_query}".')
 return
 track_id = track_results['tracks']['items'][0]['id'] # get the track ID for the first search result
 track_info = sp.track(track_id) # get the track information for the given ID
 track_name = track_info['name']
 track_artist = track_info['artists'][0]['name']
 track_duration = time.strftime('%M:%S', time.gmtime(track_info['duration_ms']//1000))
 track_preview_url = track_info['preview_url'] # get the preview URL for the track
 if track_preview_url is None:
 await ctx.send(f'Sorry, the track "{track_name}" by {track_artist} cannot be played.')
 return
 voice_channel = ctx.author.voice.channel
 if voice_channel is None:
 await ctx.send('Please join a voice channel first.')
 return
 voice_client = await voice_channel.connect()
 audio_source = discord.FFmpegPCMAudio(track_preview_url, options="-b:a 128k -bufsize 512k")
 voice_client.play(audio_source, after=lambda e: print('Player error: %s' % e) if e else None)
 voice_client.source = discord.PCMVolumeTransformer(voice_client.source)
 voice_client.source.volume = bot.volume

 # format the embed message
 embed = discord.Embed(title=track_name, description=track_artist, color=0xff8c00)
 embed.add_field(name='Duration', value=track_duration, inline=True)
 embed.set_thumbnail(url=track_info['album']['images'][0]['url'])
 embed.set_footer(text='This music is from https://www.spotify.com/')
 await ctx.send(embed=embed)

 while voice_client.is_playing():
 await asyncio.sleep(1)
 await voice_client.disconnect()



I joined the unofficial ffmpeg discord server no one could find a fix I searched for ages and I couldn't fix it


-
FFMPEG/DASH-LL creates audio and video chunks at different rates ; player is confused (404 errors)
26 mai 2021, par DannyI'm trying to create a MPEG-DASH "live" stream from a static file to test various low latency modes. The DASH muxer in FFmpeg creates two AdaptationSets, one for video chunks and one for audio chunks.


However, the audio and video chunk files are not created at the same rate (should they be ?). ie, here
stream0
are the video chunks andstream1
are the audio chunks. After a few seconds of running, the webroot directory contains :

chunk-stream0-00001.m4s chunk-stream1-00001.m4s 
chunk-stream0-00002.m4s chunk-stream1-00002.m4s 
chunk-stream0-00003.m4s chunk-stream1-00003.m4s 
chunk-stream0-00004.m4s chunk-stream1-00004.m4s 
 chunk-stream1-00005.m4s 
 chunk-stream1-00006.m4s 
 chunk-stream1-00007.m4s 
 chunk-stream1-00008.m4s 
 chunk-stream1-00009.m4s 
master.mpd 
init-stream0.m4s 
init-stream1.m4s 



The stream doesn't load (or play) on either
dash.js
or shaka-player and there are lots of404 (Not Found)
errors for the video chunks. The player is requesting chunks from both stream0 and stream1 in sequence, ie, stream0-001 + stream1-001, then stream0-002 + stream1-002 and so on.

But since stream0 only goes from 001 to 004, there are lots of 404 errors as it tries to load stream0-005 through 009.


The gap gets wider after letting FFmpeg run for a while. eg, stream0 is 62 to 75 but stream1 is 174 to 187. Reloading the player page at this point fails with
dash.all.debug.js:15615 [2055][FragmentController] No video bytes to push or stream is inactive.
and shows 404 errors stream0 chunk 188 (which doesn't exist yet !)



The FFmpeg command was adopted from DASH streaming from the top-down :


ffmpeg -re -i /mnt/swdevel/TestStreams/H264/ThreeHourMovie.mp4 \
-c:v libx264 -x264-params keyint=120:scenecut=0 -b:v 1M -c:a copy \
-f dash -dash_segment_type mp4 \
 -seg_duration 2 \
 -target_latency 3 \
 -frag_type duration \
 -frag_duration 0.2 \
 -window_size 10 \
 -extra_window_size 3 \
 -streaming 1 \
 -ldash 1 \
 -use_template 1 \
 -use_timeline 0 \
 -write_prft 1 \
 -fflags +nobuffer+flush_packets \
 -format_options "movflags=+cmaf" \
 -utc_timing_url "/pelican/testPlayers/time.php" \
 master.mpd



And the
dash.js
player code is very simple :

const srcUrl = "../ottWebRoot/playerTest/master.mpd"; 

var player = dashjs.MediaPlayer().create();

let autoPlay = false;
player.initialize(document.querySelector("#videoTagId"), srcUrl, autoPlay);

player.updateSettings(
{
 streaming :
 {
 lowLatencyEnabled : true,
 liveDelay : 2,
 jumpGaps : true,
 jumpLargeGaps : true,
 smallGapLimit : 1.5,
 }
});



To provide the
UTCTiming
element in the manifest, the smalltime.php
URL returns a UTC time from the web server :

<?php
 print gmdate("Y-m-d\TH:i:s\Z");
?>



(It also shows 404 errors for the latest stream1/audio chunk, that's likely a different problem)


I'm not sure what to try next. Any and suggestions greatly appreciated.


EDIT I


The suggestion by @Anonymous Coward to change the key interval improved things a lot. The chunks for stream0 and stream1 are in lock-step and have identical sequence numbers.


However, there are still many 404 errors, both on initial page load (without pressing play) and during playback.


I ran
watch -n 1 ls -lt code> and compared side-by-side to the errors in the browser console. It's hard to compare but it <em>looks</em> like the browser is trying to fetch files "on the play edge" which haven't yet been created by FFmpeg. See the pic below.


How do I instruct the browser to wait just a bit more before fetching the edge chunks ?




EDIT II


Using
shaka-player
instead ofdash.js
plays properly without 404 errors. Configured as :

player.configure(
 {
 streaming: 
 {
 lowLatencyMode: true,
 inaccurateManifestTolerance: 0,
 rebufferingGoal: 0.1,
 }
 
 });



Client


- 

- MacOS 10.12
- dash.js latest 3.2.2
- Chrome 79, Safari 12, FireFox v ?








Server


- 

- Apache 2.4.37
- PHP 7.2.4 (for time function only)
- Centos 8








(For reference, here is the mpd file generated by FFmpeg)


<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" minimumupdateperiod="PT500S" availabilitystarttime="2021-05-24T14:50:00.263Z" publishtime="2021-05-24T15:22:45.335Z" timeshiftbufferdepth="PT50.0S" maxsegmentduration="PT2.0S" minbuffertime="PT5.0S">
 <programinformation>
 </programinformation>
 <servicedescription>
 <latency target="3000" referenceid="0"></latency>
 </servicedescription>
 <period start="PT0.0S">
 <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="24/1" maxwidth="1280" maxheight="682" par="15:8" lang="und">
 <resync dt="200000" type="0"></resync>
 <representation mimetype="video/mp4" codecs="avc1.64081f" bandwidth="1000000" width="1280" height="682" sar="1023:1024">
 <producerreferencetime inband="true" type="captured" wallclocktime="2021-05-24T14:50:00.263Z" presentationtime="0">
 <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>
 </producerreferencetime>
 <resync dt="5000000" type="1"></resync>
 <segmenttemplate timescale="1000000" duration="2000000" availabilitytimeoffset="1.800" availabilitytimecomplete="false" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 </segmenttemplate>
 </representation>
 </adaptationset>
 <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true" lang="und">
 <resync dt="200000" type="0"></resync>
 <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="116317" audiosamplingrate="48000">
 <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
 <producerreferencetime inband="true" type="captured" wallclocktime="2021-05-24T14:50:00.306Z" presentationtime="0">
 <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>
 </producerreferencetime>
 <resync dt="21333" type="1"></resync>
 <segmenttemplate timescale="1000000" duration="2000000" availabilitytimeoffset="1.800" availabilitytimecomplete="false" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 </segmenttemplate>
 </representation>
 </adaptationset>
 </period>
 <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>
</mpd>



-
Mp3 file not showing in any media player after creating through ffmpeg
4 mai 2019, par Aashit ShahMp3 file not showing in any application after the mp3 file is saved . After 15 odd minutes it is automatically shown . if i manually change the name from file manager it will be instantly shown . How to solve this problem .
Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
String[] projection = {
MediaStore.Audio.Media.TITLE,
MediaStore.Audio.Media.DATA,
MediaStore.Audio.Media.DISPLAY_NAME,
MediaStore.Audio.Media.DURATION,
MediaStore.Audio.Media.ALBUM_ID
};
String sortOrder = MediaStore.Audio.Media.DISPLAY_NAME
Cursor c = getContentResolver().query(uri,projection,null,null,sortOrder);
if(c.moveToFirst())
{
do {
String title = c.getString(c.getColumnIndex(MediaStore.Audio.Media.TITLE));
String data = c.getString(c.getColumnIndex(MediaStore.Audio.Media.DATA));
String name = c.getString(c.getColumnIndex(MediaStore.Audio.Media.DISPLAY_NAME));
String duration = c.getString(c.getColumnIndex(MediaStore.Audio.Media.DURATION));
String albumid= c.getString(c.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID));
Songs song = new Songs(title,data,name,duration,albumid);
songs.add(song);
title1.add(name);
}while (c.moveToNext());
}Output file path :
Environment.getExternalStorageDirectory()+ "/Trim"+".mp3";
This is my command :
"-y","-ss", start,"-i", input_path,"-t", end,"-metadata","title=Trim","-acodec", "copy","-preset", "ultrafast",output_path