
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (40)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (6232)
-
AWS Lambda Docker image with librosa and ffmpeg
4 août 2022, par loretoparisiI'm using this
Dockerfile
to build an image for AWS Lambda havinglibrosa
andffmpeg
withpython3.7
:

ARG FUNCTION_DIR="/function"
FROM python:3.7.4-slim-buster as build-image

# librosa and ffmpeg dependencies
RUN apt-get update && apt-get install -y \
 software-properties-common \
 libsndfile1-dev \
 ffmpeg

# Install aws-lambda-cpp build dependencies
RUN apt-get update && \
 apt-get install -y \
 g++ \
 make \
 cmake \
 unzip \
 libcurl4-openssl-dev

# Include global arg in this stage of the build
ARG FUNCTION_DIR
# Create function directory
RUN mkdir -p ${FUNCTION_DIR}

# Copy function code
COPY app.py ${FUNCTION_DIR}

# Install the runtime interface client
RUN pip install \
 --target ${FUNCTION_DIR} \
 awslambdaric

# Multi-stage build: grab a fresh copy of the base image
FROM python:3.7.4-slim-buster

# Include global arg in this stage of the build
ARG FUNCTION_DIR
# Set working directory to function root directory
WORKDIR ${FUNCTION_DIR}

# Copy in the build image dependencies
COPY --from=build-image ${FUNCTION_DIR} ${FUNCTION_DIR}

EXPOSE 8080
ENTRYPOINT [ "/usr/local/bin/python", "-m", "awslambdaric" ]
CMD [ "app.handler" ]



The build works ok, but I cannot run the image :


docker run -e AWS_LAMBDA_RUNTIME_API=localhost:9000 --rm -it -p 9000:8080 lambda:latest
Executing 'app.handler' in function directory '/function'
[ERROR] [1628271126733] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
Traceback (most recent call last):
 File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
 "__main__", mod_spec)
 File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
 exec(code, run_globals)
 File "/function/awslambdaric/__main__.py", line 21, in <module>
 main(sys.argv)
 File "/function/awslambdaric/__main__.py", line 17, in main
 bootstrap.run(app_root, handler, lambda_runtime_api_addr)
 File "/function/awslambdaric/bootstrap.py", line 399, in run
 event_request = lambda_runtime_client.wait_next_invocation()
 File "/function/awslambdaric/lambda_runtime_client.py", line 76, in wait_next_invocation
 response_body, headers = runtime_client.next()
RuntimeError: Failed to get next
</module>


I therefore tried this simplified
Dockerfile
that is based on the AWS EC2 CentOS with package manageryum
:

FROM public.ecr.aws/lambda/python:3.8

# libsndfile
RUN curl -o libsndfile-1.0.28-alt1.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile-1.0.28-alt1.x86_64.rpm 
RUN curl -o libsndfile-devel-1.0.28-alt1.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile-devel-1.0.28-alt1.x86_64.rpm
#ffmpeg
RUN curl -o ffmpeg-4.4-alt5.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//ffmpeg-4.4-alt5.x86_64.rpm 

RUN yum localinstall \
 libsndfile-devel-1.0.28-alt1.x86_64.rpm \
 fmpeg-4.4-alt5.x86_64.rpm

# Create function directory
WORKDIR /app

# Copy function code
COPY app.py .

COPY requirements.txt .
RUN pip install -r requirements.txt

EXPOSE 8080
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
CMD ["/app/app.handler"]



In this case, the image builds and run and I can invoke the handler :


docker run --rm -it -p 9000:8080 lambda:latest
INFO[0000] exec '/var/runtime/bootstrap' (cwd=/app, handler=) 
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'



but I
librosa
complains about thelibsndfile1
installation :

Traceback (most recent call last):
 File "/var/runtime/bootstrap.py", line 452, in main
 request_handler = _get_handler(handler)
 File "/var/runtime/bootstrap.py", line 46, in _get_handler
 m = imp.load_module(modname, file_handle, pathname, desc)
 File "/var/lang/lib/python3.8/imp.py", line 234, in load_module
 return load_source(name, filename, file)
 File "/var/lang/lib/python3.8/imp.py", line 171, in load_source
 module = _load(spec)
 File "<frozen>", line 702, in _load
 File "<frozen>", line 671, in _load_unlocked
 File "<frozen>", line 848, in exec_module
 File "<frozen>", line 219, in _call_with_frames_removed
 File "/app/app.py", line 7, in <module>
 import librosa
 File "/var/lang/lib/python3.8/site-packages/librosa/__init__.py", line 211, in <module>
 from . import core
 File "/var/lang/lib/python3.8/site-packages/librosa/core/__init__.py", line 6, in <module>
 from .audio import * # pylint: disable=wildcard-import
 File "/var/lang/lib/python3.8/site-packages/librosa/core/audio.py", line 8, in <module>
 import soundfile as sf
 File "/var/lang/lib/python3.8/site-packages/soundfile.py", line 142, in <module>
 raise OSError('sndfile library not found')
