
Recherche avancée
Autres articles (111)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (7293)
-
Video concatenation using ffmpeg. Output video length is longer than inputs length
28 décembre 2022, par Rostyslav MosorovI have a problem with video mp4 concatenation using ffmpeg. I have two the same videos and I want to concatenate them. I created file inputs.txt and then used command :


ffmpeg -f concat -i inputs.txt -c copy mergedVideo.mp4


Output :


ffmpeg -f concat -i inputs.txt -c copy mergedVideo.mp4
ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with clang version 12.0.1
 configuration: --prefix=/Users/runner/miniforge3/conda-bld/ffmpeg_1649114094397/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl --cc=arm64-apple-darwin20.0.0-clang --disable-doc --disable-openssl --enable-demuxer=dash --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-neon --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-libvpx --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame --pkg-config=/Users/runner/miniforge3/conda-bld/ffmpeg_1649114094397/_build_env/bin/pkg-config --enable-cross-compile --arch=arm64 --target-os=darwin --cross-prefix=arm64-apple-darwin20.0.0- --host-cc=/Users/runner/miniforge3/conda-bld/ffmpeg_1649114094397/_build_env/bin/x86_64-apple-darwin13.4.0-clang
 libavutil 57. 17.100 / 57. 17.100
 libavcodec 59. 18.100 / 59. 18.100
 libavformat 59. 16.100 / 59. 16.100
 libavdevice 59. 4.100 / 59. 4.100
 libavfilter 8. 24.100 / 8. 24.100
 libswscale 6. 4.100 / 6. 4.100
 libswresample 4. 3.100 / 4. 3.100
 libpostproc 56. 3.100 / 56. 3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1561044a0] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'inputs.txt':
 Duration: N/A, start: -0.064000, bitrate: 1424 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1355 kb/s, 50 fps, 50 tbr, 12800 tbn
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 68 kb/s
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
File 'mergedVideo.mp4' already exists. Overwrite? [y/N] y
Output #0, mp4, to 'mergedVideo.mp4':
 Metadata:
 encoder : Lavf59.16.100
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1355 kb/s, 50 fps, 50 tbr, 12800 tbn
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 68 kb/s
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 size= 0kB time=00:00:00.06 bitrate= 6.0k[mov,mp4,m4a,3gp,3g2,mj2 @ 0x154f28b20] Auto-inserting h264_mp4toannexb bitstream filter
frame= 166 fps=0.0 q=-1.0 Lsize= 583kB time=00:00:03.39 bitrate=1407.4kbits/s speed= 179x 
video:550kB audio:29kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.737394%



Unfortunately the result is different then I expected :

movies comparison

The output is longer than the length of two inputs. Any thoughts ?


Also I tried using different commands :


ffmpeg -f concat -i inputs.txt -c copy mergedVideo.mp4



or set the framerate :


ffmpeg -r 50 -f concat -i inputs.txt -c copy mergedVideo.mp4



What is also weird that I have the same problem when using moviepy library.


from moviepy.editor import VideoFileClip, concatenate_videoclips
videos = [VideoFileClip("0.mp4"), VideoFileClip("0.mp4")]
concatenate_videoclips(videos).write_videofile('mergedVideo.mp4')



Update
ffprobe command for output file


ffprobe -v error -select_streams v -show_entries stream=codec_name,time_base,start_pts,start_time,duration -of default=noprint_wrappers=1 mergedVideo.mp4 
codec_name=h264
time_base=1/12800
start_pts=0
start_time=0.000000
duration=3.380000



For input :


ffprobe -v error -select_streams v -show_entries stream=codec_name,time_base,start_pts,start_time,duration -of default=noprint_wrappers=1 0.mp4 
codec_name=h264
time_base=1/12800
start_pts=0
start_time=0.000000
duration=1.660000



The duration supposed to be 2*1.66 = 3.32 and but it's 3.38.


Content of the inputs.txt


file '0.mp4'
file '0.mp4'



-
Merging two video files with ffmpeg and xfade filter cuts the first video
29 décembre 2022, par rlibI try to concatenate two mp4 videos using ffmpeg's xfade filter :


ffmpeg -y -i x1.mp4 -i x2.mp4 -filter_complex "[0][1]xfade=transition=dissolve:duration=2:offset=2" dissolveVideo4.mp4



x1.mp4 is 14.52 seconds and x2.mp4 is 12.46 seconds. The resulting video is 14.48 seconds.
Examining the resulting video shows the first input contributed only 4 seconds at its end, the remaining is the second video.


This happens with any of the available transitions (fade etc.).


