
Recherche avancée
Autres articles (39)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)
Sur d’autres sites (6683)
-
Is FFmpegAudioDecoder supposed to reinitialize upon append of new init segment
14 novembre 2023, par martinI am attempting to switch audio tracks but when switching the FFmpegAudioDecoder never reinitializes like it does with video tracks of differing resolutions. I am not certain if this is the intended behavior of FFmpegAudioDecoder and would love to learn more about the expected behavior.


When switching audio tracks I end up calling the following operations :


if sourceBuffer.getIsUpdate() {sourceBuffer.abort()}
sourceBuffer.remove(0-videoDuration)
initSegmentDataStream = fetch init segment of new audio representation
sourceBuffer.appendBuffer(initSegmentDataStream)



These are the Media tab messages from initial video load


ChunkDemuxer
Selected FFmpegAudioDecoder for audio decoding, config: codec: aac, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 48000, sample_format: Signed 16-bit, bytes_per_frame: 4, seek_preroll: 0us, codec_delay: 0, has extra data: false, encryption scheme: Unencrypted, discard decoder delay: false, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format, has aac extra data: true
Cannot select DecryptingVideoDecoder for video decoding
Cannot select VDAVideoDecoder for video decoding
Cannot select VpxVideoDecoder for video decoding
Selected Dav1dVideoDecoder for video decoding, config: codec: av1, profile: av1 profile main, level: not available, alpha_mode: is_opaque, coded size: [1280,720], visible rect: [0,0,1280,720], natural size: [1280,720], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}
Dropping audio frame (DTS 0us PTS -105375us,-62709us) that is outside append window [0us,9223372036854775807us).
Dropping audio frame (DTS 42666us PTS -62708us,-20042us) that is outside append window [0us,9223372036854775807us).
Truncating audio buffer which overlaps append window start. PTS -20041us frame_end_timestamp 22625us append_window_start 0us
Effective playback rate changed from 0 to 1



For comparison this is what I get when appending the init segment of a different video resolution / track


video decoder config changed midstream, new config: codec: av1, profile: av1 profile main, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}




Chrome version : Version 119.0.6045.123 (Official Build)


When appending the new init segment of an audio track I was expecting the FFmpegAudioDecoder to be reinitialized like the Dav1dVideoDecoder does for video tracks


