
Recherche avancée
Autres articles (23)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
Liste des distributions compatibles
26 avril 2011, parLe tableau ci-dessous correspond à la liste des distributions Linux compatible avec le script d’installation automatique de MediaSPIP. Nom de la distributionNom de la versionNuméro de version 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
Si vous souhaitez nous aider à améliorer cette liste, vous pouvez nous fournir un accès à une machine dont la distribution n’est pas citée ci-dessus ou nous envoyer le (...)
Sur d’autres sites (3149)
-
linker error in Android NDK r25c when cross-compiling FFmpeg
5 août 2023, par Sai ChaithanyaI am cross compiling FFmpeg for Android(aarch64) using Android NDK r25c on Linux x86_64 platform. The errors generated by the linker are because of enabling the
LTO
option.

On disabling the LTO options(--enable-lto
optional config and-flto=thin
cc-flag), there are no failures.

FFmpeg config :


./configure --arch=aarch64 --target-os=android --enable-cross-compile --disable-everything \ 
 --disable-network --disable-autodetect --enable-small --disable-debug --disable-doc \ 
 --disable-manpages --disable-podpages --disable-txtpages --disable-htmlpages --disable-shared \
 --enable-static --enable-decoder='aac*,ac3*,opus,vorbis,mjpeg,mp3' \ 
 --enable-demuxer='mov,m4v,matroska,image2,mp3' --enable-protocol=file --enable-muxer='mp3,mp4,webm,null' \ 
 --enable-libmp3lame --enable-encoder=libmp3lame --enable-filter=aresample --enable-logging \ 
 --enable-pthreads --enable-parser='vorbis,opus,vp8,vp9,mjpeg,h264,aac*,ac3*,mpegvideo,mpegaudio,mpeg4video' \
 --disable-ffprobe --disable-ffplay --prefix='$HOME/Downloads/custom_build' --enable-lto \
 --extra-cflags="-I$HOME/Downloads/custom_build/include -I$HOME/Downloads/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/include -O3 -flto=thin" \
 --extra-ldflags="-L$HOME/Downloads/custom_build/lib -L$HOME/Downloads/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/lib64" \
 --cc="aarch64-linux-android33-clang" --nm=llvm-nm --strip=llvm-strip



Error :


ld: error: undefined symbol: av_packet_alloc
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced 10 more times

ld: error: undefined symbol: av_usleep
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(main)
>>> referenced by ld-temp.o
>>> lto.tmp:(retry_transfer_wrapper)

ld: error: undefined symbol: av_log
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced 745 more times

ld: error: undefined symbol: av_thread_message_queue_send
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced 1 more times

ld: error: undefined symbol: av_thread_message_queue_recv
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(main)
>>> referenced by ld-temp.o
>>> lto.tmp:(ffmpeg_cleanup)

ld: error: undefined symbol: av_rescale_q
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced 62 more times

ld: error: undefined symbol: av_packet_move_ref
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(submit_packet)
>>> referenced by ld-temp.o
>>> lto.tmp:(pkt_move)
>>> referenced 3 more times

ld: error: undefined symbol: av_thread_message_queue_set_err_recv
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)

ld: error: undefined symbol: av_packet_free
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(input_thread)
>>> referenced by ld-temp.o
>>> lto.tmp:(mux_check_init)
>>> referenced 13 more times

ld: error: undefined symbol: av_compare_ts
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_duration_update)
>>> referenced by ld-temp.o
>>> lto.tmp:(finish_stream)
>>> referenced by ld-temp.o
>>> lto.tmp:(finish_stream)
>>> referenced 10 more times

ld: error: undefined symbol: av_dict_set_int
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(of_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(mov_read_ftyp)
>>> referenced 1 more times

ld: error: undefined symbol: av_dict_get
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(configure_filtergraph)
>>> referenced by ld-temp.o
>>> lto.tmp:(main)
>>> referenced 25 more times

ld: error: undefined symbol: av_opt_set_dict
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(init_output_stream_wrapper)
>>> referenced 4 more times

ld: error: undefined symbol: av_strdup
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced 29 more times

ld: error: undefined symbol: av_mallocz
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(graph_parse)
>>> referenced by ld-temp.o
>>> lto.tmp:(graph_parse)
>>> referenced 62 more times

ld: error: undefined symbol: av_opt_set_defaults
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(avfilter_graph_alloc)
>>> referenced by ld-temp.o
>>> lto.tmp:(avfilter_graph_alloc_filter)
>>> referenced 5 more times

ld: error: undefined symbol: av_fast_malloc
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)

