Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (99)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

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

Sur d’autres sites (14592)

  • How to decrypt hls video content

    16 mai 2019, par SHAH MD MONIRUL ISLAM

    My requirement is to play the encrypted hls video files from local storage in android. I have used NanoHTTPD to create and run the local server. From there I am serving the .ts an .m3u8 files. To play this video ExoPlayer need a key to decrypt the files and thus I made a url : http://localhost:4990/dataKey.

    Here is my local server class :

    import android.os.Environment;
    import android.util.Log;

    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.util.Map;

    import fi.iki.elonen.NanoHTTPD;

    public class LocalStreamingServer extends NanoHTTPD{
       public LocalStreamingServer(int port){
           super(port);

       }

       @Override
       public Response serve(IHTTPSession session){
           Log.e("req", session.getUri());

           if(session.getUri().equalsIgnoreCase("/dataKey")){

               return newFixedLengthResponse(Response.Status.OK, "txt", "what is the key?");
           }

           if(session.getUri().contains("m3u8")){
               String path = Environment.getExternalStorageDirectory().toString() + "/s3" + session.getUri();

               FileInputStream fis = null;
               File f = new File(path);
               try {
                   fis = new FileInputStream(f);
               } catch (FileNotFoundException e) {
               }
               return newFixedLengthResponse(Response.Status.OK, "m3u8", fis, f.length());
           }

           if(session.getUri().endsWith("ts")){
               String path = Environment.getExternalStorageDirectory().toString() + "/s3" + session.getUri();

               FileInputStream fis = null;
               File f = new File(path);
               try {
                   fis = new FileInputStream(f);
               } catch (FileNotFoundException e) {

               }
               return newFixedLengthResponse(Response.Status.OK, "ts", fis, f.length());
           }

           String path = Environment.getExternalStorageDirectory().toString() + "/s3/master.m3u8";

           FileInputStream fis = null;
           File f = new File(path);
           try {
               fis = new FileInputStream(f);
           } catch (FileNotFoundException e) {
           }
           return newFixedLengthResponse(Response.Status.OK, "m3u8", fis, f.length());
       }
    }

    I have transcoded the video using ffmpeg. I need to know that which data or key need to be returned when the dataKey url is called. I have the encrypted the video using these key :

    key=617D8A125A284DF48E3C6B1866348A3F
    IV=5ff82ce11c7e73dcdf7e73cacd0ef98

    I can not understand which of them are need to be returned from the datakey url. Both of them are not working. Exoplayer is sending the error message :java.security.InvalidKeyException: Unsupported key size

    can Any one help me about this ?

  • Unable to convert video to mp4 formate

    11 avril 2017, par Usman Saeed

    I have to convert video (any format) to mp4 format
    I am using this android library WritingMinds

    Here is my code

     ffmpeg = FFmpeg.getInstance(UploadVideoService.this);
               loadFFMpegBinary();

               String newVideoPath = Utils.makeAndGetFolderName(Constants.PHOTEX_VIDEO);
               File file = new File(newVideoPath + File.separator +
                       System.currentTimeMillis() + ".mp4");
               if (file.exists()) {
                   file.delete();
               }

               File fileOrignal = new File(videoFilePath);
               if (fileOrignal.exists()) {
                   try {
                       InputStream is =new FileInputStream(videoFilePath);
                       int size = is.available();
                       byte[] buffer = new byte[size];
                       is.read(buffer);
                       is.close();
                       FileOutputStream fos = new FileOutputStream(file);
                       fos.write(buffer);
                       fos.close();


                       String command = "-i " + fileOrignal.getAbsolutePath()
                               + " -c:v libx264 -c:a aac -movflags faststart " + file.getAbsolutePath();

                       execFFmpegBinary(new String[]{command});
                   } catch (Exception e) {
                       Log.d(TAG, "Exception ");
                       e.printStackTrace();
                   }

       private void loadFFMpegBinary() {
       try {
           ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
               @Override
               public void onFailure() {
                   // TODO: 11-Apr-17 Notification and toast
               }

               @Override
               public void onSuccess() {
                   super.onSuccess();




               }
           });
       } catch (FFmpegNotSupportedException e) {
           e.printStackTrace();
       }
    }

       private void execFFmpegBinary(final String[] command) {
       try {
           ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
               @Override
               public void onFailure(String s) {
                   Log.d(TAG, "onFailure " + s);
               }

               @Override
               public void onSuccess(String s) {
                   Log.d(TAG, "onSuccess " + s);
               }

               @Override
               public void onProgress(String s) {
                   Log.d(TAG, "onProgress " + s);
               }


               @Override
               public void onStart() {
                   Log.d(TAG, "onStart ");
               }

               @Override
               public void onFinish() {
                   Log.d(TAG, "onFinish ");

               }
           });
       } catch (FFmpegCommandAlreadyRunningException e) {
           e.printStackTrace();
           // do nothing for now
           Log.d(TAG, "FFmpegCommandAlreadyRunningException ");
       }
    }

    its give these error

                                                                                   libavutil      55. 17.103 / 55. 17.103
                                                                                   libavcodec     57. 24.102 / 57. 24.102
                                                                                   libavformat    57. 25.100 / 57. 25.100
                                                                                   libavdevice    57.  0.101 / 57.  0.101
                                                                                   libavfilter     6. 31.100 /  6. 31.100
                                                                                   libswscale      4.  0.100 /  4.  0.100
                                                                                   libswresample   2.  0.101 /  2.  0.101
                                                                                   libpostproc    54.  0.100 / 54.  0.100
                                                                                 Unrecognized option 'i /storage/emulated/0/Movies/mvd.avi -c:v libx264 -c:a aac -movflags faststart /storage/emulated/0/Photex/photexVideo/1491909522363.mp4'.
                                                                                 **Error splitting the argument list: Option not found**

    04-11 16:18:43.158 11529-11529/com.photex.urdu.textonphotos D/UploadVideoService : onFinish

    I am unable to understand how to solve this !

  • trying to play audio from youtube with ffmpeg on discord.py rewrite

    13 septembre 2021, par Bobby Cook

    im trying to use a discord bot that plays music, but im getting errors when i run this code and python crashes, and i cant quite figure out whats wrong, except for that its around the @client.command(pass_context=True) async def play(self, ctx, *, url): print(url) server = ctx.message.guild voice_channel = server.voice_client