-
ffmpeg : Overlay audios with different lengths using amix and apad
23 novembre 2017, par ValdirI’m trying to overlay two audio files with the following command :
ffmpeg -y -i mp3/test1.mp3 -i mp3/test2.mp3 -filter_complex "[0:0][1:0] amix=inputs=2:duration=longest" -c:a libmp3lame merged.mp3
But it fails if the length of the audios are different :
ffmpeg -y -i live.mp3 -i mp3/test1.mp3 -filter_complex "[0:0][1:0] amix=inputs=2:duration=longest" -c:a libmp3lame merged2.mp3
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[mp3 @ 0x22cf760] Format mp3 detected only with low score of 1, misdetection possible!
[mp3 @ 0x22cf760] Could not find codec parameters for stream 0 (Audio: mp3, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
live.mp3: could not find codec parameters
Input #0, mp3, from 'live.mp3':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Audio: mp3, 0 channels, s16p
[mp3 @ 0x22d10a0] Skipping 0 bytes of junk at 18034.
Input #1, mp3, from 'mp3/test1.mp3':
Metadata:
title : Nothing Else Matters [Official Music Video]
artist : Metallica
Duration: 00:06:25.80, start: 0.025057, bitrate: 192 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
Metadata:
encoder : Lavc56.14
[abuffer @ 0x22fa2c0] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
Last message repeated 3 times
[abuffer @ 0x22fa2c0] Error setting option time_base to value 1/0.
[graph 0 input from stream 0:0 @ 0x22fa3e0] Error applying options to the filter.
Error configuring complex filters.
Numerical result out of rangeHow do I add the apad filter so that silence is added to the shortest audio ?
-
Undefined symbol despite libraries being linked
17 septembre 2020, par Areopagcurrently I'm trying to write a JNI function using ffmpeg features, but when I'm trying to run my java executable after a clean compile I get the following error :


/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: symbol lookup error: /lib/libmediaserv_ffmpeg.so: undefined symbol: _Z19avformat_open_inputPP15AVFormatContextPKcP13AVInputFormatPP12AVDictionary



I can't figure out why ffmpeg is not linked correctly.


mediaserv_ffmpeg.cpp :


#include <iostream>
#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>avutil.h>

JNIEXPORT jobject JNICALL Java_mediaserv_ffmpeg_getMetadata
 (JNIEnv* env, jclass cls, jstring path) { ... }
</iostream>


What I've tried so far is inspecting libmediaserv_ffmpeg.so :


nm libmediaserv_ffmpeg.so --format=sysv | grep avformat
_Z19avformat_open_inputPP15AVFormatContextPKcP13AVInputFormatPP12AVDictionary| | U | NOTYPE| | |*UND*
_Z20avformat_close_inputPP15AVFormatContext| | U | NOTYPE| | |*UND*
_Z25avformat_find_stream_infoP15AVFormatContextPP12AVDictionary| | U | NOTYPE| | |*UND*



Which, I think, is just another way of saying that there are undefined symbols in the .so file.


The commands used to build the lib (taken from
make VERBOSE=1
) :

/usr/bin/c++ -Dmediaserv_ffmpeg_EXPORTS -I/usr/lib/jvm/java-11-openjdk-amd64/include -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux -I/mnt/g/Workspace/mediaserv/third-party/ffmpeg -fPIC -std=gnu++1z -o CMakeFiles/mediaserv_ffmpeg.dir/mediaserv_ffmpeg.cpp.o -c /mnt/g/Workspace/mediaserv/third-party/mediaserv_ffmpeg.cpp
/usr/bin/c++ -fPIC -shared -Wl,-soname,libmediaserv_ffmpeg.so -o /mnt/g/Workspace/mediaserv/build/libs/libmediaserv_ffmpeg.so CMakeFiles/mediaserv_ffmpeg.dir/mediaserv_ffmpeg.cpp.o -Wl,-rpath,/usr/lib/jvm/java-11-openjdk-amd64/lib:/usr/lib/jvm/java-11-openjdk-amd64/lib/server:/mnt/g/Workspace/mediaserv/third-party/ffmpeg/libavutil:/mnt/g/Workspace/mediaserv/third-party/ffmpeg/libavformat /usr/lib/jvm/java-11-openjdk-amd64/lib/libjawt.so /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so ../ffmpeg/libavutil/libavutil.so ../ffmpeg/libavformat/libavformat.so



I've already tried to seek for errors in GCC's trace option for the linker and it lists me which libraries it tries to link / is linking but the result stays the same.


/usr/bin/ld: mode elf_x86_64
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o
CMakeFiles/mediaserv_ffmpeg.dir/mediaserv_ffmpeg.cpp.o
/usr/lib/jvm/java-11-openjdk-amd64/lib/libjawt.so
/usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
../ffmpeg/libavutil/libavutil.so
../ffmpeg/libavformat/libavformat.so
-lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/7/libstdc++.so)
/lib/x86_64-linux-gnu/libm.so.6
/lib/x86_64-linux-gnu/libmvec.so.1
libgcc_s.so.1 (/usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1)
/lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
libgcc_s.so.1 (/usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1)
/usr/lib/gcc/x86_64-linux-gnu/7/crtendS.o
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crtn.o



CMakeLists.txt :


cmake_minimum_required(VERSION 3.17)
project(mediaserv_ffmpeg)

set(CMAKE_CXX_STANDARD 17)
set(BUILD_SHARED_LIBS ON)
add_library(${PROJECT_NAME} SHARED mediaserv_ffmpeg.cpp mediaserv_ffmpeg.h)

find_package(JNI REQUIRED)

find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h HINTS ffmpeg REQUIRED)
find_library(AVUTIL_LIBRARY avutil HINTS ${PROJECT_SOURCE_DIR}/ffmpeg/libavutil PATHS REQUIRED)

find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h HINTS ffmpeg REQUIRED)
find_library(AVFORMAT_LIBRARY avformat HINTS ${PROJECT_SOURCE_DIR}/ffmpeg/libavformat REQUIRED)

target_include_directories(${PROJECT_NAME} PRIVATE ${JNI_INCLUDE_DIRS} ${AVUTIL_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR})

target_link_libraries(${PROJECT_NAME} ${JNI_LIBRARIES} ${AVUTIL_LIBRARY} ${AVFORMAT_LIBRARY})



Neither ffmpeg taken from the official ubuntu bionic repository nor a self-compiled version with
configure --enable-shared
works for me.

Where is my mistake or what could I still inspect ?


Thanks in advance.