Here is the output of the ffmpeg command above :


ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
 configuration: 
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'x1.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2022-12-29T15:10:27.000000Z
 location : +32.7648+035.0443/
 location-eng : +32.7648+035.0443/
 com.android.version: 13
 com.android.capture.fps: 30.000000
 Duration: 00:00:14.52, start: 0.000000, bitrate: 17707 kb/s
 Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/smpte170m, progressive), 1920x1080, 17449 kb/s, 29.96 fps, 30 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2022-12-29T15:10:27.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 Side data:
 displaymatrix: rotation of -90.00 degrees
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
 Metadata:
 creation_time : 2022-12-29T15:10:27.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'x2.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2022-12-29T15:10:47.000000Z
 location : +32.7648+035.0443/
 location-eng : +32.7648+035.0443/
 com.android.version: 13
 com.android.capture.fps: 30.000000
 Duration: 00:00:12.46, start: 0.000000, bitrate: 17461 kb/s
 Stream #1:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/smpte170m, progressive), 1920x1080, 17201 kb/s, 30.01 fps, 30 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2022-12-29T15:10:47.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 Side data:
 displaymatrix: rotation of -90.00 degrees
 Stream #1:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
 Metadata:
 creation_time : 2022-12-29T15:10:47.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 (h264) -> xfade (graph 0)
 Stream #1:0 (h264) -> xfade (graph 0)
 xfade:default (graph 0) -> Stream #0:0 (mpeg4)
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'dissolveVideo4.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 com.android.capture.fps: 30.000000
 location : +32.7648+035.0443/
 location-eng : +32.7648+035.0443/
 com.android.version: 13
 encoder : Lavf59.27.100
 Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p(tv, bt709/bt709/smpte170m, progressive), 1080x1920, q=2-31, 200 kb/s, 30 fps, 15360 tbn
 Metadata:
 encoder : Lavc59.37.100 mpeg4
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2022-12-29T15:10:27.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
 encoder : Lavc59.37.100 aac
frame= 435 fps=145 q=31.0 Lsize= 7688kB time=00:00:14.48 bitrate=4347.9kbits/s speed=4.82x 
video:7443kB audio:231kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.181913%



What can be a problem ?


-
FFmpeg build error pkg-config can't find x265 /usr/bin/ld : cannot find -lnuma : No such file or directory
1er janvier 2023, par slyfox1186I am trying to build ffmpeg with custom libraries from source code.


Every package in my script builds as it should but when it gets time to run the ffmpeg build using all of the packages it fails with a weird error code shown at the bottom of the ffmpeg build log.


BEGIN /home/jman/tmp/ffconf.JouXp6kg/test.c
 1 #include 
 2 #include 
 3 long check_x265_api_get(void) { return (long) x265_api_get; }
 4 int main(void) { int ret = 0;
 5 ret |= ((intptr_t)check_x265_api_get) & 0xFFFF;
 6 return ret; }
END /home/jman/tmp/ffconf.JouXp6kg/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include/lilv-0 -I/usr/local/cuda/include -std=c11 -fomit-frame-pointer -fPIC -I/home/jman/Documents/ffmpeg-build/workspace/include -pthread -DLILV_STATIC -DSRATOM_STATIC -DSORD_STATIC -DSERD_STATIC -I/home/jman/Documents/ffmpeg-build/workspace/include/lilv-0 -I/home/jman/Documents/ffmpeg-build/workspace/include/sratom-0 -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include/sord-0 -I/home/jman/Documents/ffmpeg-build/workspace/include/serd-0 -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include/opus -I/home/jman/Documents/ffmpeg-build/workspace/include/opus -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include/srt -I/home/jman/Documents/ffmpeg-build/workspace/include/svt-av1 -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include -I/home/jman/Documents/ffmpeg-build/workspace/include -L/usr/lib/x86_64-linux-gnu -c -o /home/jman/tmp/ffconf.JouXp6kg/test.o /home/jman/tmp/ffconf.JouXp6kg/test.c
gcc -L/home/jman/Documents/ffmpeg-build/workspace/lib -L/usr/local/cuda/lib64 -Wl,--as-needed -Wl,-z,noexecstack -L/usr/lib/x86_64-linux-gnu -o /home/jman/tmp/ffconf.JouXp6kg/test /home/jman/tmp/ffconf.JouXp6kg/test.o -lx265 -lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl -lnuma -ldl -lpthread -lm -lz
/usr/bin/ld: cannot find -lnuma: No such file or directory
collect2: error: ld returned 1 exit status
ERROR: x265 not found using pkg-config



Does anyone know what this
-lnuma
is referring to ?

I had no issues just a few days ago when I last ran my build script and then all of a sudden this issue appeared.


This is my build script in its entirety : FFmpeg-build.sh


Update : Per Allan Winds' instructions here is the output of :


find /usr/lib -name libnuma\* -ls


4987897 48 -rw-r--r-- 1 root root 48152 Mar 24 2022 /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
 4992286 76 -rw-r--r-- 1 root root 77086 Mar 24 2022 /usr/lib/x86_64-linux-gnu/libnuma.a
 4987896 0 lrwxrwxrwx 1 root root 16 Dec 29 12:03 /usr/lib/x86_64-linux-gnu/libnuma.so.1 -> libnuma.so.1.0.0
 4992287 0 lrwxrwxrwx 1 root root 16 Mar 24 2022 /usr/lib/x86_64-linux-gnu/libnuma.so -> libnuma.so.1.0.0