Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (81)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (12438)

  • Discord audio playing issue

    24 avril 2022, par ItsNaif.

    Explanation

    


    I have this code that plays youtube video audio in voice channels.

    


    When it joins the channel I get an error that says "ffmpeg not found". I ran the terminal command "npm i ffmpeg-static" and it worked fine but after a couple of minutes I get a long error and the music stops playing.

    


    This is my code :

    


    client.on("ready", async () => {

  for (const channelId of Channels) {
    joinChannel(channelId);

    await new Promise(res => setTimeout(()=>res(2), 500))
  }
  
  function joinChannel(channelId) {
    client.channels.fetch(channelId).then(channel => {

      const VoiceConnection = joinVoiceChannel({
        channelId: channel.id,
        guildId: channel.guild.id,
        adapterCreator: channel.guild.voiceAdapterCreator
      });
      const resource = createAudioResource(ytdl("https://youtu.be/0J2gdL87fVs", {
          filter: "audioonly"
      }), {
        inlineVolume: true
      });
      resource.volume.setVolume(0.2);
      const player = createAudioPlayer()
      VoiceConnection.subscribe(player);
      player.play(resource);
      player.on("idle", () => {
        try {
          player.stop()
        }catch (e) {}
        try {
          VoiceConnection.destory()
        }catch (e) {}
        joinChannel(channelId)
      })
    }).catch(console.error)
  }
})


    


  • Trying to fix VPlayer's seeking ability, need some guidance [Android FFmpeg]

    1er juin 2016, par vxh.viet

    I’m trying to fix the currently broken seeking ability of VPlayer which is a FFmpeg player for Android. Being a Java developer, C code looks like alien language to me so can only fix it using common logic (which could make any C veteran have a good laugh).

    The relevant file is player.c and I’ll try my best to point out the relevant modification.

    So the basic idea is because FFmpeg’s av_seek_frame is very inaccurate even with AVSEEK_FLAG_ANY so I’m trying to follow this suggestion to seek backward to the nearest keyframe and then decode to the frame I want. One addition note is since I want to seek based on millisecond while the said solution show the way to seek by frame which is potentially a source of problem.

    In the Player I add the following fields :

    struct Player{
    ....
    AVFrame *frame;
    int64_t current_time_stamp;
    };

    In the player_read_from_stream I modify the seeking part as :

    void * player_read_from_stream(void *data) {
       ...
       struct DecoderData *decoder_data = data;
       int stream_no = decoder_data->stream_no;
       AVCodecContext * ctx = player->input_codec_ctxs[stream_no];
       ...
       // seeking, start my stuff
       if(av_seek_frame(player->input_format_ctx, seek_input_stream_number, seek_target, AVSEEK_FLAG_BACKWARD) >= 0){
           //seek to key frame success, now need to read every frame from the key frame to our target time stamp


           while(player->current_time_stamp < seek_target){

               int frame_done;

               while (av_read_frame(player->input_format_ctx, &packet) >= 0) {
                   if (packet.stream_index == seek_input_stream_number) {

                       avcodec_decode_video2(ctx, player->frame, &frame_done, &packet);
                       LOGI(1,"testing_stuff ctx %d", *ctx);
                       if (frame_done) {

                           player->current_time_stamp = packet.dts;
                           LOGI(1,"testing_stuff current_time_stamp: %"PRId64, player->current_time_stamp);
                           av_free_packet(&packet);
                           return;
                       }
                   }
                   av_free_packet(&packet);
               }
           }


       }
       //end my stuff

       LOGI(3, "player_read_from_stream seeking success");

       int64_t current_time = av_gettime();
       player->start_time = current_time - player->seek_position;
       player->pause_time = current_time;        
    }

    And in player_alloc_frames I allocate the memory for my frame as :

    int player_alloc_frames(struct Player *player) {
       int capture_streams_no = player->caputre_streams_no;
       int stream_no;
       for (stream_no = 0; stream_no < capture_streams_no; ++stream_no) {
           player->input_frames[stream_no] = av_frame_alloc();

           //todo: test my stuff
           player->frame = av_frame_alloc();
           //end test

           if (player->input_frames[stream_no] == NULL) {
               return -ERROR_COULD_NOT_ALLOC_FRAME;
           }
       }
       return 0;
    }

    Currently it just keep crashing and being a typical Android NDK’s "feature", it just provide a super helpful stack trace :

    libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x40 in tid 2717 (FFmpegReadFromS)

    I very much appreciate if anyone could help me solve this problem. Thank you for your time.

  • rtmpdump check status by command line

    2 mai 2014, par David

    I tried doing rtmpdump -r "rtmp-raw=rtmpe ://watch.playfooty.tv/live playpath=nba1569 swfUrl=http://www.playfooty.tv/play/player/player.swf live=1 pageUrl=http://www.playfooty.tv/"
    But the output it´s like offline always

    RTMPDump v2.2e
    (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
    DEBUG: Parsing...
    WARNING: Unknown protocol!

    DEBUG: Parsed host : watch.playfooty.tv
    DEBUG: Parsed app : live playpath=nba1569 swfUrl=http:/
    DEBUG: Protocol : RTMP
    DEBUG: Hostname : watch.playfooty.tv
    DEBUG: Port : 1935
    DEBUG: Playpath : www.playfooty.tv/play/player/player.swf live=1 pageUrl=http://www.playfooty.tv/
    DEBUG: tcUrl : rtmp://watch.playfooty.tv:1935/live playpath=nba1569 swfUrl=http:/
    DEBUG: app : live playpath=nba1569 swfUrl=http:/
    DEBUG: live : no
    DEBUG: timeout : 30 sec

    I tried a lot of links of a list and seems offline with this command, but When I play it in a software it worked.

    Does anyone have an idea how to test if this kind of links are alive or die ?

    Thanks !