
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (76)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
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 (8390)
-
ffprobe newer version detect audio codec incorrectly
16 janvier, par alanccI find a strange problem.


I have a test video with h264 video codec and aac audio codec. It is at https://drive.google.com/file/d/1YAyz5cO0kb9r0MgahCpISR4bZ_1_n8PL/view?usp=sharing


I build a ffmpeg version by myself, its version is :


ffprobe version 7.0.2 Copyright (c) 2007-2024 the FFmpeg developers
 built with gcc 14.1.0 (Rev3, Built by MSYS2 project)
 configuration: --enable-shared
 libavutil 59. 8.100 / 59. 8.100
 libavcodec 61. 3.100 / 61. 3.100
 libavformat 61. 1.100 / 61. 1.100
 libavdevice 61. 1.100 / 61. 1.100
 libavfilter 10. 1.100 / 10. 1.100
 libswscale 8. 1.100 / 8. 1.100
 libswresample 5. 1.100 / 5. 1.100



I then use ffprobe to get its info :


ffprobe -v quiet -print_format ini -show_streams -show_packets test_h264.mp4 > test_h264.ini



Then I get an ini file which shows the audio codec as MP2 :


[streams.stream.0]
index=0
codec_name=mp2
codec_long_name=MP2 (MPEG audio layer 2)
profile=unknown
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
initial_padding=0
id=0x1
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=2788
start_time=0.063220
duration_ts=435455
duration=9.874263
bit_rate=127706
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=378
nb_read_frames=N/A
nb_read_packets=378



Another developer he uses his version of ffprobe :


ffprobe version 2023-02-22-git-d5cc7acff1-full_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers 



Based on the year, my version(2024) should be newer than his(2023), but his version of ffprobe can get the audio codec properly :


[streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
initial_padding=0
id=0x2
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=1764
start_time=0.040000
duration_ts=436480
duration=9.897506
bit_rate=111733
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=427
nb_read_frames=N/A
nb_read_packets=427
extradata_size=5



Why ?


I also tried a ffprobe version on ubuntu with the following version :


ffprobe version 6.1.1-3ubuntu5 Copyright (c) 2007-2023 the FFmpeg developers
 built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)
 configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
 libavutil 58. 29.100 / 58. 29.100
 libavcodec 60. 31.102 / 60. 31.102
 libavformat 60. 16.100 / 60. 16.100
 libavdevice 60. 3.100 / 60. 3.100
 libavfilter 9. 12.100 / 9. 12.100
 libswscale 7. 5.100 / 7. 5.100
 libswresample 4. 12.100 / 4. 12.100
 libpostproc 57. 3.100 / 57. 3.100



It will detect the audio as aac properly, but with different parameters, for example, bit_rate is 111733(developer) but 110399(ubuntu). But this parameter comes from the same file so should be the same.


[streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
initial_padding=0
id=0x2
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=0
start_time=0.000000
duration_ts=441353
duration=10.008005
bit_rate=110399
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=432
nb_read_frames=N/A
nb_read_packets=432
extradata_size=5




-
How do I get drawtext filter in ffmpeg to work on ubuntu 22.04 ?
3 décembre 2024, par chovyHere's my script, but no matter what I try the drawtext filter is not enabled :


#!/bin/bash

set -e # Exit on any error

# Define installation directories
INSTALL_DIR="$HOME/ffmpeg_build"
BIN_DIR="$HOME/bin"
SOURCE_DIR="$HOME/ffmpeg_sources"
NUM_CORES=$(nproc)

echo "Creating necessary directories..."
mkdir -p "$INSTALL_DIR" "$BIN_DIR" "$SOURCE_DIR"

# Install required tools and dependencies
echo "Installing build tools and essential libraries..."
sudo apt-get update
sudo apt-get install -y \
 autoconf automake build-essential cmake git-core libass-dev \
 libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev \
 libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev \
 meson ninja-build pkg-config texinfo wget yasm zlib1g-dev \
 nasm libnuma-dev libfdk-aac-dev libmp3lame-dev libopus-dev \
 libfreetype6 libdrm-dev mercurial

# Remove system-installed x264 and x265 to prevent conflicts
sudo apt-get remove -y libx264-dev libx265-dev x264 x265

# Build dependencies
cd "$SOURCE_DIR"

# Install libx264 (static)
if [ ! -d "$SOURCE_DIR/x264" ]; then
 echo "Building and installing libx264..."
 git clone --branch stable --depth 1 https://code.videolan.org/videolan/x264.git
 cd x264
 make distclean || true
 ./configure --prefix="$INSTALL_DIR" --enable-static --disable-opencl
 make -j$NUM_CORES
 make install
 cd "$SOURCE_DIR"
fi

# Install libx265 (static)
if [ ! -d "$SOURCE_DIR/x265" ]; then
 echo "Building and installing libx265..."
 git clone --depth 1 https://github.com/videolan/x265.git
 cd x265/build/linux
 cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
 -DENABLE_SHARED=OFF -DENABLE_PIC=ON -DENABLE_PKGCONFIG=ON ../../source
 make -j$NUM_CORES
 make install
 cd "$SOURCE_DIR"
fi

# Install libvpx (static)
if [ ! -d "$SOURCE_DIR/libvpx" ]; then
 echo "Building and installing libvpx..."
 git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
 cd libvpx
 ./configure --prefix="$INSTALL_DIR" --disable-examples --disable-unit-tests \
 --enable-vp9-highbitdepth --as=yasm --enable-static --enable-pic
 make -j$NUM_CORES
 make install
 cd "$SOURCE_DIR"
fi

# Install libopus (static)
if [ ! -d "$SOURCE_DIR/opus" ]; then
 echo "Building and installing libopus..."
 git clone --depth 1 https://github.com/xiph/opus.git
 cd opus
 ./autogen.sh
 ./configure --prefix="$INSTALL_DIR" --disable-shared
 make -j$NUM_CORES
 make install
 cd "$SOURCE_DIR"
fi

# Install libaom (static)
if [ ! -d "$SOURCE_DIR/aom" ]; then
 echo "Building and installing libaom..."
 git clone --depth 1 https://aomedia.googlesource.com/aom
 mkdir -p aom_build
 cd aom_build
 cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
 -DBUILD_SHARED_LIBS=0 -DENABLE_NASM=1 -DCMAKE_C_FLAGS="-fPIC" ../aom
 make -j$NUM_CORES
 make install
 cd "$SOURCE_DIR"
fi

# Build and install FFmpeg
echo "Building and installing FFmpeg..."
cd "$SOURCE_DIR"
if [ ! -d "$SOURCE_DIR/ffmpeg" ]; then
 git clone --depth 1 https://git.ffmpeg.org/ffmpeg.git ffmpeg
 cd ffmpeg
else
 cd ffmpeg
 git pull
fi

export PKG_CONFIG_PATH="$INSTALL_DIR/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/$(uname -m)-linux-gnu/pkgconfig:$PKG_CONFIG_PATH"

make distclean

./configure \
 --prefix="$INSTALL_DIR" \
 --pkg-config-flags="--static" \
 --extra-cflags="-I$INSTALL_DIR/include" \
 --extra-ldflags="-L$INSTALL_DIR/lib" \
 --extra-libs="-lpthread -lm" \
 --bindir="$BIN_DIR" \
 --enable-gpl \
 --enable-nonfree \
 --enable-libfreetype \
 --enable-libx264 \
 --enable-libvpx \
 --enable-libmp3lame \
 --enable-libopus \
 --enable-libass \
 --enable-libvorbis \
 --enable-libaom \
 --enable-libdrm \
 --enable-version3 \
 --enable-static \
 --disable-shared \
 --enable-small
 
make -j$NUM_CORES
make install

# Add ffmpeg to PATH
echo "export PATH=\"$BIN_DIR:\$PATH\"" >> "$HOME/.bashrc"
source "$HOME/.bashrc"

# Final checks
echo "FFmpeg installation complete. Verifying installation..."
ffmpeg -version




Here is my buildconf which appears correct :


$ ffmpeg -buildconf 

ffmpeg version N-117989-gcb27e478f7 Copyright (c) 2000-2024 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
 configuration: --prefix=/usr/local --extra-cflags=-I/home/ubuntu/src/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/src/ffmpeg_build/lib --bindir=/usr/local/bin --enable-gpl --enable-nonfree --enable-libfreetype --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libass --enable-libvorbis --enable-libaom --enable-libdrm --enable-version3 --enable-shared --enable-filter=drawtext libavutil 59. 47.101 / 59. 47.101 libavcodec 61. 26.100 / 61. 26.100 libavformat 61. 9.100 / 61. 9.100 libavdevice 61. 4.100 / 61. 4.100 libavfilter 10. 6.101 / 10. 6.101 libswscale 8. 12.100 / 8. 12.100 libswresample 5. 4.100 / 5. 4.100
 libpostproc 58. 4.100 / 58. 4.100

 configuration: --prefix=/usr/local
 --extra-cflags=-I/home/ubuntu/src/ffmpeg_build/include
 --extra-ldflags=-L/home/ubuntu/src/ffmpeg_build/lib
 --bindir=/usr/local/bin
 --enable-gpl --enable-nonfree --enable-libfreetype --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libass --enable-libvorbis --enable-libaom --enable-libdrm --enable-version3 --enable-shared --enable-filter=drawtext



However the filter drawtext is not enabled :


$ ffmpeg -filters | grep drawtext
ffmpeg version N-117989-gcb27e478f7 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04) configuration: --prefix=/usr/local --extra-cflags=-I/home/ubuntu/src/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/src/ffmpeg_build/lib --bindir=/usr/local/bin --enable-gpl --enable-nonfree --enable-libfreetype --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libass --enable-libvorbis --enable-libaom --enable-libdrm --enable-version3 --enable-shared --enable-filter=drawtext libavutil 59. 47.101 / 59. 47.101 libavcodec 61. 26.100 / 61. 26.100 libavformat 61. 9.100 / 61. 9.100 libavdevice 61. 4.100 / 61. 4.100 libavfilter 10. 6.101 / 10. 6.101 libswscale 8. 12.100 / 8. 12.100 libswresample 5. 4.100 / 5. 4.100 libpostproc 58. 4.100 / 58. 4.100



