
Recherche avancée
Autres articles (47)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 (6643)
-
MKV video playback shows a black picture and audio plays good
24 mars 2023, par gbriones.gdlI have an MKV video file that has something wrong, every time I start my player, the video shows full black picture and the audio starts playing good, if I use the seek bar to position the playback anywhere in the time, then the video shows correct picture but audio stops playing, eventually (it takes several seconds) audio starts playing again in sync with video.


The player I am using is the one in Kodi 20.1.0, I have tried enabling/disabling HW acceleration without success.


I also tried VLC 3.0.16, which has a simmilar behavior with the exception that video starts showing from the very begining when opening the file, just when seeking the audio stops for several seconds.


I also tried using ffmpeg to reencode the video with different codecs without success, I have tried multiple video and audio codec combinations, and also tried changing the pixel format.


Then eventually I managed to fix the video by extracting streams into separate files, then merge them again, without reencoding, I thought that maybe something could be wrong with the metadata of the video, so I copied the same metadata and final output file still works fine. My question is how can I fix my video without having to split and merge streams ?


Here is the info about my input file :


$ ffmpeg -i S01E08.mkv 
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, matroska,webm, from 'S01E08.mkv':
 Metadata:
 ENCODER : Lavf59.27.100
 Duration: 00:25:02.21, start: 0.000000, bitrate: 1382 kb/s
 Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt470bg/unknown/unknown, progressive), 1280x960, 59.94 fps, 59.94 tbr, 1k tbn, 59.94 tbc
 Metadata:
 ENCODER : Lavc59.37.100 libx265
 DURATION : 00:25:00.032000000
 Stream #0:1(spa): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)
 Metadata:
 title : Stereo
 DURATION : 00:25:02.207000000
 Stream #0:2(jpn): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp
 Metadata:
 title : Stereo
 DURATION : 00:25:00.116000000
 Stream #0:3(spa): Subtitle: ass
 Metadata:
 ENCODER : Lavc59.37.100 ssa
 DURATION : 00:24:56.585000000
At least one output file must be specified



Here are the steps I followed to fix the video, I had to use mkv format for the outputs because other formats were no good at writing metadata :


ffmpeg -i S01E08.mkv -map 0:v:0 -c:v copy -map_metadata 0 video.mkv
ffmpeg -i S01E08.mkv -map 0:a:0 -c:a copy -map_metadata 0 audio1.mkv
ffmpeg -i S01E08.mkv -map 0:a:1 -c:a copy -map_metadata 0 audio2.mkv
ffmpeg -i S01E08.mkv -map 0:s -c:s copy -map_metadata 0 subs.mkv
ffmpeg -i video.mkv -i audio1.mkv -i audio2.mkv -i subs.mkv -map 0:v -map 1:a -map 2:a -map 3:s -c:v copy -c:a copy -c:s copy -map_metadata 0 -map_metadata 1 -map_metadata 2 -map_metadata 3 -disposition:s:0 0 -default_mode infer_no_subs video_audio.mkv



I had to compare both input and output files :


$ ffmpeg -i video_audio.mkv
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, matroska,webm, from 'video_audio.mkv':
 Metadata:
 ENCODER : Lavf58.76.100
 Duration: 00:25:02.21, start: 0.000000, bitrate: 1382 kb/s
 Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt470bg/unknown/unknown, progressive), 1280x960, 59.94 fps, 59.94 tbr, 1k tbn, 59.94 tbc (default)
 Metadata:
 ENCODER : Lavc59.37.100 libx265
 DURATION : 00:25:00.031000000
 Stream #0:1(spa): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)
 Metadata:
 title : Stereo
 DURATION : 00:25:02.207000000
 Stream #0:2(jpn): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp
 Metadata:
 title : Stereo
 DURATION : 00:25:00.116000000
 Stream #0:3(spa): Subtitle: ass
 Metadata:
 ENCODER : Lavc59.37.100 ssa
 DURATION : 00:24:56.585000000
At least one output file must be specified

$ ffprobe -show_streams S01E08.mkv > probe_bad.txt
$ ffprobe -show_streams video_audio.mkv > probe_good.txt
$ diff probe_bad.txt probe_good.txt 
32,33c32,33
< duration_ts=1502207
< duration=1502.207000
---
> duration_ts=N/A
> duration=N/A
40c40
< DISPOSITION:default=0
---
> DISPOSITION:default=1
53c53
< TAG:DURATION=00:25:00.032000000
---
> TAG:DURATION=00:25:00.031000000



