Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (55)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (7871)

  • How can I run command line FFMPEG and accept multiple pipes (video and audio) without blocking on the first input ?

    18 février 2016, par Version135b

    I’m trying to mux h264 and aac created with MediaCodec using FFMPEG, and also use FFMPEG’s RTMP support to send to youtube. I’ve created two pipes, and am writing from java (android) through WriteableByteChannels. I can send to one pipe just fine (accepting null audio) like this :

    ./ffmpeg -f lavfi -i aevalsrc=0 -i "files/camera-test.h264" -acodec aac -vcodec copy -bufsize 512k -f flv "rtmp://a.rtmp.youtube.com/live2/XXXX"

    YouTube streaming works perfectly (but I have no audio). Using two pipes this is my command :

    ./ffmpeg \
    -i "files/camera-test.h264" \
    -i "files/audio-test.aac" \
    -vcodec copy \
    -acodec copy \
    -map 0:v:0 -map 1:a:0 \
    -f flv "rtmp://a.rtmp.youtube.com/live2/XXXX""

    The pipes are created with mkfifo , and opened from java like this :

    pipeWriterVideo = Channels.newChannel(new FileOutputStream(outputFileVideo.toString()));

    The order of execution (for now in my test phase) is creation of the files, starting ffmpeg (through adb shell) and then starting recording which opens the channels. ffmpeg will immediately open the h264 stream and then wait, since it is reading from the pipe the first channel open (for video) will successfully run. When it comes to trying to open the audio the same way, it fails because ffmpeg has not actually started reading from the pipe. I can open a second terminal window and cat the audio file and my app spits out what i hope is encoded aac, but ffmpeg fails, usually just sitting there waiting. Here is the verbose output :

    ffmpeg version N-78385-g855d9d2 Copyright (c) 2000-2016 the FFmpeg
    developers
     built with gcc 4.8 (GCC)
     configuration: --prefix=/home/dev/svn/android-ffmpeg-with-rtmp/src/ffmpeg/android/arm
       --enable-shared --disable-static --disable-doc --disable-ffplay
       --disable-ffprobe --disable-ffserver --disable-symver
       --cross-prefix=/home/dev/dev/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
       --target-os=linux --arch=arm --enable-cross-compile
       --enable-librtmp --enable-pic --enable-decoder=h264
       --sysroot=/home/dev/dev/android-ndk-r10e/platforms/android-19/arch-arm
       --extra-cflags='-Os -fpic -marm'
       --extra-ldflags='-L/home/dev/svn/android-ffmpeg-with-rtmp/src/openssl-android/libs/armeabi '
       --extra-ldexeflags=-pie --pkg-config=/usr/bin/pkg-config
     libavutil      55. 17.100 / 55. 17.100
     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
    matched as AVOption 'debug' with argument 'verbose'.
    Trailing options were found on the commandline.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option async (audio sync method) with argument 1.
    Successfully parsed a group of options.
    Parsing a group of options: input file files/camera-test.h264.
    Successfully parsed a group of options.
    Opening an input file: files/camera-test.h264.
    [file @ 0xb503b100] Setting default whitelist 'file'

    I think if I could just get ffmpeg to start listening to both pipes, the rest would work out !

    Thanks for your time.

    EDIT :
    I’ve made progress by decoupling the audio pipe connection and encoding, but now as soon as the video stream has been passed it errors on audio. I started a separate thread to create the WriteableByteChannel for audio and it never gets passed the FileOutputStream creation.

    matched as AVOption 'debug' with argument 'verbose'.
    Trailing options were found on the commandline.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Successfully parsed a group of options.
    Parsing a group of options: input file files/camera-test.h264.
    Successfully parsed a group of options.
    Opening an input file: files/camera-test.h264.
    [file @ 0xb503b100] Setting default whitelist 'file'
    [h264 @ 0xb503c400] Format h264 probed with size=2048 and score=51
    [h264 @ 0xb503c400] Before avformat_find_stream_info() pos: 0 bytes read:15719 seeks:0
    [h264 @ 0xb5027400] Current profile doesn't provide more RBSP data in PPS, skipping
    [h264 @ 0xb503c400] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
    [h264 @ 0xb503c400] After avformat_find_stream_info() pos: 545242 bytes read:546928 seeks:0 frames:127
    Input #0, h264, from 'files/camera-test.h264':
     Duration: N/A, bitrate: N/A
       Stream #0:0, 127, 1/1200000: Video: h264 (Baseline), 1 reference frame, yuv420p(left), 854x480 (864x480), 1/50, 25 fps, 25 tbr, 1200k tbn, 50 tbc
    Successfully opened the file.
    Parsing a group of options: input file files/audio-test.aac.
    Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
    Successfully parsed a group of options.
    Opening an input file: files/audio-test.aac.
    Unknown decoder 'copy'
    [AVIOContext @ 0xb5054020] Statistics: 546928 bytes read, 0 seeks

    Here is where I attempt to open the audio pipe.

    new Thread(){
        public void run(){
             Log.d("Audio", "pre thread");
             FileOutputStream fs = null;
             try {
                  fs = new FileOutputStream("/data/data/android.com.android.grafika/files/audio-test.aac");
             } catch (FileNotFoundException e) {
                  e.printStackTrace();
             }
             Log.d("Audio", "made fileoutputstream");  //never hits here
             mVideoEncoder.pipeWriterAudio = Channels.newChannel(fs);
             Log.d("Audio", "made it past opening audio pipe");
        }
    }.start();

    Thanks.

  • Evolution #4277 : Pouvoir utiliser InnoDB à la place de MyISAM (patch)

    18 septembre 2019, par b b

    Pour info, chez un hébergeur associatif on utiliser aussi mariadb en mode cluster avec innodb et le SPIP que je viens d’y installer a bien toutes ses tables en innodb. J’ai vérifié sur mon serveur local, idem les tables des bases de mes SPIP sont toutes en innodb. Il semble donc que l’instruction ENGINE=MyISAM peut être ignorée par le serveur, et que dans ce cas le define ne serait pas utile ?

  • Bad video quality and only 3 fps

    25 juillet 2019, par ApplowPi

    There are a few things wrong with the quality of the output file when I run this command.

    arecord -d 0 -r 48000 -c 2 -f S16_LE -t wav -D sysdefault:CARD=tc358743 | avconv -t 0 -i pipe:0 -f v4l2 -i /dev/video0 -c:v libx264 -r 30 -acodec aac -ar 48000 -vcodec flv -strict experimental -y -f flv test.flv

    The audio seems okay at the moment but, if I’m reading it correctly (at the very bottom of the output below), the fps is about 3 and the quality is at 31, which I understand is the worse. This is the output during the process.

    I’m looking to get 30 fps (ideally 60 if possible).

    I’m pretty new to this, any help would be great. Thanks in advance.

    ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
     configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libavresample   3.  1.  0 /  3.  1.  0
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, wav, from 'pipe:0':
     Duration: N/A, bitrate: 1536 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
    [video4linux2,v4l2 @ 0x172e110] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
    [video4linux2,v4l2 @ 0x172e110] Time per frame unknown
    Input #1, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 927.631204, bitrate: N/A
       Stream #1:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, 120 tbr, 1000k tbn, 1000k tbc
    Output #0, flv, to 'test.flv':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 1280x720, q=2-31, 200 kb/s, 120 fps, 1k tbn, 120 tbc
       Metadata:
         encoder         : Lavc57.64.101 flv
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
       Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 128 kb/s
       Metadata:
         encoder         : Lavc57.64.101 aac
    Stream mapping:
     Stream #1:0 -> #0:0 (rawvideo (native) -> flv1 (flv))
     Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
    [wav @ 0x1728730] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
    [video4linux2,v4l2 @ 0x172e110] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
    overrun!!! (at least 9513.101 ms long)44kB time=00:00:00.97 bitrate=2890.9kbits/s speed=0.0987x
    overrun!!! (at least 25.077 ms long) 363kB time=00:00:01.84 bitrate=1614.1kbits/s speed=0.162x
    overrun!!! (at least 254.192 ms long)421kB time=00:00:02.97 bitrate=1159.1kbits/s speed=0.226x
    overrun!!! (at least 93.349 ms long) 441kB time=00:00:03.86 bitrate= 935.3kbits/s speed=0.263x
    overrun!!! (at least 198.942 ms long)461kB time=00:00:04.97 bitrate= 758.6kbits/s speed=0.303x
    overrun!!! (at least 155.909 ms long)526kB time=00:00:06.14 bitrate= 701.0kbits/s speed=0.337x
    frame=   54 fps=2.8 q=31.0 Lsize=     534kB time=00:00:06.67 bitrate= 655.6kbits/s speed=0.352x

    Running different commands to see what happens. This command :

    avconv -t 0 -i /dev/video0 -c:v libx264 -preset ultrafast -y newtest.h264

    Slowly builds up to 40 fps but the result is still poor. Feels like it’s 5 fps not 40. The CPU percentage when running this is 65-70%. Output is :

    ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
     configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libavresample   3.  1.  0 /  3.  1.  0
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    [video4linux2,v4l2 @ 0x16d4600] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
    [video4linux2,v4l2 @ 0x16d4600] Time per frame unknown
    Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 5015.769341, bitrate: N/A
       Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, 59.94 tbr, 1000k tbn, 1000k tbc
    No pixel format specified, yuv422p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x16d77e0] using cpu capabilities: ARMv6 NEON
    [libx264 @ 0x16d77e0] profile High 4:2:2, level 3.2, 4:2:2 8-bit
    Output #0, h264, to 'newtest.h264':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0: Video: h264 (libx264), yuv422p, 1280x720, q=-1--1, 59.94 fps, 59.94 tbn, 59.94 tbc
       Metadata:
         encoder         : Lavc57.64.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame= 1813 fps= 37 q=-1.0 Lsize=    3218kB time=00:00:30.24 bitrate= 871.5kbits/s dup=1700 drop=0 speed=0.617x
    video:3218kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
    [libx264 @ 0x16d77e0] frame I:8     Avg QP:14.00  size:170114
    [libx264 @ 0x16d77e0] frame P:1805  Avg QP:15.46  size:  1071
    [libx264 @ 0x16d77e0] mb I  I16..4: 100.0%  0.0%  0.0%
    [libx264 @ 0x16d77e0] mb P  I16..4:  0.4%  0.0%  0.0%  P16..4:  2.0%  0.0%  0.0%  0.0%  0.0%    skip:97.6%
    [libx264 @ 0x16d77e0] coded y,uvDC,uvAC intra: 43.4% 28.3% 19.2% inter: 1.1% 0.8% 0.2%
    [libx264 @ 0x16d77e0] i16 v,h,dc,p: 61% 26%  8%  5%
    [libx264 @ 0x16d77e0] i8c dc,h,v,p: 68% 12% 17%  4%
    [libx264 @ 0x16d77e0] kb/s:871.45

    Running this command :

    avconv -t 0 -i /dev/video0 -r 60 -c:v libx264 -preset ultrafast -y newtest.flv

    (just specifying a different output file format, results in a CPU usage of about 30% and produces this output :

    avconv -t 0 -i /dev/video0 -r 60 -c:v libx264 -preset ultrafast -y newtest.flv
    ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
     configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libavresample   3.  1.  0 /  3.  1.  0
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    [video4linux2,v4l2 @ 0x527620] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
    [video4linux2,v4l2 @ 0x527620] Time per frame unknown
    Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 6071.912862, bitrate: N/A
       Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, 120 tbr, 1000k tbn, 1000k tbc
    No pixel format specified, yuv422p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x52a870] using cpu capabilities: ARMv6 NEON
    [libx264 @ 0x52a870] profile High 4:2:2, level 3.2, 4:2:2 8-bit
    [libx264 @ 0x52a870] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    Output #0, flv, to 'newtest.flv':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv422p, 1280x720, q=-1--1, 60 fps, 1k tbn, 60 tbc
       Metadata:
         encoder         : Lavc57.64.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame=  158 fps=4.1 q=-1.0 Lsize=     878kB time=00:00:30.70 bitrate= 234.2kbits/s speed=0.803x
    video:874kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.385400%
    [libx264 @ 0x52a870] frame I:1     Avg QP:20.00  size: 68854
    [libx264 @ 0x52a870] frame P:157   Avg QP: 8.93  size:  5261
    [libx264 @ 0x52a870] mb I  I16..4: 100.0%  0.0%  0.0%
    [libx264 @ 0x52a870] mb P  I16..4:  1.4%  0.0%  0.0%  P16..4:  7.7%  0.0%  0.0%  0.0%  0.0%    skip:90.9%
    [libx264 @ 0x52a870] coded y,uvDC,uvAC intra: 28.1% 13.8% 13.4% inter: 3.4% 2.7% 2.3%
    [libx264 @ 0x52a870] i16 v,h,dc,p: 76% 22%  1%  1%
    [libx264 @ 0x52a870] i8c dc,h,v,p: 88%  4%  7%  0%
    [libx264 @ 0x52a870] kb/s:231.42