
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (56)
-
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 (6868)
-
Revision 36538 : On ajoute en base hasaudio et hasvideo ’oui’ ou ’’ On détecte mieux les ...
22 mars 2010, par kent1@… — LogOn ajoute en base hasaudio et hasvideo ’oui’ ou
On détecte mieux les codes audio et videos sur les flv -
FFMPEG JAVA ffmpeg doesn't work in .jar application
3 février 2020, par xkenzzoFFMPEG works only in developer mode. When I compile my jar program it returns the following error
the log of the program launched with eclipse in this case everything worksffmpeg version git-2019-12-29-e20c6d9 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20191125
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 38.100 / 56. 38.100
libavcodec 58. 65.100 / 58. 65.100
libavformat 58. 35.101 / 58. 35.101
libavdevice 58. 9.101 / 58. 9.101
libavfilter 7. 70.100 / 7. 70.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, h264, from '.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 3840x2160 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1200k tbn, 120 tbc
Output #0, mp4, to '.mp4':
Metadata:
encoder : Lavf58.35.101
Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 60 tbr, 15360 tbn, 120 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 000001cedad59440] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame= 9273 fps=0.0 q=-1.0 Lsize= 121326kB time=00:01:17.26 bitrate=12863.3kbits/s speed= 207x
video:121287kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.032451%This is where it gets complicated. You can observe the messages that FFMPEG returns to me when I launch my program compile in jar :
> [h264 @ 0000017c43e5b700] error while decoding MB 58 6, bytestream -14
> [h264 @ 0000017c43e5b700] concealing 30951 DC, 30951 AC, 30951 MV
> errors in I frame [h264 @ 0000017c43e49d80] Stream #0: not enough
> frames to estimate rate; consider increasing probesize [h264 @
> 0000017c43e49d80] decoding for stream 0 failedThis is the java code which thanks to the ProcessBuilder will launch FFMPEG :
String urlVideoMp4 = movie.getPath().replace(".h264", ".mp4");
File videoFinal = new File(urlVideoMp4);
//checking if new video exists : if not, creating it with FFMPEG
LOG.info("moviePath : " + movie);
ProcessBuilder processBuilder = new ProcessBuilder(FFMPEG, "-framerate", "60", "-r", "120", "-i", movie.getPath(),"-c:v", "copy", urlVideoMp4);
LOG.debug(processBuilder.command());
processBuilder.inheritIO().start().waitFor();
return videoFinal; -
PyAV : force new framerate while remuxing stream ?
7 juin 2019, par ToxicFrogI have a Python program that receives a sequence of H264 video frames over the network, which I want to display and, optionally, record. The camera records at 30FPS and sends frames as fast as it can, which isn’t consistently 30FPS due to changing network conditions ; sometimes it falls behind and then catches up, and rarely it drops frames entirely.
The "display" part is easy ; I don’t need to care about timing or stream metadata, just display the frames as fast as they arrive :
input = av.open(get_video_stream())
for packet in input.demux(video=0):
for frame in packet.decode():
# A bunch of numpy and pygame code here to convert the frame to RGB
# row-major and blit it to the screenThe "record" part looks like it should be easy :
input = av.open(get_video_stream())
output = av.open(filename, 'w')
output.add_stream(template=input.streams[0])
for packet in input.demux(video=0):
for frame in packet.decode():
# ...display code...
packet.stream = output.streams[0]
output.mux_one(packet)
output.close()And indeed this produces a valid MP4 file containing all the frames, and if I play it back with
mplayer -fps 30
it works fine. But that-fps 30
is absolutely required :$ ffprobe output.mp4
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 960x720,
1277664 kb/s, 12800 fps, 12800 tbr, 12800 tbn, 25600 tbc (default)Note that 12,800 frames/second. It should look something like this (produced by calling
mencoder -fps 30
and piping the frames into it) :$ ffprobe mencoder_test.mp4
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 960x720,
2998 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default)Inspecting the packets and frames I get from the input stream, I see :
stream: time_base=1/1200000
codec: framerate=25 time_base=1/50
packet: dts=None pts=None duration=48000 time_base=1/1200000
frame: dst=None pts=None time=None time_base=1/1200000So, the packets and frames don’t have timestamps at all ; they have a time_base which doesn’t match either the timebase that ends up in the final file or the actual framerate of the camera ; the codec has a framrate and timebase that doesn’t match the final file, the camera framerate, or the other video stream metadata !
The PyAV documentation is all but entirely absent when it comes to issues of timing and framerate, but I have tried manually setting various combinations of stream, packet, and frame
time_base
,dts
, andpts
with no success. I can always remux the recorded videos again to get the correct framerate, but I’d rather write video files that are correct in the first place.So, how do I get pyAV to remux the video in a way that produces an output that is correctly marked as 30fps ?