Then I thought that maybe the disposition flag in the video stream was causing the error, so I ran ffmpeg to copy all streams from my input video S01E08.mkv and added the disposition flag with the following command :


ffmpeg -i S01E08.mkv -map 0:v -map 0:a:0 -map 0:a:1 -map 0:s -c:v copy -c:a copy -c:s copy -map_metadata 0 -disposition:v:0 default -disposition:s:0 0 -default_mode infer_no_subs test.mkv



Still no luck, test.mkv shows no video when opening the file, I had to double check that disposition flag was changed :


$ ffprobe -show_streams test.mkv > probe_bad2.txt
$ diff probe_bad.txt probe_bad2.txt 
40c40
< DISPOSITION:default=0
---
> DISPOSITION:default=1
53c53
< TAG:DURATION=00:25:00.032000000
---
> TAG:DURATION=00:25:00.031000000



In other words I have to focibly split and merge to make the file work correctly. May be I need to set the duration and duration_ts of the video stream to N/A but I don't know how to do this.


-
rtmp : Rename packet types to closer match the spec
31 janvier 2017, par Martin Storsjörtmp : Rename packet types to closer match the spec
Also rename comments and log messages accordingly,
and add clarifying comments for some hardcoded values.The previous names were taken from older, reverse engineered
references.These names match the official public rtmp specification, and
matches the names used by wirecast in annotating captured
streams. These names also avoid hardcoding the roles of server
and client, since the handling of them is irrelevant of whether
we act as server or client.The RTMP_PT_PING type maps to RTMP_PT_USER_CONTROL.
The SERVER_BW and CLIENT_BW types are a bit more intertwined ;
RTMP_PT_SERVER_BW maps to RTMP_PT_WINDOW_ACK_SIZE and
RTMP_PT_CLIENT_BW maps to RTMP_PT_SET_PEER_BW.Signed-off-by : Martin Storsjö <martin@martin.st>
-
FFmpeg -filter_complex_script crop & blurbox with time based values
6 juin 2021, par user1503606I am trying to create a script that will move a blur boxed across a video based on x and y cords in a text script.


I can easily create a blur box with the following ffmpeg command.


ffmpeg -y -i pex.mp4 -filter_complex_script cropblur.txt -map "[v]" out_crop.mp4



The cropblur.txt has the following.


[0:v]crop=400:400:300:350,boxblur=10[fg]; [0:v][fg]overlay=300:350:enable='between(t\,0\,5)'[v]



This creates this.




What I want is the blur box to move across where the lady is running.




She obviously runs out from where the box is positioned.


I can create a script where I can track the correct x and y positions for the blox using jquery ui or something I just dont understand how to implement this in a filter_complex_script.


I thought it would be a simple as just appending to the script something like this.


[0:v]crop=400:400:300:350,boxblur=10[fg]; [0:v][fg]overlay=300:350:enable='between(t\,0\,2)'[v]
[0:v]crop=200:200:200:360,boxblur=10[fg]; [0:v][fg]overlay=300:350:enable='between(t\,2\,3)'[v]
[0:v]crop=200:200:200:370,boxblur=10[fg]; [0:v][fg]overlay=300:350:enable='between(t\,3\,4)'[v]
[0:v]crop=200:200:200:380,boxblur=10[fg]; [0:v][fg]overlay=300:350:enable='between(t\,4\,5)'[v]



Changing the time and the x position based on the incremented time.


If I run this script I get this error.


No output pad can be associated to link label '0:v'



Obviously I am doing something wrong but I cannot find any documentation that really helps me understand how to do this https://ffmpeg.org/ffmpeg.html the official docs dont really help.


I could do it by running multiple passes like this.


ffmpeg -y -i pex.mp4 -filter_complex "[0:v]crop=400:400:300:350,boxblur=10[fg]; [0:v][fg]overlay=300:350:enable='between(t\,0\,2)'[v]" -map "[v]" out_crop.mp4 && ffmpeg -y -i out_crop.mp4 -filter_complex "[0:v]crop=200:200:200:360,boxblur=10[fg]; [0:v][fg]overlay=300:350:enable='between(t\,2\,3)'[v]" -map "[v]" out_crop2.mp4



I Would just really like to understand how to use the filter complex scripts in this way ?


Any help would be great.


Thanks