Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (112)

  • 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 ;

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

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

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (13502)

  • how to play m4s chunks downloaded from mpd file

    28 août 2015, par Mayank Agarwal

    Below i have written sample code to download first 7 chunks of mpd file of single quality alongwith base url mp4 of that particular quality.I am putting m4s chunks in queue of strings.How can i play the downloaded data.
    i have queue in which at first iteration is mp4 segment of particular quality
    and then in subsequent iterations i have m4s chunks of same quality
    Now i want to play this queue buffer using ffmpeg or gstreamer.How can i do this
    Individually i am able to play by downloading single mp4(of particular quality in mpd structure) then using cat concatenating with m4s chunks and then play.

    In open source libdash how it is done,if anyone has any idea.

    Please guide.

     #include <iostream>
    #include
    #include <curl></curl>curl.h>
    #include <queue>
    #include <cstdlib>

    using namespace std;
    string data;
    std::queue<string> myqueue;
    int size =0;



    size_t writeCallback(char* buf, size_t size, size_t nmemb, void* up)
    {

     printf("size  = %d\n\n\n",size);
     printf("size nmemb  = %d\n\n\n\n\n",nmemb);
     for (int c = 0; c/tell curl how many bytes we handled
     }



     int main()
     {
     CURL* curl; //our curl object
     char url_firstpart[80];// = NULL;
     char bitwide_chunk[10];
     char buffer[10];


    curl_global_init(CURL_GLOBAL_ALL); //pretty obvious
    curl = curl_easy_init();

    for(int i=0;i&lt;7;i++)
    {  

    strcpy(url_firstpart,"http://www-itec.uni- klu.ac.at/ftp/datasets/mmsys12/Valkaama/valkaama_1s/valkaama_1s_50kbit/valkaama_1s");
    string str = to_string(i);

    char * writable = new char[str.size() + 1];
    std::copy(str.begin(), str.end(), writable);
    writable[str.size()] = '\0';

    strcat(writable,".m4s");
    printf("concanated chink is %s\n",writable);

    strcat(url_firstpart,bitwide_chunk);
    puts(url_firstpart);


    curl_easy_setopt(curl, CURLOPT_URL,url_firstpart);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &amp;writeCallback);
    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

    curl_easy_perform(curl);



    }

    size = myqueue.size();
    printf("Final size of queue = %d\n",size);
    cout &lt;&lt; endl &lt;&lt; data &lt;&lt; endl;
     cin.get();

     curl_easy_cleanup(curl);
     curl_global_cleanup();

     return 0;
    }
    </string></cstdlib></queue></iostream>
  • Problem settingup a play command for my discord bot (music) ['Error : FFmpeg/avconv not found !']

    28 août 2023, par TitanFrex

    Im new to programing a discord bot, im more to the web developing enviroment, im trying to create by myself a play command song (only with one link) to try if the first join is working and actually play the song.

    &#xA;

    (Discord.js v14)

    &#xA;

    Unfortunately i was having a problem with FFMPEG.&#xA;This my actual module for the play.js command, where all the problem is happening.

    &#xA;

    const { joinVoiceChannel, createAudioPlayer, createAudioResource } = require(&#x27;@discordjs/voice&#x27;);&#xA;const ytdl = require(&#x27;ytdl-core&#x27;);&#xA;&#xA;module.exports = {&#xA;    devOnly: true,&#xA;    name: &#x27;play&#x27;,&#xA;    description: &#x27;Start to play a song!&#x27;,&#xA;    // options: Object[],&#xA;&#xA;    /**&#xA;     *&#xA;     * @param {Client} client&#xA;     * @param {Interaction} interaction&#xA;     */&#xA;    callback: async (client, interaction) => {&#xA;        const voiceChannel = interaction.member.voice.channel;&#xA;&#xA;        if (!voiceChannel) {&#xA;            return interaction.reply(&#x27;You must be in a voice channel to use this command.&#x27;);&#xA;        }&#xA;&#xA;        const connection = joinVoiceChannel({&#xA;            channelId: voiceChannel.id,&#xA;            guildId: interaction.guild.id,&#xA;            adapterCreator: interaction.guild.voiceAdapterCreator,&#xA;        });&#xA;&#xA;        const stream = ytdl(&#x27;URL_HERE&#x27;, { filter: &#x27;audioonly&#x27; });&#xA;        const resource = createAudioResource(stream);&#xA;&#xA;        const player = createAudioPlayer();&#xA;        connection.subscribe(player);&#xA;        player.play(resource);&#xA;&#xA;        interaction.reply({&#xA;            content: `Playing Song`,&#xA;            // ephemeral: true,&#xA;        });&#xA;    }&#xA;}&#xA;

    &#xA;

    The first error i was receving was 'Error : FFmpeg/avconv not found !', i tried to install it with some guides online. after couple of tries i get it right and the command 'ffmpeg -version' returns.

    &#xA;

    After that i tought it was workikng, but when i started my project, i receved the same error,. I tried to look up for a solution and i tried to get the process.env.PATH to see but i dont understand if its right or not.

    &#xA;

    After i removed the console.log(process.env.PATH), i get no errors in the terminal, but it will stil not play the song.

    &#xA;

  • Play MPEG-2 TS using MseStreamSource

    27 novembre 2022, par Nicolas Séveno

    I need to display a live video stream in a UWP application.

    &#xA;&#xA;

    The video stream comes from a GoPro. It is transported by UDP messages. It is a MPEG-2 TS stream. I can play it successfully using FFPlay with the following command line :

    &#xA;&#xA;

    ffplay -fflags nobuffer -f:v mpegts udp://:8554&#xA;

    &#xA;&#xA;

    I would like to play it with MediaPlayerElement without using a third party library.

    &#xA;&#xA;

    According to the following page :&#xA;https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/supported-codecs&#xA;UWP should be able to play it. (I installed the "Microsoft DVD" application in the Windows Store).

    &#xA;&#xA;

    I receive the MPEG-2 TS stream with a UdpClient. It works well.&#xA;I receive in each UdpReceiveResult a 12 bytes header, followed by 4, 5, 6, or 7 MPEGTS packets (each packet is 188 bytes, beginning with 0x47).

    &#xA;&#xA;

    I created a MseStreamSource :

    &#xA;&#xA;

    _mseStreamSource = new MseStreamSource();&#xA;_mseStreamSource.Opened &#x2B;= (_, __) =>&#xA;{&#xA;    _mseSourceBuffer = _mseStreamSource.AddSourceBuffer("video/mp2t");&#xA;    _mseSourceBuffer.Mode = MseAppendMode.Sequence;&#xA;};&#xA;_mediaPlayerElement.MediaSource = MediaSource.CreateFromMseStreamSource(_mseStreamSource);&#xA;

    &#xA;&#xA;

    This is how I send the messages to the MseStreamSource :

    &#xA;&#xA;

        UdpReceiveResult receiveResult = await _udpClient.ReceiveAsync();&#xA;    byte[] bytes = receiveResult.Buffer;&#xA;    mseSourceBuffer.AppendBuffer(bytes.AsBuffer());&#xA;

    &#xA;&#xA;

    The MediaPlayerElement displays the message "video not supported or incorrect file name". (not sure of the message, my Windows is in French).

    &#xA;&#xA;

    Is it a good idea to use the MseAppendMode.Sequence mode ?&#xA;What should I pass to the AppendBuffer method ? The raw udp message including the 12 bytes header or each MPEGTS 188 bytes packet ?

    &#xA;