Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (53)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 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 (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 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 (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (11151)

  • 2023-04-18 18:25:05 INFO discord.player ffmpeg process ##### successfully terminated with return code of 0

    19 avril 2023, par I_am_thing

    I 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 pipe related issues

    7 décembre 2015, par Ranjit Aneesh

    I am new to FFmpeg and have very little knowledge of different codecs.

    I am using pipes to provide input and to send out output from FFmpeg

    The command I use is essentially

    ffmpeg -i pipe:0  -f flv pipe:1

    I am using a Java program that basically provides an input stream as standard input (pipe:0), FFmpeg converts the video into the required format and sends out to standard output(pipe:1) from where I stream out to my remote location.

    My java program revolves around this piece of code, providing input and sending output as an output stream.

    Essentially my program does what it is supposed to, however I see that the final output video file is not of the complete duration. It is like 10 sec duration, and my sample video is 21 mins ! Also it is missing audio.

    Do I need to provide more info to FFmpeg ?

    EDIT : When I replace the pipe with an input file and an output file,the output is generated correctly without any issues, when I use pipes the size of the file is still larger compared to original. Just in case if it helps to diagnose.

    FFmpeg version SVN-r23418, Copyright (c) 2000-2010 the FFmpeg developers
    built on Jun 2 2010 04:12:01 with gcc 4.4.2
    configuration : —target-os=mingw32 —enable-runtime-cpudetect —enable-avisynth —enable-gpl —enable-version3 —enable-bzlib —enable-libgsm —enable-libfaad —enable-pthreads —enable-libvorbis —enable-libtheora —enable-libspeex —enable-libmp3lame —enable-libopenjpeg —enable-libxvid —enable-libschroedinger —enable-libx264 —extra-libs=’-lx264 -lpthread’ —enable-libopencore_amrwb —enable-libopencore_amrnb —enable-librtmp —extra-libs=’-lrtmp -lssl -lcrypto -lws2_32 -lgdi32 -lwinmm -lcrypt32 -lz’ —arch=x86 —cross-prefix=i686-mingw32- —cc=’ccache i686-mingw32-gcc’ —enable-memalign-hack
    libavutil 50.16. 0 / 50.16. 0
    libavcodec 52.72. 1 / 52.72. 1
    libavformat 52.67. 0 / 52.67. 0
    libavdevice 52. 2. 0 / 52. 2. 0
    libavfilter 1.20. 0 / 1.20. 0
    libswscale 0.11. 0 / 0.11. 0
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’pipe:0’ :
    Metadata :
    major_brand : isom
    minor_version : 1
    compatible_brands : isom
    title :
    artist :
    date :
    album :
    comment :
    Feedback :
    genre :
    Duration : 00:21:46.63, start : 0.000000, bitrate : N/A
    Stream #0.0(und) : Video : h264, yuv420p, 512x288 [PAR 1:1 DAR 16:9], 403 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Stream #0.1(und) : Audio : aac, 44100 Hz, mono, s16, 47 kb/s
    Output #0, flv, to ’pipe:1’ :
    Metadata :
    encoder : Lavf52.67.0
    Stream #0.0(und) : Video : flv, yuv420p, 512x288 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 1k tbn, 25 tbc
    Stream #0.1(und) : Audio : libmp3lame, 44100 Hz, mono, s16, 64 kb/s
    Stream mapping :
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1

  • Does android support .m4a metadata ?

    23 octobre 2016, par David Barishev

    Im using taglib-sharp-portable to tag audio files in my app. My audio files are .acc, which are inboxed in a .m4a format.
    I have no option but to use this format, since i’m extracting the audio from a Video file (.mp4/.webm), based on using this SO answer. I can’t re encode the music stream, since it will take a lot of time on an cellular device.
    The problem i’m facing is that the music player doesn’t recognize the tags, even though they are tagged correctly. If i pull the file from the device, and view it on my Windows PC, i can see the tags fine.

    Here is the code im using to tag the file :

    public static async Task tagFile(File musicFile, string name, string songID, Context c, SongDownloadNotification nf = null)
    {
               var imageFilePath = await DownloadThumbnailImage(songID, c, nf);
               string[] songDetails = GetSongDetails(name);

               Log.Verbose(tag, "Exstraced song Details. Artist Name: {0}, Song Name: {1}", songDetails[0], songDetails[1]);

               var fsMusic = new System.IO.FileStream(
                   musicFile.CanonicalPath,
                   System.IO.FileMode.Open,
                   System.IO.FileAccess.ReadWrite,
                   System.IO.FileShare.ReadWrite,
                   4096,
                   true);

               TagLib.File tagFile = TagLib.File.Create(new TagLib.StreamFileAbstraction(musicFile.CanonicalPath, fsMusic, fsMusic));

               tagFile.Tag.Clear();

               tagFile.Tag.Performers = new[] { songDetails[0] };
               tagFile.Tag.AlbumArtists = new[] { songDetails[0] };
               tagFile.Tag.Title = songDetails[1];
               tagFile.Tag.Album = songDetails[1];

               var fsImage = new System.IO.FileStream(
                   imageFilePath,
                   System.IO.FileMode.Open,
                   System.IO.FileAccess.ReadWrite,
                   System.IO.FileShare.ReadWrite,
                   4096,
                   true);

               tagFile.Tag.Pictures = new[] { new TagLib.Picture(new TagLib.StreamFileAbstraction(musicFile.CanonicalPath, fsImage, fsImage)) };

               tagFile.Save();
               Log.Debug(tag, "Succesfully added tags to file");

               fsMusic.Close();
               fsImage.Close();

               if (!new File(imageFilePath).Delete())
                   Log.Warn(tag, "Couldnt delete tmp file");
               else
                   Log.Verbose(tag, "Deleted thumbnail file succesfully");
    }

    These question came to me :

    • Is my choice of encapsulating the raw .acc file in .m4a file good ? The format im looking into, is audio only, is .m4a overkill for it ?
    • Does android support reading tags of .m4a file ? If so what did i do wrong with my code ?If not, how can i add tags to .acc ( or some other ’parent’ format), that android supports, and i would not need to re encode it ?