Recherche avancée

Médias (91)

Autres articles (97)

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

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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (6681)

  • Mirror flip video taken from front camera in Android

    5 août 2016, par DAVIDBALAS1

    I have a camera application which is able to capture images and record videos. However, when capturing images or recording videos from the device front facing camera the result is flipped, like you are looking at the mirror. I want to flip it again so it will look normal. I managed to do this with images by flipping the Bitmap using Matrix :

      public Bitmap flip(Bitmap bitmap) {
           int w = bitmap.getWidth();
           int h = bitmap.getHeight();
           Matrix matrix = new Matrix();
           float[] mirrorY = {-1, 0, 0, 0, 1, 0, 0, 0, 1};
           Matrix matrixMirrorY = new Matrix();
           matrixMirrorY.setValues(mirrorY);
           matrix.postConcat(matrixMirrorY);
           matrix.postRotate(90);
           return Bitmap.createBitmap(bitmap, 0, 0, w, h, matrix, true);
       }

    I can’t figure out how to flip videos taken by MediaRecorder, I know I can run a ffmpeg command :

    -i /pathtooriginalfile/originalfile.mp4 -vf hflip -c:a copy /pathtosave/flippedfile.mp4

    but I don’t know how to run a ffmpeg command from code and I can’t find a different way. There are a lot of topics discussing this issue but I couldn’t find a solution to work. Notice : It is possible, Snapchat got this to work somehow.

    Thanks.

    P.S Sorry for my English

  • {OpenAL(+FFmpeg)} How to queue variable size buffer due to ogg format ?

    11 février 2014, par user3293833

    (First of all, I may feel sorry about my poor English as it's not my native language.)

    I use FFmpeg to decode some audio file and play it with OpenAL by "stream"(i.e."queue" and "unqueue" function of OpenAL).

    When I use my program to play .ogg file, I find that it has a variable nb_samples.(due to ogg has variable bit rate ??) There are 128 B, 512 B and 1024 B of nb_samples. As a results, I must call alDeleteBuffers and alGenBuffers before I use alBufferSamplesSOFT(similar to alBufferData) because it would fail to call alBufferSamplesSOFT without recreate the buffer.
    Notes : alBufferSamplesSOFT is provided by OpenAL Soft. You can just see it as alBufferData.

    Nevertheless, I think it's foolish and inefficient if I do this. Is there is some smart method ? I paste the part of code :

    while (av_read_frame(...) == 0){
     avcodec_decode_audio4(...);
     swr_convert(...);  // to convert PCM format from FLTP to FLT
     alDeleteBuffers(1, theBuffers[?]);
     alGenBuffers(1, theBuffers[?]);
     alBufferSamplesSOFT(...);  // put those data into OpenAL buffer
    }

    if I don't do this, It would failed to update the OpenAL buffer. Is there any method to create a variable size buffer or a big size buffer ? Or is there any method to change the size of buffer ?

    Thanks for you guys.

  • ffmpeg : set the language of an audio stream

    22 juillet 2023, par Steven Van Ingelgem

    I have 3 files : video.mp4, audionl.mp4 & audioeng.mp4.
I tried adding them all together in 1 output.mp4 file like this :

    



    ffmpeg -y -i video.mp4 -i audionl.mp4 -i audioeng.mp4  -map 0:v -map 1:a -map 2:a -metadata:s:a:0 language=nl -metadata:s:a:0 title="NL" -metadata:s:a:1 language=eng  -metadata:s:a:1 title="ENG" -acodec copy -bsf:a aac_adtstoasc -vcodec copy  -movflags faststart output.mp4 2>&1


    



    This is the output I see from ffmpeg :

    



    ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isomavc1mp42dash
    creation_time   : 2017-06-04 06:35:06
  Duration: 00:20:52.80, start: 0.000000, bitrate: 1172 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1168 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : VideoHandler
      encoder         : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'audionl.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isomM4A mp42dash
    creation_time   : 2017-06-04 06:35:06
  Duration: 00:20:52.80, start: 0.000000, bitrate: 96 kb/s
    Stream #1:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : SoundHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'audioeng.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isomM4A mp42dash
    creation_time   : 2017-06-04 06:35:06
  Duration: 00:20:52.78, start: 0.000000, bitrate: 64 kb/s
    Stream #2:0(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 62 kb/s (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : SoundHandler
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isomavc1mp42dash
    encoder         : Lavf56.25.101
    Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 1168 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : VideoHandler
      encoder         : VideoHandler
    Stream #0:1(nl): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 93 kb/s (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : SoundHandler
      title           : NL
    Stream #0:2(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 62 kb/s (default)
    Metadata:
      creation_time   : 2017-06-04 06:35:06
      handler_name    : SoundHandler
      title           : ENG
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
  Stream #2:0 -> #0:2 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0xbb1320] Starting second pass: moving the moov atom to the beginning of the file
frame=31320 fps=20993 q=-1.0 Lsize=  204217kB time=00:20:52.79 bitrate=1335.4kbits/s
video:178734kB audio:23867kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.797284%


    



    As you can see in there : "Stream #0:0(eng)", "Stream #0:1(nl)" & "Stream #0:2(eng)".
So that looks fine.

    



    But when I open it in VLC, I see under Audio tracks :
NL - [English]
ENG - [English]

    



    So I went back to check on ffmpeg with "ffmpeg -i output.mp4" :

    



    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.25.101
  Duration: 00:20:52.80, start: 0.000000, bitrate: 1335 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1168 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 62 kb/s (default)
    Metadata:
      handler_name    : SoundHandler


    



    And here they are English again...

    



    Afterwards I tried this :

    



    ffmpeg -y -i audionl.mp4 -c:a copy -metadata:s:a:0 language=nl output.mp4


    



    But also that failed to set the correct language on the output file...
I'm at a loss here and hope someone can help me set these languages correctly.

    



    Thanks a lot !