Recherche avancée

Médias (91)

Autres articles (54)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

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

  • 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);
    }
  • How to "re-interlace" a video ? How to convert a naïvely deinterlaced 480p video back to 480i ? [closed]

    8 juillet 2021, par toughluck

    I have a 480p video that was naïvely created from a 480i original and had no deinterlacing applied. The resulting format is 480p25. Combing is visible and I would like to convert it back to 480i50, so sort of "re-interlace" the video back to its original state.

    


    I have tried the solution from this question : How to convert a 1080p to 1080i using FFMPEG but it did not create the expected output.

    


    I looked at ffmpeg reference here : https://www.ffmpeg.org/ffmpeg-all.html but I could not find a proper option. Tons of filters to deinterlace interlaced videos but nothing to "re-interlace" them.

    


    My expected output would be this :

    


     ------> time
Input:
Frame 1 (0 ms)        Frame 2 (40 ms)

11111                 33333
22222                 44444
11111                 33333
22222                 44444

Output 1:
Frame 1 (0 ms)  Frame 2 (20 ms) Frame 3 (40 ms) Frame 4 (60 ms)
11111           22222           33333           44444
11111           22222           33333           44444
11111           22222           33333           44444
11111           22222           33333           44444

(Alternative) Output 2:
Frame 1 (0 ms)  Frame 2 (20 ms) Frame 3 (40 ms) Frame 4 (60 ms)
22222           11111           44444           33333
22222           11111           44444           33333
22222           11111           44444           33333
22222           11111           44444           33333


    


    (I'm not sure whether it's top field first or bottom field first, so I'd like to have an option to try both.)

    


    Is this possible ?

    


  • Do i need a client to stream data ?

    28 novembre 2017, par Adalcar

    I am writing a web interface for a set of cameras using ffmpeg.

    The issue comes when trying to stream this data :
    after shamelessly ripping this code, replacing the ip with localhost for testing purposes, I tried to read the stream with VLC, to no avail : the server side runs without problem but the packets seem to disappear in thin air.

    That’s when I open the server with

    avio_open2(&server, "udp://localhost:554", AVIO_FLAG_WRITE, NULL, &options);

    If I use rtsp instead, it has the decency of failing with "unknown protocol" (?)

    and for http, it pops an unknown error.

    Do I need a client request to start streaming ?