Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (94)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (7424)

  • FFmpeg Streaming Video SpringBoot endpoint not show video duration in video players

    7 avril 2024, par lxluxo23

    it turns out that I've been working on a personal project just out of curiosity.
the main function is to stream video by first encoding it through ffmpeg
then playback said video from any other device
call it "plex" very very primitive

    


    although I achieve my goal which is to encode and send the video to the devices that make the request
this video is sent so to speak as a live broadcast.
I can only pause it, no forward or rewind, anyone have any idea what I am doing wrong or if I should take some other approach either in my service or controller ?

    


    I leave fragments of my code

    


    THE CONTROLLER

    


    @RestController&#xA;@RequestMapping("/api")&#xA;@Log4j2&#xA;public class StreamController {&#xA;&#xA;    @Autowired&#xA;    VideoStreamingService videoStreamingService;&#xA;&#xA;    @Autowired&#xA;    VideoService videoService;&#xA;&#xA;&#xA;    @GetMapping("/stream/{videoId}")&#xA;    public ResponseEntity<streamingresponsebody> livestream(@PathVariable Long videoId,@RequestParam(required = false)  String codec) {&#xA;        Video video = videoService.findVideoById(videoId);&#xA;        if (video != null) {&#xA;            Codec codecEnum = Codec.fromString(codec);&#xA;            return ResponseEntity.ok()&#xA;                    .contentType(MediaType.valueOf("video/mp4"))&#xA;                    .body(outputStream -> videoStreamingService.streamVideo(video.getPath(), outputStream,codecEnum));&#xA;        }&#xA;        return ResponseEntity.notFound().build();&#xA;    }&#xA;}&#xA;</streamingresponsebody>

    &#xA;

    THE SERVICE

    &#xA;

    @Service&#xA;public class VideoStreamingService {&#xA;&#xA;    public void streamVideo(String videoPath, OutputStream outputStream, Codec codec) {&#xA;&#xA;        FFmpeg ffmpeg = FFmpeg.atPath()&#xA;                .addArguments("-i", videoPath)&#xA;                .addArguments("-b:v", "5000k")&#xA;                .addArguments("-maxrate", "5000k")&#xA;                .addArguments("-bufsize", "10000k")&#xA;                .addArguments("-c:a", "aac")&#xA;                .addArguments("-b:a", "320k")&#xA;                .addArguments("-movflags", "frag_keyframe&#x2B;empty_moov&#x2B;faststart")&#xA;                .addOutput(PipeOutput.pumpTo(outputStream)&#xA;                        .setFormat("mp4"))&#xA;                .addArgument("-nostdin");&#xA;        if (codec == Codec.AMD) {&#xA;            ffmpeg.addArguments("-profile:v", "high");&#xA;        }&#xA;        ffmpeg.addArguments("-c:v", codec.getFfmpegArgument());&#xA;        ffmpeg.execute();&#xA;    }&#xA;}&#xA;

    &#xA;

    I have some enums to vary the encoding and use hardware acceleration or not.

    &#xA;

    and here is an example from my player&#xA;the endpoint is the following

    &#xA;

    http://localhost:8080/api/stream/2?codec=AMD&#xA;screenshot

    &#xA;

    I'm not sure if there's someone with more knowledge in either FFmpeg or Spring who could help me with this minor issue, I would greatly appreciate it. I've included the URL of the repository in case anyone would like to review it when answering my question

    &#xA;

    repo

    &#xA;

    I tried changing the encoding format.&#xA;I tried copying the metadata from the original video.&#xA;I tried sending a custom header.&#xA;None of this has worked.

    &#xA;

    I would like to achieve what is mentioned in many sites, which is when you load a video from the network, the player shows how much of that video you have in the local "buffer".

    &#xA;

  • Discord music bot won't join Voice channel

    16 mars 2024, par Skely

    I followed a tutorial for creating a music bot in discord, but it will not join my vc no matter what. Every command works and it gives the correct responses and songs is in the queue. The bot have every permission know to man, but it still won't join. Any way to fix this issue ?&#xA;Thanks in advance !!

    &#xA;

    This is my code and files

    &#xA;

    main.py

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;import os&#xA;import asyncio&#xA;&#xA;from help_cog import help_cog&#xA;from music_cog import music_cog&#xA;&#xA;bot = commands.Bot(&#xA;    command_prefix="?", &#xA;    intents=discord.Intents.all(),&#xA;    help_command=None&#xA;)&#xA;&#xA;async def main():&#xA;    async with bot:&#xA;        await bot.add_cog(help_cog(bot))&#xA;        await bot.add_cog(music_cog(bot))&#xA;        await bot.start(os.getenv("TOKEN"))&#xA;&#xA;asyncio.run(main())&#xA;

    &#xA;

    music_cog.py

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;&#xA;from yt_dlp import YoutubeDL&#xA;&#xA;import yt_dlp as youtube_dl&#xA;&#xA;class music_cog(commands.Cog):&#xA;    def __init__(self, bot):&#xA;        self.bot = bot&#xA;&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;&#xA;        self.music_queue = []&#xA;        self.YDL_OPTIONS = {"format": "bestaudio", "postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "mp3", "preferredquality": "192",}]}&#xA;        self.FFMPEG_OPTIONS = {"before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5", "options": "-vn"}&#xA;&#xA;        self.vc = None&#xA;        print("Success")&#xA;&#xA;    def search_yt(self, item):&#xA;        with YoutubeDL(self.YDL_OPTIONS) as ydl:&#xA;            try:&#xA;                info = ydl.extract_info(f"ytsearch:{item}", download=False)["entries"][0]&#xA;            except Exception:&#xA;                return False&#xA;        return {"source": info["url"], "title": info["title"]}&#xA;&#xA;    def play_next(self):&#xA;        if len(self.music_queue) > 0:&#xA;            self.is_playing = True&#xA;&#xA;            m_url = self.music_queue[0][0]["source"]&#xA;&#xA;            self.music_queue.pop(0)&#xA;&#xA;            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())&#xA;        else:&#xA;            self.is_playing = False&#xA;&#xA;    async def play_music(self, ctx):&#xA;        if len(self.music_queue) > 0:&#xA;            self.is_playing = True&#xA;            m_url = self.music_queue[0][0]["source"]&#xA;&#xA;            if self.vc == None or not self.vc.is_connected():&#xA;                self.vc = await self.music_queue[0][1].connect()&#xA;&#xA;                if self.vc == None:&#xA;                    await ctx.send("Could not connect to the voice channel")&#xA;                    return&#xA;            else:&#xA;                await self.vc.move_to(self.music_queue[0][1])&#xA;            &#xA;            self.music_queue.pop(0)&#xA;&#xA;            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())&#xA;&#xA;        else:&#xA;            self.is_playing = False&#xA;&#xA;    @commands.command(name="play", aliases=["p", "playing"], help="Play the selected song from YouTube")&#xA;    async def play(self, ctx, *args):&#xA;        query = " ".join(args)&#xA;&#xA;        voice_channel = ctx.author.voice.channel&#xA;        if voice_channel is None:&#xA;            await ctx.send("Connect to a voice channel!")&#xA;        elif self.is_paused:&#xA;            self.vc.resume()&#xA;        else:&#xA;            song = self.search_yt(query)&#xA;            if type(song) == type(True):&#xA;                await ctx.send("Could not download the song. Incorrect format, try a different keyword")&#xA;            else:&#xA;                await ctx.send("Song added to queue")&#xA;                self.music_queue.append([song, voice_channel])&#xA;&#xA;                if self.is_playing == False:&#xA;                    await self.play_music(ctx)&#xA;    &#xA;    @commands.command(name="pause", help="Pauses the current song being played")&#xA;    async def pause(self, ctx, *args):&#xA;        if self.is_playing:&#xA;            self.is_playing = False&#xA;            self.is_paused = True&#xA;            self.vc.pause()&#xA;        elif self.is_paused:&#xA;            self.is_playing = True&#xA;            self.is_paused = False&#xA;            self.vc.resume()&#xA;&#xA;    @commands.command(name="resume", aliases=["r"], help="Resumes playing the current song")&#xA;    async def resume(self, ctx, *args):&#xA;        if self.is_paused:&#xA;            self.is_playing = True&#xA;            self.is_paused = False&#xA;            self.vc.resume()&#xA;        &#xA;    @commands.command(name="skip", aliases=["s"], help="Skips the currently played song")&#xA;    async def skip(self, ctx, *args):&#xA;        if self.vc != None and self.vc:&#xA;            self.vc.stop()&#xA;            await self.play_music(ctx)&#xA;&#xA;    @commands.command(name="queue", aliases=["q"], help="Displays all the songs currently in queue")&#xA;    async def queue(self, ctx):&#xA;        retval = ""&#xA;&#xA;        for i in range(0, len(self.music_queue)):&#xA;            if i > 4: break&#xA;            retval &#x2B;= self.music_queue[i][0]["title"] &#x2B; "\n"&#xA;&#xA;        if retval != "":&#xA;            await ctx.send(retval)&#xA;        else:&#xA;            await ctx.send("No music in the current queue")&#xA;    &#xA;    @commands.command(name="clear", aliases=["c", "bin"], help="Stops the current song and clears the queue")&#xA;    async def clear(self, ctx, *args):&#xA;        if self.vc != None and self.is_playing:&#xA;            self.vc.stop()&#xA;        self.music_queue = []&#xA;        await ctx.send("Music queue cleared")&#xA;&#xA;    @commands.command(name="leave", aliases=["disconnect", "l", "d"], help="Kick the bot from the voice channel")&#xA;    async def leave(self, ctx):&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;        await self.vc.disconnect()&#xA;

    &#xA;

    help_cog.py

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;&#xA;class help_cog(commands.Cog):&#xA;    def __init__(self, bot):&#xA;        self.bot = bot&#xA;&#xA;        self.help_message = """&#xA;        Help message&#xA;"""&#xA;&#xA;        self.text_channel_text = []&#xA;    &#xA;    @commands.Cog.listener()&#xA;    async def on_ready(self):&#xA;        for guild in self.bot.guilds:&#xA;            for channel in guild.text_channels:&#xA;                self.text_channel_text.append(channel)&#xA;&#xA;        await self.send_to_all(self.help_message)&#xA;&#xA;    async def send_to_all(self, msg):&#xA;        for text_channel in self.text_channel_text:&#xA;            await text_channel.send(msg)&#xA;        &#xA;    @commands.command(name="help", help="Displays all the available commands")&#xA;    async def help(self, ctx):&#xA;        await ctx.send(self.help_message)&#xA;

    &#xA;

  • Error while linking shared library FFMpegJNI to android project

    5 mars 2024, par Dari V

    I have built an ffmpeg module for all the architectures, but when I try to build project to run it on emulator (x86 architecture) i get an error, indicating that the files for x86 architecture are incompatible with elf_i386. The same is for other architectures, i get the error that the files are incompatible. What can i do in this case ?

    &#xA;

    [2/2] Linking CXX shared library E:\android_studio_projects\projects\IPTVPlayer\app\build\intermediates\cxx\Debug\1h3dp6s4\obj\x86\libffmpegJNI.so&#xA;FAILED: E:/android_studio_projects/projects/IPTVPlayer/app/build/intermediates/cxx/Debug/1h3dp6s4/obj/x86/libffmpegJNI.so &#xA;cmd.exe /C "cd . &amp;&amp; C:\Users\volos\AppData\Local\Android\Sdk\ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\bin\clang&#x2B;&#x2B;.exe --target=i686-none-linux-android30 --sysroot=C:/Users/volos/AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -fno-limit-debug-info  -static-libstdc&#x2B;&#x2B; -Wl,--build-id=sha1 -Wl,--fatal-warnings -Wl,--gc-sections -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libffmpegJNI.so -o E:\android_studio_projects\projects\IPTVPlayer\app\build\intermediates\cxx\Debug\1h3dp6s4\obj\x86\libffmpegJNI.so CMakeFiles/ffmpegJNI.dir/E_/media3/media-release/libraries/decoder_ffmpeg/src/main/jni/ffmpeg_jni.cc.o  -landroid  E:/media3/media-release/libraries/decoder_ffmpeg/src/main/jni/ffmpeg/android-libs/x86/libswresample.a  E:/media3/media-release/libraries/decoder_ffmpeg/src/main/jni/ffmpeg/android-libs/x86/libavcodec.a  E:/media3/media-release/libraries/decoder_ffmpeg/src/main/jni/ffmpeg/android-libs/x86/libavutil.a  C:/Users/volos/AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/i686-linux-android/30/liblog.so  -latomic -lm &amp;&amp; cd ."&#xA;ld: error: E:/media3/media-release/libraries/decoder_ffmpeg/src/main/jni/ffmpeg/android-libs/x86/libavcodec.a(mpegaudiotabs.o) is incompatible with elf_i386&#xA;

    &#xA;