OSError: sndfile library not found

During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
 File "/var/runtime/bootstrap.py", line 480, in <module>
 main()
 File "/var/runtime/bootstrap.py", line 457, in main
 lambda_runtime_client.post_init_error(to_json(error_result))
 File "/var/runtime/lambda_runtime_client.py", line 42, in post_init_error
 response = runtime_connection.getresponse()
 File "/var/lang/lib/python3.8/http/client.py", line 1344, in getresponse
 response.begin()
 File "/var/lang/lib/python3.8/http/client.py", line 307, in begin
 version, status, reason = self._read_status()
 File "/var/lang/lib/python3.8/http/client.py", line 276, in _read_status
 raise RemoteDisconnected("Remote end closed connection without"
 http.client.RemoteDisconnected: Remote end closed connection without response
 WARN[0023] First fatal error stored in appctx: Runtime.ExitError 
 WARN[0023] Process 16(bootstrap) exited: Runtime exited with error: exit status 1 
 ERRO[0023] Init failed InvokeID= error="Runtime exited with error: exit status 1"
 WARN[0023] Failed to send default error response: ErrInvalidInvokeID 
 ERRO[0023] INIT DONE failed: Runtime.ExitError 
 WARN[0023] Reset initiated: ReserveFail 
</module></module></module></module></module></module></frozen></frozen></frozen></frozen>


The strange thing in this case (
yum
andrmp
) is that the installation seems to work fine :

=> CACHED [2/9] RUN curl -o libsndfile-1.0.28-alt1.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile-1.0.2 0.0s
 => CACHED [3/9] RUN curl -o libsndfile-devel-1.0.28-alt1.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile 0.0s
 => CACHED [4/9] RUN curl -o ffmpeg-4.4-alt5.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//ffmpeg-4.4-alt5.x86_64 0.0s
 => CACHED [5/9] RUN yum localinstall libsndfile-devel-1.0.28-alt1.x86_64.rpm fmpeg-4.4-alt5.x86_64.rpm 



-
How can record music playing on headphone ?
27 avril 2022, par showkeyList all the cards in my pc :


pacmd list-cards 
2 card(s) available.
 index: 1
 name: 
 driver: 
 owner module: 7
 properties:
 alsa.card = "0"
 alsa.card_name = "HD-Audio Generic"
 alsa.long_card_name = "HD-Audio Generic at 0xfccc8000 irq 59"
 alsa.driver_name = "snd_hda_intel"
 device.bus_path = "pci-0000:09:00.1"
 sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:09:00.1/sound/card0"
 device.bus = "pci"
 device.vendor.id = "1002"
 device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
 device.product.id = "15de"
 device.product.name = "Raven/Raven2/Fenghuang HDMI/DP Audio Controller"
 device.string = "0"
 device.description = "Raven/Raven2/Fenghuang HDMI/DP Audio Controller"
 module-udev-detect.discovered = "1"
 device.icon_name = "audio-card-pci"
 profiles:
 output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
 output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
 output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
 output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
 output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
 output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
 output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
 output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
 output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
 off: Off (priority 0, available: unknown)
 active profile: <off>
 ports:
 hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
 properties:
 device.icon_name = "video-display"
 hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
 properties:
 device.icon_name = "video-display"
 hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
 properties:
 device.icon_name = "video-display"
 index: 2
 name: 
 driver: 
 owner module: 8
 properties:
 alsa.card = "2"
 alsa.card_name = "HD-Audio Generic"
 alsa.long_card_name = "HD-Audio Generic at 0xfccc0000 irq 60"
 alsa.driver_name = "snd_hda_intel"
 device.bus_path = "pci-0000:09:00.6"
 sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:09:00.6/sound/card2"
 device.bus = "pci"
 device.vendor.id = "1022"
 device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
 device.product.id = "15e3"
 device.product.name = "Family 17h (Models 10h-1fh) HD Audio Controller"
 device.string = "2"
 device.description = "Family 17h (Models 10h-1fh) HD Audio Controller"
 module-udev-detect.discovered = "1"
 device.icon_name = "audio-card-pci"
 profiles:
 input:analog-stereo: Analog Stereo Input (priority 65, available: no)
 output:analog-stereo: Analog Stereo Output (priority 6500, available: unknown)
 output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: no)
 output:analog-surround-40: Analog Surround 4.0 Output (priority 1200, available: unknown)
 output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 1265, available: no)
 output:analog-surround-51: Analog Surround 5.1 Output (priority 1300, available: unknown)
 output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 1365, available: no)
 output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
 output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5565, available: no)
 output:iec958-ac3-surround-51: Digital Surround 5.1 (IEC958/AC3) Output (priority 300, available: unknown)
 output:iec958-ac3-surround-51+input:analog-stereo: Digital Surround 5.1 (IEC958/AC3) Output + Analog Stereo Input (priority 365, available: no)
 off: Off (priority 0, available: unknown)
 active profile: 
 sinks:
 alsa_output.pci-0000_09_00.6.analog-stereo/#0: Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo
 sources:
 alsa_output.pci-0000_09_00.6.analog-stereo.monitor/#1: Monitor of Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo
 ports:
 analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
 properties:
 device.icon_name = "audio-input-microphone"
 analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
 properties:
 device.icon_name = "audio-input-microphone"
 analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
 properties:
 
 analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
 properties:
 
 analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)
 properties:
 device.icon_name = "audio-headphones"
 iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
 properties:
</off>


Playing a music on speaker,record it with ffmpeg and save as
music.mp3
in current directory.

device_speaker="alsa_output.pci-0000_09_00.6.analog-stereo.monitor"
ffmpeg -f pulse -i $device_speaker music.mp3



I turn off the speaker and play the music on my headphone,how can record it with ffmpeg ?


-
cannot hear audio after saving RTSP stream as ts or avi or mp4 files using ffmpeg command
28 mai 2022, par ewangI am still new to ffmpeg and trying to save RTSP stream from the IP camera (Meraki MV2) via RTSP link (rtsp ://192.168.0.80:9000/live) to local laptop (Windows 10) as ts file, or avi or mp4 files, but none of them can hear sound. In Meraki MV2 camera dashboard audio is enabled
meraki dashboard audio enabled screenshot


And below is the ffmpeg command i used :


ffmpeg -use_wallclock_as_timestamps 1 -rtsp_transport tcp -i rtsp://192.168.0.80:9000/live -f mpegts -b 400k -r 25 -vcodec libx264 -s 640x480 -aspect 4:3 -bufsize 6000k -acodec aac -ab 56k -ac 2 -ar 22050 -bf 0 -level 30 -y record_a_v.ts



In below part of the result log, noticed Steam mapping has a #0:1 -> #0:0 and #0:0 -> #0:1, is it supposed to be crossed or not really ?


Input #0, rtsp, from 'rtsp://192.168.0.80:9000/live':
 Metadata:
 title : www rtsp live
 comment : LIVE555 Streaming Media v2017.01.26
 Duration: N/A, start: 1653723857.755958, bitrate: N/A
 Stream #0:0: Audio: aac (LC), 48000 Hz, mono, fltp
 Stream #0:1: Video: h264 (High), yuvj420p(pc, smpte170m, progressive), 1920x1080, 90k tbr, 90k tbn
Stream mapping:
 Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:0 -> #0:1 (aac (native) -> aac (native))



Here are the last section of the result log :


Last message repeated 4 times
Error while decoding stream #0:0: Invalid argument:00:09.44 bitrate= 79.3kbits/s dup=0 drop=2 speed=1.38x
 Last message repeated 1 times
[aac @ 0000027bec8ee780] Queue input is backward in time
Error while decoding stream #0:0: Invalid argument
[mpegts @ 0000027bee8cfac0] Non-monotonous DTS in output stream 0:1; previous: 868241, current: 867392; changing to 868242. This may result in incorrect timestamps in the output file.
Error while decoding stream #0:0: Invalid argument
 Last message repeated 12 times
Error while decoding stream #0:0: Invalid argument:00:09.90 bitrate= 111.7kbits/s dup=0 drop=2 speed=1.35x
 Last message repeated 6 times
Error while decoding stream #0:0: Invalid argument:00:10.51 bitrate= 121.5kbits/s dup=0 drop=2 speed=1.34x
 Last message repeated 19 times
Error while decoding stream #0:0: Invalid argument:00:11.01 bitrate= 137.9kbits/s dup=0 drop=2 speed=1.31x
 Last message repeated 10 times
Error while decoding stream #0:0: Invalid argument:00:11.51 bitrate= 145.2kbits/s dup=0 drop=2 speed=1.29x
 Last message repeated 9 times
Error while decoding stream #0:0: Invalid argument:00:12.12 bitrate= 154.5kbits/s dup=0 drop=2 speed=1.29x
 Last message repeated 21 times
Error while decoding stream #0:0: Invalid argument:00:12.50 bitrate= 167.7kbits/s dup=0 drop=2 speed=1.26x
 Last message repeated 8 times
Error while decoding stream #0:0: Invalid argument:00:13.08 bitrate= 160.2kbits/s dup=0 drop=2 speed=1.25x
 Last message repeated 11 times
Error while decoding stream #0:0: Invalid argument:00:13.61 bitrate= 154.0kbits/s dup=0 drop=2 speed=1.24x
 Last message repeated 8 times
Error while decoding stream #0:0: Invalid argument:00:14.11 bitrate= 148.5kbits/s dup=0 drop=2 speed=1.23x
 Last message repeated 16 times
Error while decoding stream #0:0: Invalid argument:00:14.61 bitrate= 143.5kbits/s dup=0 drop=2 speed=1.22x
 Last message repeated 10 times
Error while decoding stream #0:0: Invalid argument:00:15.14 bitrate= 138.4kbits/s dup=0 drop=2 speed=1.21x
 Last message repeated 18 times
Error while decoding stream #0:0: Invalid argument:00:15.62 bitrate= 134.2kbits/s dup=0 drop=2 speed= 1.2x
 Last message repeated 6 times
Error while decoding stream #0:0: Invalid argument:00:16.14 bitrate= 129.9kbits/s dup=0 drop=2 speed=1.19x
 Last message repeated 15 times
Error while decoding stream #0:0: Invalid argument:00:16.64 bitrate= 251.9kbits/s dup=0 drop=2 speed=1.19x
 Last message repeated 9 times
Error while decoding stream #0:0: Invalid argument:00:17.11 bitrate= 245.1kbits/s dup=0 drop=2 speed=1.18x
 Last message repeated 15 times
frame= 125 fps=8.3 q=27.0 size= 512kB time=00:00:17.66 bitrate= 237.5kbits/s dup=0 drop=2 speed=1.17x

[q] command received. Exiting.

frame= 125 fps=8.2 q=-1.0 Lsize= 922kB time=00:00:17.75 bitrate= 425.1kbits/s dup=0 drop=2 speed=1.16x
video:843kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.064729%
[libx264 @ 0000027bee8cd640] frame I:1 Avg QP:17.27 size: 54983
[libx264 @ 0000027bee8cd640] frame P:124 Avg QP:22.65 size: 6516
[libx264 @ 0000027bee8cd640] mb I I16..4: 4.2% 60.5% 35.2%
[libx264 @ 0000027bee8cd640] mb P I16..4: 0.1% 2.4% 0.4% P16..4: 39.2% 11.9% 10.2% 0.0% 0.0% skip:35.9%
[libx264 @ 0000027bee8cd640] 8x8 transform intra:77.2% inter:55.0%
[libx264 @ 0000027bee8cd640] coded y,uvDC,uvAC intra: 93.1% 91.5% 65.1% inter: 26.5% 37.1% 6.2%
[libx264 @ 0000027bee8cd640] i16 v,h,dc,p: 8% 2% 8% 81%
[libx264 @ 0000027bee8cd640] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 9% 24% 5% 16% 12% 12% 6% 6%
[libx264 @ 0000027bee8cd640] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 9% 16% 6% 11% 14% 6% 6% 6%
[libx264 @ 0000027bee8cd640] i8c dc,h,v,p: 64% 12% 20% 5%
[libx264 @ 0000027bee8cd640] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000027bee8cd640] ref P L0: 77.9% 10.9% 7.7% 3.5%
[libx264 @ 0000027bee8cd640] kb/s:435.85
[aac @ 0000027bec8ee780] Qavg: 65536.000



Can anyone help checking where went wrong ? Thanks