Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (64)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

  • Alsa cannot set sample format[FFMPEG]

    18 mai 2017, par caiomcg

    I am trying to capture a pcm stream from a Roland USB device with ffmpeg and wrap it with wav. The command line I am using is the following :

    ffmpeg -f alsa -acodec pcm_s32le -ac 2 -ar 48000 -i hw:2,0 out.wav

    Which comply with the settings of the hardware. I can also capture the stream with Audacity. The problem is that FFMPEG throws "cannot set sample format error". Any idea of what may be happening and how I can fix this ?

    Thanks in advance.

    FFMPEG OUTPUT

    user@user:~$ ffmpeg -f alsa -acodec pcm_s32le -ac 2 -ar 48000 -i hw:2,0 out.wav
       ffmpeg version N-85548-g3390a2b Copyright (c) 2000-2017 the FFmpeg developers
         built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
         configuration: --enable-gpl --enable-libx264 --enable-libx265 --enable-libvpx --enable-libvorbis --enable-libopus --enable-ffplay
         libavutil      55. 61.100 / 55. 61.100
         libavcodec     57. 92.100 / 57. 92.100
         libavformat    57. 72.101 / 57. 72.101
         libavdevice    57.  7.100 / 57.  7.100
         libavfilter     6. 84.101 /  6. 84.101
         libswscale      4.  7.101 /  4.  7.101
         libswresample   2.  8.100 /  2.  8.100
         libpostproc    54.  6.100 / 54.  6.100
       [alsa @ 0x34b6780] cannot set sample format 0x10008 10 (Invalid argument)
       hw:2,0: Input/output error

    ARECORD OUTPUT :

    user@user:~$ arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 1: PCH [HDA Intel PCH], device 0: ALC3236 Analog [ALC3236 Analog]
     Subdevices: 1/1
     Subdevice #0: subdevice #0
    card 2: DUOCAPTURE [DUO-CAPTURE], device 0: USB Audio [USB Audio]
     Subdevices: 1/1
     Subdevice #0: subdevice #0

    After Deimus help I checked the setting for my card in arecord and used the correct line for FFMPEG (Notice that I have changed the capture frequency on the hardware).

    ARECORD OUTPUT

    user@user:~$ arecord --dump-hw-params -D hw:2,0
    Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
    HW Params of device "hw:2,0":
    --------------------
    ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
    FORMAT:  S24_3LE
    SUBFORMAT:  STD
    SAMPLE_BITS: 24
    FRAME_BITS: 48
    CHANNELS: 2
    RATE: 44100
    PERIOD_TIME: (1020 1981429)
    PERIOD_SIZE: [45 87381]
    PERIOD_BYTES: [270 524286]
    PERIODS: [2 1024]
    BUFFER_TIME: (2040 3962858)
    BUFFER_SIZE: [90 174762]
    BUFFER_BYTES: [540 1048572]
    TICK_TIME: ALL
    --------------------
    arecord: set_params:1233: Sample format non available
    Available formats:
    - S24_3LE

    Correct command line

    ffmpeg -f alsa -acodec pcm_s24le -ac 2 -ar 44100 -i hw:2,0 out.wav
  • Normalize video contrast to the full dynamic range with ffmpeg ?

    18 mai 2017, par Roofus

    The following ImageMagick command line normalizes the RGB channels of an image individually, so that in each channel, the smallest value maps to 0 and the largest value maps to 255 :

    convert fish.jpg -channel all -contrast-stretch 0.003x0.003% fish2.jpg

    fish.jpg
    fish2.jpg

    Is there an ffmpeg filter which can normalize the RGB channels of every individual frame of a video ?

    The only filter I can find is "histeq", which equalizes (flattens) rather than normalizes the contrast. I have applied it per RGB channel using variations on this command line :

    ffmpeg -i fish.jpg -vf "format=rgb24,extractplanes=r+g+b[r][g][b],[r]histeq=strength=.1[r2],[g]histeq=strength=.1[g2],[b]histeq=strength=.1[b2],[g2][b2][r2]mergeplanes=0x001020:gbrp" fish3.jpg

    but since it tries to flatten the histogram, it always gives a much different (unacceptable) result ; for example, the imgur image whose code is eHL51.jpg (not enough reputation for link).

    Based on this answer :
    video normalization with ffmpeg
    I have also tested -vf "scale=out_range=full" and -vf "pp=al:f" (see the log below) but in both cases the result fish3.jpg was unchanged from fish.jpg, so apparently nothing was done.

    C:\Users\Roofus\Desktop>ffmpeg -i fish.jpg -vf scale=out_range=full -color_range 2 -pix_fmt yuvj420p fish3.jpg
    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-
    avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libb
    luray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-l
    ibmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libope
    njpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enabl
    e-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable
    -libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zli
    b
     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
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    Input #0, image2, from 'fish.jpg':
     Duration: 00:00:00.04, start: 0.000000, bitrate: 3942 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 960x540 [SAR 96:96 DAR 16:9], 25 tbr, 25 tbn, 25 t
    bc
    [swscaler @ 0000000000442f60] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to 'fish3.jpg':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0: Video: mjpeg, yuvj420p(pc), 960x540 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.64.101 mjpeg
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=2.2 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=   5x
    video:23kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    C:\Users\Roofus\Desktop>fish3.jpg

    C:\Users\Roofus\Desktop>ffmpeg -i fish.jpg -vf "pp=al:f" -color_range 2 -pix_fmt yuvj420p fish3.jpg
    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-
    avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libb
    luray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-l
    ibmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libope
    njpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enabl
    e-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable
    -libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zli
    b
     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
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    Input #0, image2, from 'fish.jpg':
     Duration: 00:00:00.04, start: 0.000000, bitrate: 3942 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 960x540 [SAR 96:96 DAR 16:9], 25 tbr, 25 tbn, 25 t
    bc
    File 'fish3.jpg' already exists. Overwrite ? [y/N] y
    [Parsed_pp_0 @ 0000000000321da0] This syntax is deprecated. Use '|' to separate the list items.
    Output #0, image2, to 'fish3.jpg':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0: Video: mjpeg, yuvj420p(pc), 960x540 [SAR 96:96 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.64.101 mjpeg
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=2.2 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=4.44x
    video:23kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    C:\Users\Roofus\Desktop>fish3.jpg
  • Video stamping in Android

    18 mai 2017, par bhavesh solanki

    I want to stamp custom text on video recorded by my app, here i am using FFmpeg Video Library and throwing this command to stamp custom text on video as a stamp.

    ffmpeg -i /storage/emulated/0/RecordThrow/VID_20170510_195716.mp4 -vf drawtext="text='mycustomtext'" -codec:a copy /storage/emulated/0/output.mp4

    but I got invalid output format error and sometimes the process run for a long time and didn’t get a stamp on the video, after killing process I saw empty output.mp4 file on my device.so help me out about this issues.
    I think the main problem is in FFmpeg command that I posted.

    i am following this tutorial but i am getting below error :

    ************error**********

    built with gcc 4.8 (GCC) configuration : —target-os=linux
    —cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-
    —arch=arm —cpu=cortex-a8 —enable-runtime-cpudetect —sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot
    —enable-pic —enable-libx264 —enable-libass —enable-libfreetype —enable-libfribidi —enable-libmp3lame —enable-fontconfig —enable-pthreads —disable-debug —disable-ffserver —enable-version3 —enable-hardcoded-tables —disable-ffplay —disable-ffprobe —enable-gpl —enable-yasm —disable-doc —disable-shared —enable-static —pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config —prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a —extra-cflags=’-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include
    -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all’ —extra-ldflags=’-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib
    -Wl,-z,relro -Wl,-z,now -pie’ —extra-libs=’-lpng -lexpat -lm’ —extra-cxxflags= 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 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa62d3000] sample aspect ratio already set to 1:1, ignoring ’pasp’ atom (65536:65536) Input #0,
    mov,mp4,m4a,3gp,3g2,mj2, from
    ’/storage/emulated/0/RecordThrow/VID_20170510_195716.mp4’ :
    Metadata :
    major_brand : mp42
    minor_version : 0
    compatible_brands : isommp42
    creation_time : 2017-05-10 14:27:20
    com.android.version : 7.0 Duration : 00:00:02.70, start : 0.000000, bitrate : 16857 kb/s
    Stream #0:0(eng) : Video : h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 640x480, 16693 kb/s, SAR 1:1 DAR 4:3, 29.93
    fps, 30 tbr, 90k tbn, 180k tbc (default)
    Metadata :
    rotate : 90
    creation_time : 2017-05-10 14:27:20
    handler_name : VideoHandle
    Side data :
    displaymatrix : rotation of -90.00 degrees
    Stream #0:1(eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 129 kb/s (default)
    Metadata :
    creation_time : 2017-05-10 14:27:20
    handler_name : SoundHandle [NULL @ 0xa62d4800] Unable to find a suitable output format for ’ ffmpeg’ ffmpeg : Invalid argument