Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (62)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (10288)

  • need help using ffmpeg to "concat" multiple audio files (webm, mp4) to make one longer MP3 of audio

    28 septembre 2020, par djturbojp7

    I have done some searching (for several hours) and tried to manipulate many examples to work for me, but I still keep coming up empty here.

    


    I am using linux-mint 19, with ffmpeg installed. I have a folder with several audio files. The majority of these are "webm" (with no video) and there are a few "m4a". I am trying to make one long mp3 file from the audio in all of these strung together from start to finish.

    


    Lets say for sake of argument, my directory has the following files :

    


    audio file a.webm
audio file b.webm
audio file c.m4a
audio file d.webm


    


    I found a script that I could write online where someone is creating a file called "mylist.txt" with this bit of code :

    


        # with a bash for loop
for f in ./*.*; do echo "file '$f'" >> mylist.txt; done
# or with printf
printf "file '%s'\n" ./*.* > mylist.txt


    


    this generated a text file with the following type of content :

    


    file './audio file a.webm'
file './audio file b.webm'
file './audio file c.m4a'
file './audio file d.webm'


    


    first, I believe the "./" is causing a problem, because when I look at other examples I don't see this but I am not sure why it is generating this way in my script because I don't see this in web examples online. Second, I have tried to "concate" this with ffmpeg but I'm not sure which is the best option. I found some documentation here :

    


    https://trac.ffmpeg.org/wiki/Concatenate

    


    however this example applies to video specifically

    


    Can anyone lead me in the right direction ?

    


    EDIT******

    


    I tried the solution below, with "mylist.txt" as the input and I am getting an error :

    


        user@machine/TEMP$ ffmpeg -i mylist.txt -filter_complex "[0:a][1:a][2:a][3:a]concat=n=20:a=1:v=0[a]" -map "[a]" output.mp3
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, tty, from 'mylist.txt':
  Duration: 00:00:00.40, bitrate: 47 kb/s
    Stream #0:0: Video: ansi, pal8, 640x400, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream specifier ':a' in filtergraph description [0:a][1:a][2:a][3:a]concat=n=20:a=1:v=0[a] matches no streams.


    


  • ignore "channel_layout" when working with multichannel audio in ffmpeg

    21 mars 2024, par umläute

    I'm working with multichannel audio files (higher-order ambisonics), that typically have at least 16 channels.

    


    Sometimes I'm only interested in a subset of the audiochannels (e.g. the first 25 channels of a file that contains even more channels).

    


    For this I have a script like the following, that takes a multichannel input file, an output file and the number of channels I want to extract :

    


    #!/bin/sh
infile=$1
outfile=$2
channels=$3

channelmap=$(seq -s"|" 0 $((channels-1)))

ffmpeg -y -hide_banner \
  -i "${infile}" \
  -filter_complex "[0:a]channelmap=${channelmap}" \
  -c:a  libopus -mapping_family 255 -b:a 160k -sample_fmt s16 -vn -f webm -dash 1 \
  "${outfile}"


    


    The actual channel extraction is done via the channelmap filter, that is invoked with something like -filter:complex "[0:a]channelmap=0|1|2|3"

    


    This works great with 1,2,4 or 16 channels.

    


    However, it fails with 9 channels, and 25 and 17 (and generally anything with >>16 channels).

    


    The error I get is :

    


    $ ffmpeg -y -hide_banner -i input.wav  -filter_complex "[0:a]channelmap=0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16" -c:a libopus -mapping_family 255 -b:a 160k  -sample_fmt s16 -vn -f webm -dash 1 output.webm
Input #0, wav, from 'input.wav':
  Duration: 00:00:09.99, bitrate: 17649 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 25 channels, s16, 17640 kb/s
[Parsed_channelmap_0 @ 0x5568874ffbc0] Output channel layout is not set and cannot be guessed from the maps.
[AVFilterGraph @ 0x5568874fff40] Error initializing filter 'channelmap' with args '0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16'
Error initializing complex filters.
Invalid argument


    


    So ffmpeg cannot guess the channel layout for a 17 channel file.
ffmpeg -layouts only lists channel layouts with 1,2,3,4,5,6,7,8 & 16.

    


    However, I really don't care about the channel layout. The entire concept of "channel layout" is centered around the idea, that each audio channel should go to a different speaker.
But my audio channels are not speaker feeds at all.

    


    So I tried providing explicit channel layouts, with something like -filter_complex "[0:a]channelmap=map=0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16:channel_layout=unknown", but this results in an error when parsing the channel layout :

    


    $ ffmpeg -y -hide_banner -i input.wav  -filter_complex "[0:a]channelmap=map=0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16:channel_layout=unknown" -c:a  libopus -mapping_family 255 -b:a 160k  -sample_fmt s16 -vn -f webm -dash 1 output.webm
Input #0, wav, from 'input.wav':
  Duration: 00:00:09.99, bitrate: 17649 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 25 channels, s16, 17640 kb/s
[Parsed_channelmap_0 @ 0x55b60492bf80] Error parsing channel layout: 'unknown'.
[AVFilterGraph @ 0x55b604916d00] Error initializing filter 'channelmap' with args 'map=0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16:channel_layout=unknown'
Error initializing complex filters.
Invalid argument


    


    I also tried values like any, all, none, 0x0 and 0xFF with the same result.
I tried using mono (as the channels are kind-of independent), but ffmpeg is trying to be clever and tells me that a mono layout must not have 17 channels.

    


    I know that ffmpeg can handle multi-channel files without a layout.
E.g. converting a 25-channel file without the -filter_complex "..." works without problems, and ffprobe gives me an unknown channel layout.

    


    So : how do I tell ffmpeg to just not care about the channel_layout when creating an output file that only contains a subset of the input channels ?

    


  • while using opencv in python getting error —>[h264 @ 0x7fd8f4027fc0] error while decoding MB 12 46, bytestream -6 "

    22 janvier 2021, par Himanshu sharma

    I am getting this error —> " [h264 @ 0x7fd8f4027fc0] error while decoding MB 12 46, bytestream -6 "
    
while straming IP camera in python using opencv module.
    
As this error occure, i can't ableenter image description here to save video. You can see this in video enter image description here

    


    Python-> 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux OS-
Ubuntu - 20.04
OpenCV - 4.4.0
opencv-contrib-python==4.4.0.46

    


    ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil      56. 31.100 / 56. 31.100
libavcodec     58. 54.100 / 58. 54.100
libavformat    58. 29.100 / 58. 29.100
libavdevice    58.  8.100 / 58.  8.100
libavfilter     7. 57.100 /  7. 57.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  5.100 /  5.  5.100
libswresample   3.  5.100 /  3.  5.100
libpostproc    55.  5.100 / 55.  5.100
himanshu@himanshu-H81M-S:~$