Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (69)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (9775)

  • Audio playing back at the wrong speed using FFmpeg on Android

    11 avril 2019, par Kyborg2011

    General problem in the following :
    I decode the audio as follows :

    ReSampleContext* rsc = av_audio_resample_init(
           1, aCodecCtx->channels,
           aCodecCtx->sample_rate, aCodecCtx->sample_rate,
           av_get_sample_fmt("u8"), aCodecCtx->sample_fmt,
           16, 10, 0, 1);

    while (av_read_frame(pFormatCtx, &packet)>= 0) {
       if (aCodecCtx->codec_type == AVMEDIA_TYPE_AUDIO) {
           int data_size = AVCODEC_MAX_AUDIO_FRAME_SIZE * 2;
           int size=packet.size;
           int decoded = 0;

            while(size > 0) {
                int len = avcodec_decode_audio3(aCodecCtx, pAudioBuffer,
                    &data_size, &packet);

                //Сonvert audio to sample 8bit
                out_size = audio_resample(rsc, outBuffer, pAudioBuffer, len);

                jbyte *bytes = (*env)->GetByteArrayElements(env, array, NULL);

                memcpy(bytes, outBuffer, out_size);
                (*env)->ReleaseByteArrayElements(env, array, bytes, 0);
                (*env)->CallStaticVoidMethod(env, cls, mid, array, out_size, number);

                size -= len;
                number++;
            }
        }
    }

    Next release it AudioTrack. After that, I hear that song that was necessary, but with noise and speed of 2 times larger. In what may be the problem ?

    UPDATE :
    This is Java code :

    public static AudioTrack track;
    public static byte[] bytes;
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);
       int bufSize = 2048;
       track = new AudioTrack(AudioManager.STREAM_MUSIC, 44100, AudioFormat.CHANNEL_OUT_MONO,
                   AudioFormat.ENCODING_PCM_8BIT, bufSize, AudioTrack.MODE_STREAM);

       bytes = new byte[bufSize];
       Thread mAudioThread = new Thread(new Runnable() {
           public void run() {
               int res = main(2, "/sdcard/muzika_iz_reklami_bmw_5_series_-_bmw_5_series.mp3", bytes);
               System.out.println(res);
           }
       });
       mAudioThread.setPriority(Thread.MAX_PRIORITY);
       mAudioThread.start();
    }

    private static void play(byte[] play, int length, int p) {
       if (p==0){
           track.play();
       }
       track.write(play, 0, length);
    }
  • avcodec/nvenc : only unregister input resources when absolutely needed

    24 avril 2019, par Timo Rothenpieler
    avcodec/nvenc : only unregister input resources when absolutely needed
    

    This reverts nvenc to old behaviour, which in some super rare edge cases
    performs better.
    The implication of this is that any potential API user who relies on
    nvenc cleaning up every frames device resources after it's done using
    them will have to change their usage pattern.

    That should not be a problem, since pretty much every normal usage
    pattern automatically implies that surfaces are reused from a common
    pool, since constant re-allocation is also very expensive.

    • [DH] libavcodec/nvenc.c
  • 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 ?