Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (58)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP 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, par

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

  • Anomalie #2729 : titre mot

    6 décembre 2012, par realet RealET

    Voir aussi http://core.spip.org/issues/2862 qui porte sur les id au lieu des titres des mots.

  • Programming in C : Opening, Reading and Transcoding of Live TV with libavcodec. libavformat etc

    19 décembre 2011, par mmoment

    I'm currently developing a live streaming Software for my University Project.

    I am supposed to open a Live Video Stream from a USB Stick( I am using the Hauppauge WinTV-HVR 950Q under Linux) and read the Stream.
    Then I'm supposed to transcode it to h246. and send it to some devices in the Network.

    My Problem


    I can use the v4l API to access the USB Stick, but transcoding does currently not work as far as I know, therefore I want to use the libav to do so. I know that using the command line tools transcoding of live streams with ffmpeg is not a big deal, but doing so in C seems to be more of a problem.

    1. Here's how I open some static Video File :

      static char* path = "./video.mpeg" ;
      AVFormatContext *pFormatCtx ;

      av_register_all() ;

      if(av_open_input_file(&pFormatCtx, path, NULL, 0, NULL) !=0)

      printf("Opening file \"%s\" failed", path) ;
      return -1 ;
      else printf("Opening the file \"%s\" succeeded", path) ;

    2. Here's how I understand to how open a Live Feed

      static char* path = "/dev/dvb/adapter0/dvr0" ;
      AVFormatContext *pFormatCtx ;

      av_register_all() ;
      avdevice_register_all() ;

      if(avformat_open_input(&pFormatCtx, path, NULL, NULL) != 0)

      perror("avformat_open_input") ;
      return -1 ;
      else printf("Yay") ;

    3. Here's how I understand to how open a Live Feed

      if(av_find_stream_info(pFormatCtx)<0)

      printf("Could not find any Stream Information the file \"%s\"", path) ;
      return -1 ;

      // Dump information about file onto standard error
      dump_format(pFormatCtx, 0, path, 0) ;
      AVCodecContext *pCodecCtx ;

      // Find the first video stream
      int videoStream=-1 ;
      for(i=0 ; inb_streams ; i++)

      if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO)
      {
         videoStream=i;
         break;
      }

      if(videoStream==-1) return -1 ; // Didn't find a video stream

      // Get a pointer to the codec context for the video stream
      pCodecCtx=pFormatCtx->streams[videoStream]->codec ;

      AVCodec *pCodec ;

      // Find the decoder for the video stream
      pCodec=avcodec_find_decoder(pCodecCtx->codec_id) ;
      if(pCodec==NULL)

      fprintf(stderr, "Unsupported codec !\n") ;
      return -1 ; // Codec not found

      //Open codec
      if(avcodec_open(pCodecCtx, pCodec)<0)

      printf("Could not open the Codec") ;
      return -1 ; // Could not open codec

    So now how can you help me ?

    I would really appreciate it if anyone knew how to open a live stream and could give me a good example.

  • Discord FFMPEG audio wont play from yt-dlp

    19 mars 2023, par user21236822

    My question is this : Why isn't my bot playing audio ?

    &#xA;

    I want the bot to join, play audio from queue, then disconnect without downloading an mp3 file.

    &#xA;

    I tried using youtube-dl, but I switched to the yt-dlp library after getting errors I couldn't fix.&#xA;I am running on Windows 10 locally. All my libraries are up to date.

    &#xA;

    Here are my ydl_opts and FFMPEG_OPTS :

    &#xA;

    ydl_opts = {&#xA;    &#x27;format&#x27;: &#x27;bestaudio/best&#x27;,&#xA;    &#x27;postprocessors&#x27;: [{&#xA;        &#x27;key&#x27;: &#x27;FFmpegExtractAudio&#x27;,&#xA;        &#x27;preferredcodec&#x27;: &#x27;mp3&#x27;,&#xA;        &#x27;preferredquality&#x27;: &#x27;192&#x27;,&#xA;    }],&#xA;}&#xA;&#xA;FFMPEG_OPTIONS = {&#xA;    &#x27;before_options&#x27;: &#x27;-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5&#x27;,&#xA;    &#x27;options&#x27;: &#x27;-vn&#x27;&#xA;} &#xA;

    &#xA;

    Here is where I believe the problem is.

    &#xA;

    async def play():&#xA;    print("Play Called")&#xA;    musicPlay()&#xA;    # Get message object from initial request&#xA;    message = ytLinkQue.get()&#xA;    print(f"Message object recieved: {message}")&#xA;    voiceChannel = message.author.voice.channel&#xA;    vc = await voiceChannel.connect()&#xA;    songsPlayed = 0&#xA;    &#xA;    while not ytLinkQue.empty():&#xA;        # Get current song&#xA;        currentSong = ytLinkQue.get()[0]&#xA;        print(f"Current song: {currentSong}")&#xA;&#xA;        # Get song from Youtube&#xA;        with yt_dlp.YoutubeDL(ydl_opts) as ydl:&#xA;            # song = ydl.download(currentSong)&#xA;            info = ydl.extract_info(currentSong, download=False)&#xA;            song = info[&#x27;formats&#x27;][0][&#x27;url&#x27;]&#xA;&#xA;        # Play Song&#xA;        vc.play(discord.FFmpegPCMAudio(song, **FFMPEG_OPTIONS), after=lambda e: print(&#x27;Song done&#x27;))&#xA;&#xA;        # Wait until the song has finished playing&#xA;        while vc.is_playing():&#xA;            print("playing rn")&#xA;            await asyncio.sleep(1)&#xA;    &#xA;    await vc.disconnect()&#xA;    musicStop()&#xA;

    &#xA;

    When play() is called, here is the output in terminal with my annotations as **** text **** :

    &#xA;

    >python main.py&#xA;2023-02-17 15:21:09 INFO     discord.client logging in using static token&#xA;2023-02-17 15:21:10 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: 60b9fce14faa5daa4aed9eb6db01a74d).&#xA;Max que: 50&#xA;Text Channel: 828698708123451434&#xA;Testing Bot#4591 is ready.&#xA;Passing message object&#xA;**** play() funciton is called ****&#xA;Play Called&#xA;Message object recieved: <message channel="<TextChannel" position="7" nsfw="False" news="False"> type= author=<member discriminator="&#x27;0199&#x27;" bot="False" nick="&#x27;Fragnk7?&#x27;" guild="<Guild" chunked="True">> flags=<messageflags value="0">>&#xA;2023-02-17 15:21:16 INFO     discord.voice_client Connecting to voice...&#xA;2023-02-17 15:21:16 INFO     discord.voice_client Starting voice handshake... (connection attempt 1)&#xA;2023-02-17 15:21:17 INFO     discord.voice_client Voice handshake complete. Endpoint found seattle2004.discord.media&#xA;Current song: https://www.youtube.com/watch?v=vcAp4nmTZCA&#xA;[youtube] Extracting URL: https://www.youtube.com/watch?v=vcAp4nmTZCA &#xA;[youtube] vcAp4nmTZCA: Downloading webpage &#xA;[youtube] vcAp4nmTZCA: Downloading android player API JSON &#xA;**** Does not play any audio ****&#xA;Playing rn&#xA;Song done&#xA;2023-02-17 15:21:18 INFO     discord.player ffmpeg process 20700 successfully terminated with return code of 1.&#xA;2023-02-17 15:21:19 INFO     discord.voice_client The voice handshake is being terminated for Channel ID 400178308467392513 (Guild ID 261601676941721602)&#xA;2023-02-17 15:21:19 INFO     discord.voice_client Disconnecting from voice normally, close code 1000.&#xA;</messageflags></member></message>

    &#xA;

    On Discord's end, the bot successfully connects then disconnects after 2 second.

    &#xA;

    Note : I've only included code I think is relevant. Please let me know if I should add anything else to the post, otherwise, here is the github for the project. Code is in main.py.&#xA;https://github.com/LukeLeimbach/wallMomentMusic

    &#xA;

    Thank you in advance !

    &#xA;

    I've applied the advice from these posts but it still will not play audio :

    &#xA;

    -https://stackoverflow.com/questions/45770016/how-do-i-make-my-discord-bot-play-audio-from-youtube

    &#xA;

    -https://stackoverflow.com/questions/66070749/how-to-fix-discord-music-bot-that-stops-playing-before-the-song-is-actually-over?newreg=c70dd786cf5844e490045494223c0381

    &#xA;

    -https://stackoverflow.com/questions/57688808/playing-music-with-a-bot-from-youtube-without-downloading-the-file

    &#xA;