block. the i apologize for wasting all your time, im really bad at this, and i didnt even write most of this.

    


    import random
import youtube_dl
from discord.ext import commands
from discord.ext import tasks

client = commands.Bot(command_prefix = 'f!')

@client.command()
async def join(ctx):
    channel = ctx.message.author.voice.channel
    await channel.connect()

@client.command()
async def leave(ctx):
    await ctx.voice_client.disconnect()

youtube_dl.utils.bug_reports_message = lambda: ''


ytdl_format_options = {
    'format': 'bestaudio/best',
    'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
    'restrictfilenames': True,
    'noplaylist': True,
    'nocheckcertificate': True,
    'ignoreerrors': False,
    'logtostderr': False,
    'quiet': True,
    'no_warnings': True,
    'default_search': 'auto',
    'source_address': '0.0.0.0' # bind to ipv4 since ipv6 addresses cause issues sometimes
}

ffmpeg_options = {
    'options': '-vn'
}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)

class YTDLSource(discord.PCMVolumeTransformer):
    def __init__(self, source, *, data, volume=0.5):
        super().__init__(source, volume)

        self.data = data

        self.title = data.get('title')
        self.url = data.get('url')

    @classmethod
    async def from_url(cls, url, *, loop=None, stream=False):
        loop = loop or asyncio.get_event_loop()
        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))

        if 'entries' in data:
            # take first item from a playlist
            data = data['entries'][0]

        filename = data['url'] if stream else ytdl.prepare_filename(data)
        return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)

        async with ctx.typing():
            player = await YTDLSource.from_url(url, loop=self.bot.loop)
            ctx.voice_channel.play(player, after=lambda e: print('Player error: %s' % e) if e else None)
        await ctx.send('Now playing: {}'.format(player.title))

@client.command(pass_context=True)
   async def play(self, ctx, *, url):
       print(url)
       server = ctx.message.guild
       voice_channel = server.voice_client