ld: error: undefined symbol: av_free
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced 62 more times

ld: error: undefined symbol: av_freep
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced 205 more times

ld: error: undefined symbol: av_asprintf
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(ifile_open)
>>> referenced by ld-temp.o
>>> lto.tmp:(describe_filter_link)
>>> referenced 3 more times

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:131: ffmpeg_g] Error 1



I also compiled
LAME
encoder (version 3.100) with LTO options, and it worked just fine.

How to resolve the error ?

**The libLTO.so file is present under
lib64/
hence added that to the —extra-ldflags optional config.

**PATH env contains$HOME/Downloads/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin


-
FFMpeg fails to detect input stream when outputting to pipe's stdout
27 septembre 2020, par La bla blaWe have h264 frames as individual files, we read them to a python wrapper and piping them to ffmpeg.


ffmpeg subprocess is launched using


command = ["ffmpeg",
 "-hide_banner",
 "-vcodec", "h264",
 "-i", "pipe:0",
 "-video_size", "5120x3072",
 '-an', '-sn', # we want to disable audio processing (there is no audio)
 '-pix_fmt', 'bgr24',
 "-vcodec", "rawvideo",
 '-f', 'image2pipe', '-']
 pipe = sp.Popen(command, stdin=sp.PIPE, stdout=sp.PIPE, bufsize=10 ** 8)



Our goal is to use ffmpeg to convert the individual h264 frames into raw BGR data that we can manipulate using OpenCV.


the files are read in a background thread and piped using


...
 for path in files:
 with open(path, "rb") as f:
 data = f.read()
 pipe.stdin.write(data)



When we try to read the ffmpeg's output pipe using


while True:
 # Capture frame-by-frame
 raw_image = pipe.stdout.read(width * height * 3)



we get


[h264 @ 0x1c31000] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
pipe:0: could not find codec parameters
Input #0, h264, from 'pipe:0':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264, none, 25 tbr, 1200k tbn, 50 tbc
Output #0, image2pipe, to 'pipe:':
Output file #0 does not contain any stream



However, when I change the
sp.Popen
command to be


 f = open('ffmpeg_output.log', 'wt')
 pipe = sp.Popen(command, stdin=sp.PIPE, stdout=f, bufsize=10 ** 8) # Note: the stdout is not f



we get the gibberish (i.e, binary data) in the
ffmpeg_output.log
file, and the console reads

[h264 @ 0xf20000] Stream #0: not enough frames to estimate rate; consider increasing probesize
[h264 @ 0xf20000] decoding for stream 0 failed
Input #0, h264, from 'pipe:0':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264 (Baseline), yuv420p, 5120x3072, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Output #0, image2pipe, to 'pipe:':
 Metadata:
 encoder : Lavf56.40.101
 Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 5120x3072, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
 Metadata:
 encoder : Lavc56.60.100 rawvideo
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Invalid UE golomb code
 Last message repeated 89 times
Invalid UE golomb code
 Last message repeated 29 times
Invalid UE golomb code
 Last message repeated 29 times
Invalid UE golomb code
 Last message repeated 29 times
Invalid UE golomb code
 Last message repeated 29 times
Invalid UE golomb code
 Last message repeated 29 times
Invalid UE golomb code
 Last message repeated 29 times
Invalid UE golomb code
 Last message repeated 29 times
Invalid UE golomb code



Why does ffmpeg cares if its stdout is a file or a pipe ?


-
Trimming video without encoding
14 octobre 2020, par Cristian Jorge A. KuschI need to trim a video without encoding into sections that later i can put back together with the concat demuxer of ffmpeg.
I understand that to cut precisely without encoding it is necessary to cut at keyframes, i'm using this command to get the keyframes :


ffprobe -loglevel error -select_streams v:0 -show_entries packet=pts_time,flags -of csv=print_section=0 -input | awk -F',' '/K/ {print $1}'



and they also correspond to the times that Avidemux reports for the keyframes.
I'm using this command to trim the source :


ffmpeg -ss 00:0:2.4607 -noaccurate_seek -avoid_negative_ts 1 -i input.mp4 -to 00:0:3.545 -c copy /content/losslessffmpeg.mp4



But it always ends up with different durations. I would expect that if i cut between keyframe at time 2.460792 and keyframe at time 3.545208 i would get a video of lenght that is the difference between those two times, but it is never the case.
Any help ?
thanks