-
FFmpeg wrong codecstring for DASH manifest [closed]
21 novembre 2024, par SuxsemI'm trying to create a DASH stream with ffmpeg with the following command :


ffmpeg -i rtsp://admin:***@camera-retro.lan/ch0_0 ^
 -map 0 ^
 -codec:v copy ^
 -codec:a copy ^
 -f dash ^
 -use_template 1 ^
 -use_timeline 1 ^
 -window_size 50 ^
 -extra_window_size 5 ^
 -seg_duration 5 ^
 tmp/output.mpd



The problem is the generated manifest doesn't contain a valid codecstring for the video part (note the codecs="hev1" part) and thus is not playable by the browser :


<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" minimumupdateperiod="PT6S" suggestedpresentationdelay="PT6S" availabilitystarttime="2024-11-21T12:05:52.604Z" publishtime="2024-11-21T12:05:57.559Z" timeshiftbufferdepth="PT5M1.9S" maxsegmentduration="PT5.0S" minbuffertime="PT12.0S">
 <programinformation>
 
 </programinformation>
 <servicedescription>
 </servicedescription>
 <period start="PT0.0S">
 <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" maxwidth="2304" maxheight="1296" par="16:9">
 <representation mimetype="video/mp4" codecs="hev1" bandwidth="822093" width="2304" height="1296" scantype="unknown" sar="1:1">
 <segmenttemplate timescale="90000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 <segmenttimeline>
 <s t="0" d="542990"></s>
 </segmenttimeline>
 </segmenttemplate>
 </representation>
 </adaptationset>
 <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true">
 <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="34143" audiosamplingrate="16000">
 <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"></audiochannelconfiguration>
 <segmenttemplate timescale="16000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 <segmenttimeline>
 <s t="0" d="81001"></s>
 </segmenttimeline>
 </segmenttemplate>
 </representation>
 </adaptationset>
 </period>
</mpd>



This is the output of ffprobe :


SDP:
v=0
o=- 1732188474342789 1 IN IP4 192.168.12.162
s=Session streamed by "rRTSPServer"
i=ch0_0.h264
t=0 0
a=tool:LIVE555 Streaming Media v2023.01.19
a=type:broadcast
a=control:*
a=range:npt=now-
a=x-qt-text-nam:Session streamed by "rRTSPServer"
a=x-qt-text-inf:ch0_0.h264
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:700
a=rtpmap:96 H265/90000
a=fmtp:96 profile-space=0;profile-id=1;tier-flag=0;level-id=186;interop-constraints=000000000000;sprop-vps=QAEMAf//AWAAAAMAAAMAAAMAAAMAuqwJ;sprop-sps=QgEBAWAAAAMAAAMAAAMAAAMAuqABICAFEf5a7kSIi/Lc1AQEBAI=;sprop-pps=RAHA8oSJAzJA
a=control:track1
m=audio 0 RTP/AVP 97
c=IN IP4 0.0.0.0
b=AS:32
a=rtpmap:97 MPEG4-GENERIC/16000
a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408
a=control:track2



it seems to me that all codec informations are present :


a=fmtp:96 profile-space=0;profile-id=1;tier-flag=0;level-id=186;interop-constraints=000000000000;



why ffmpeg is putting only codecs="hev1" instead of the full codecstring (containing the profile, the level and the constraints) ?


Thank you