
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 (87)
-
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...) -
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 (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)
Sur d’autres sites (5852)
-
RTP Timestamps Are Not Monotonically increasing
25 août 2019, par Fr0styI am finding it a bit difficult trying to understand whether or not the hack around with FFmpeg and OpenCV really provided a RTP timestamp. My last post helped a little bit but got me stuck in trying to validate the timestamps obtained through this work around by modifying ffmpeg and opencv.
FFmpeg version : 4.1.0
OpenCV version : 3.4.1import cv2
import time
from datetime import datetime, date
uri = 'rtsp://admin:password@192.168.1.66:554/Streaming/Channels/101'
cap = cv2.VideoCapture(uri)
'''One is the offset between the two epochs. Unix uses an epoch located at 1/1/1970-00:00h (UTC) and NTP uses 1/1/1900-00:00h.
This leads to an offset equivalent to 70 years in seconds (there are 17 leap years between the two dates so the offset is'''
time_offset = 2208988800 # (70*365 + 17)*86400 = 2208988800 (in seconds)
# offset = 3775484294
days = 43697
pdat = "1900-01-01 00:00:00:00"
mdat = "2019-08-23 22:02:44:00" # str(datetime.now()) + str(datetime.now().time())
pdate = datetime.strptime(pdat, "%Y-%m-%d %H:%M:%S:%f").date()
mdate = datetime.strptime(mdat, "%Y-%m-%d %H:%M:%S:%f").date()
delta = (mdate - pdate).days
offset = delta * 86400
def time_delta(s):
return (s - time_offset)
while True:
frame_exists, curr_frame = cap.read()
if frame_exists:
seconds = cap.getRTPTimeStampSeconds()
fraction = cap.getRTPTimeStampFraction()
timestamp = cap.getRTPTimeStampTs()
unix_offset = seconds - time_offset
msec = int((int(fraction) / 0xFFFFFFFF) * 1000.0)
ts = float(str(unix_offset) + "." + str(msec))
# print("Timestamp per Frame:%i" % timestamp)
print((datetime.fromtimestamp(float(ts) + offset)))
cap.release()My Output :
On August 23, 2019 at 22:02
...
2019-08-23 13:59:52.781000
2019-08-23 13:59:52.726000
2019-08-23 13:59:52.671000
2019-08-23 13:59:52.616000
2019-08-23 13:59:52.561000
2019-08-23 13:59:52.506000
2019-08-23 13:59:52.451000
2019-08-23 13:59:52.396000
2019-08-23 13:59:52.342000
2019-08-23 13:59:52.287000
2019-08-23 13:59:52.232000
2019-08-23 13:59:52.177000
2019-08-23 13:59:52.122000
2019-08-23 13:59:52.067000
2019-08-23 13:59:52.012000
2019-08-23 13:59:53.570000
2019-08-23 13:59:53.020000
2019-08-23 13:59:53.847000
2019-08-23 13:59:53.792000I’ve noticed how the time increments weirdly (that’s not suppose to happen in the real, current time), such as the last two lines and a few others in between in the output. A bit flabbergasted as to what went wrong. Also trying this out on multiple IP cameras, with each showing a different timestamp probably related to when they were turned on.
-
FFMPEG - Pipe Different HLS Resolutions to S3
17 juillet 2019, par MikeI’m trying to save all my HLS output files directly to S3. As you can see in the code, I’m saving output files for many different sizes and bitrates. My issue is I can’t figure out how to save the files onto S3. I have managed to get this working on an EC2 instance where I save all the files on the same server, but once I try to use
aws cli
it fails. I can also get this working if it’s just one resolution.I’m guessing it has something to do with piping multiple
aws cli
commands since I can see it tells meUnknown options:
, but I don’t see any other way of doing this.Also, I’m using the
-progress
flag so I can show the transcode progress to the user, can I pipe that directly to S3 as-well ?Note, the code below has been formatted to make it readable, it obviously doesn’t look like this when ran on the server.
FFMPEG Command
ffmpeg
-hide_banner -y
-i https://my-bucket.s3.us-west-1.amazonaws.com/in.mp4
-progress https://mybucket.s3.us-west-1.amazonaws.com/progress.log
-c:a aac
-c:v libx264
-f mp4
-profile:v high
-level:v 4.0
-crf 20
-sc_threshold 0
-flags +cgop
-movflags frag_keyframe+faststart
-pix_fmt yuv420p
-preset ultrafast
-g 100
-keyint_min 100
-hls_time 5000
-hls_playlist_type vod
-vf scale='trunc(oh*a/2)*2:288'
-b:v 600k
-maxrate 642k
-bufsize 900k
-b:a 64k
-hls_segment_filename https://my-bucket.s3.us-west-1.amazonaws.com/288p_600k_%03d.ts
pipe:1 | aws s3 cp - s3://my-bucket/288p_600k.m3u8
-vf scale='trunc(oh*a/2)*2:360'
-b:v 900k
-maxrate 963k
-bufsize 1350k
-b:a 96k
-hls_segment_filename https://my-bucket.s3.us-west-1.amazonaws.com/360p_900k_%03d.ts
pipe:1 | aws s3 cp - s3://my-bucket/360p_900k.m3u8
-vf scale='trunc(oh*a/2)*2:432'
-b:v 1600k
-maxrate 1712k
-bufsize 2400k
-b:a 128k
-hls_segment_filename https://my-bucket.s3.us-west-1.amazonaws.com/432p_1600k_%03d.ts
pipe:1 | aws s3 cp - s3://my-bucket/432p_1600k.m3u8
-vf scale='trunc(oh*a/2)*2:720'
-b:v 3200k
-maxrate 3424k
-bufsize 4800k
-b:a 128k
-hls_segment_filename https://my-bucket.s3.us-west-1.amazonaws.com/720p_3200k_%03d.ts
pipe:1 | aws s3 cp - s3://my-bucket/720p_3200k.m3u8
-vf scale='trunc(oh*a/2)*2:1080'
-b:v 5300k
-maxrate 5671k
-bufsize 7950k
-b:a 192k
-hls_segment_filename https://my-bucket.s3.us-west-1.amazonaws.com/1080p_5300k_%03d.ts
pipe:1 | aws s3 cp - s3://my-bucket/1080p_5300k.m3u8Error Message
Exit Code: 1(General error)
Working directory: /home/backend/public
Output:
================
Error Output:
================
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://my-bucket.s3.us-west-1.amazonaws.com/in.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01T00:00:00.000000Z
encoder : Lavf53.24.2
Duration: 00:00:05.31, start: 0.000000, bitrate: 1589 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1205 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 384 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55ba09a95300] using SAR=1/1
[libx264 @ 0x55ba09a95300] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX
[libx264 @ 0x55ba09a95300] profile Constrained Baseline, level 4.0
[libx264 @ 0x55ba09a95300] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=100 keyint_min=51 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=642 vbv_bufsize=900 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
Output #0, mp4, to 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 512x288 [SAR 1:1 DAR 16:9], q=-1--1, 600 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 642000/0/600000 buffer size: 900000 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 64 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
encoder : Lavc57.107.100 aac
frame= 27 fps=0.0 q=28.0 size= 0kB time=00:00:01.13 bitrate=
0.3kbits/s speed=2.21x
Unknown options: -vf,scale=trunc(oh*a/2)*2:360,-b:v,900k,-maxrate,963k,-bufsize,1350k,-b:a,96k,-hls_segment_filename,https://my-bucket.s3.us-west-1.amazonaws.com/360p_900k_%03d.ts,-
Unknown options: -vf,scale=trunc(oh*a/2)*2:432,-b:v,1600k,-maxrate,1712k,-bufsize,2400k,-b:a,128k,-hls_segment_filename,https://my-bucket.s3.us-west-1.amazonaws.com/432p_1600k_%03d.ts,-
Unknown options: -vf,scale=trunc(oh*a/2)*2:720,-b:v,3200k,-maxrate,3424k,-bufsize,4800k,-b:a,128k,-hls_segment_filename,https://my-bucket.s3.us-west-1.amazonaws.com/720p_3200k_%03d.ts,-
Unknown options: -vf,scale=trunc(oh*a/2)*2:1080,-b:v,5300k,-maxrate,5671k,-bufsize,7950k,-b:a,192k,-hls_segment_filename,https://my-bucket.s3.us-west-1.amazonaws.com/1080p_5300k_%03d.ts,-
upload failed: - to s3://my-bucket/1080p_5300k.m3u8 seek() takes 2 positional arguments but 3 were given
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
frame= 105 fps=104 q=27.0 Lsize= 0kB time=00:00:04.26 bitrate=
0.1kbits/s speed=4.24x
video:405kB audio:36kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x55ba09a95300] frame I:2 Avg QP:27.31 size: 31711
[libx264 @ 0x55ba09a95300] frame P:103 Avg QP:29.12 size: 3522
[libx264 @ 0x55ba09a95300] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x55ba09a95300] mb P I16..4: 0.8% 0.0% 0.0% P16..4: 58.1%
0.0% 0.0% 0.0% 0.0% skip:41.2%
[libx264 @ 0x55ba09a95300] coded y,uvDC,uvAC intra: 71.6% 66.1% 45.5%
inter: 29.8% 10.3% 1.5%
[libx264 @ 0x55ba09a95300] i16 v,h,dc,p: 16% 26% 35% 23%
[libx264 @ 0x55ba09a95300] i8c dc,h,v,p: 47% 22% 20% 11%
[libx264 @ 0x55ba09a95300] kb/s:811.77
[aac @ 0x55ba09e26c60] Qavg: 88.610
Conversion failed! -
how to extract a metadata track from MP4 file
30 août 2019, par raviI need to extract metadata track from a MP4 file and save as separate file. I see that, using ffmpeg I can extract standard tracks like Audio or Video or Subtitle track and save it as a new file. For ex : to save audio track I use the command below :
ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac
But my need is to save a proprietary metadata track. Any pointers will be helpful.
Here is output of
ffmpeg
to know different traks that are present in the file. Particuarly, I am interested in extracting track corresponding to Stream #0:3(eng)...C:\Users\rkumar\Documents\work\tools\ffmpeg\bin>ffmpeg.exe -i input.MP4
ffmpeg version N-57176-g64b3aaf Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 15 2013 21:32:52 with gcc 4.8.1 (GCC)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.MP4':
Metadata:
major_brand : mp41
minor_version : 538120216
compatible_brands: mp41
creation_time : 1970-01-01 00:00:09
Duration: 00:00:10.52, start: 0.000000, bitrate: 834 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709),
854x480 [SAR 1:1 DAR 427:240], 679 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:09
handler_name : AVC
timecode : 00:00:13:22
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:09
handler_name : AAC
timecode : 00:00:13:22
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:09
handler_name : TCD
timecode : 00:00:13:22
Stream #0:3(eng): Data: none (ssmd / 0x646D7067), 5 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:09
handler_name : MET
Stream #0:4(eng): Data: none (fdsc / 0x63736466), 10 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:09
handler_name : SOS