Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (47)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number 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
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

Sur d’autres sites (8721)

  • ffmpeg extract frame and get timestamp based on creation time for each extracted frame in exif or txt

    4 août 2021, par Scaling

    I try to extract frames from a underwater survey video using ffmpeg. the extracted frames should be merged with a gps position based on a timestamp later in the process. the code i use to extract the frames is :

    



    ffmpeg -i GOPR0173.MP4 -qscale:v 2 -r 1 frames/%4d.jpg.

    



    I need a solution to get the real timestamp of the frame based on the survey datetime, so that the timestamp of the frame equals the real time when the video was created. Ideally the timestamp is saved in the images exif or if this is not possible in a seperate textfile and the timestamp is used as name of the files like 2020_01_01_HH_MM_SS.jpg.

    



    My idea is to use the creation_time of the video add the timestamp of the frame to this and store the result in the exif of the extracted frame or if this is not possible in a txt file.

    



    Im new to ffmpeg and really lost and would appreciate any help to solve this task !
If anyone could provide me the necessary code, that would be awesome !

    



    C:\Unterwasserfotos>ffmpeg -i GOPR0173.MP4 -vstats -qscale:v 2 -r 0.1 frames/%4d.jpg
ffmpeg version git-2020-01-21-fc6fde2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls
 --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enabl
e-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-
libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwol
ame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enab
le-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 --enabl
e-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 38.100 / 56. 38.100
  libavcodec     58. 66.100 / 58. 66.100
  libavformat    58. 35.104 / 58. 35.104
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 71.100 /  7. 71.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GOPR0173.MP4':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2020-01-21T12:33:10.000000Z
    firmware        : HD4.02.05.00.00
  Duration: 00:02:21.85, start: 0.000000, bitrate: 30152 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR
 1:1 DAR 16:9], 30000 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc (default)
    Metadata:
      creation_time   : 2020-01-21T12:33:10.000000Z
      handler_name    :         GoPro AVC
      encoder         : GoPro AVC encoder
      timecode        : 12:33:11:16
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (defa
ult)
    Metadata:
      creation_time   : 2020-01-21T12:33:10.000000Z
      handler_name    :         GoPro AAC
      timecode        : 12:33:11:16
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2020-01-21T12:33:10.000000Z
      handler_name    :         GoPro TCD
      timecode        : 12:33:11:16
    Stream #0:3(eng): Data: none (fdsc / 0x63736466), 12 kb/s (default)
    Metadata:
      creation_time   : 2020-01-21T12:33:10.000000Z
      handler_name    :         GoPro SOS
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'frames/%4d.jpg':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    firmware        : HD4.02.05.00.00
    encoder         : Lavf58.35.104
    Stream #0:0(eng): Video: mjpeg, yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s,
 0.10 fps, 0.10 tbn, 0.10 tbc (default)
    Metadata:
      creation_time   : 2020-01-21T12:33:10.000000Z
      handler_name    :         GoPro AVC
      timecode        : 12:33:11:16
      encoder         : Lavc58.66.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame=   16 fps=0.3 q=2.0 Lsize=N/A time=00:02:40.00 bitrate=N/A dup=0 drop=7076 speed=3.26x
video:1938kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown´´´









    


  • ffmpeg - strange timestamps after concatenation

    25 août 2020, par codefox

    I want to cut some scene from video to other file, but also avoid lenghty encoding. In order to do it, i have to generate two sub video files : first file with encoding from start position to nearest position with keyframe, and second file with copy stream (without encoding), from keyframe to end position. So I have two files, and then merge them using concat, and result is not ideal. first frame do not start from 0.0 sec is longer than expected. These issues do not appear, when audio stream is disabled while generating two videos.

    


    printout :

    


    C:\ffmpeg\x86>ffmpeg -ss 0ms -to 33ms -i C:\db\test.mp4 -profile:v baseline -y -video_track_timescale 30030 C:/db/v0.mp4 -hide_banner
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\db\test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.71.100
  Duration: 00:00:09.67, start: 0.000000, bitrate: 429 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 323 kb/s, 30 fps, 30 tbr, 30030 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
    Metadata:
      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 @ 03d5f100] using SAR=1/1
[libx264 @ 03d5f100] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 03d5f100] profile Constrained Baseline, level 3.0, 4:2:0, 8-bit
[libx264 @ 03d5f100] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'C:/db/v0.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.49.100
    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 30030 tbn, 30 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.97.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.97.100 aac
frame=    1 fps=0.0 q=29.0 Lsize=       9kB time=00:00:00.03 bitrate=1994.2kbits/s speed=1.12x
video:7kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 16.875153%
[libx264 @ 03d5f100] frame I:1     Avg QP:26.34  size:  6797
[libx264 @ 03d5f100] mb I  I16..4: 51.3%  0.0% 48.7%
[libx264 @ 03d5f100] coded y,uvDC,uvAC intra: 34.2% 43.3% 4.0%
[libx264 @ 03d5f100] i16 v,h,dc,p: 39% 21% 16% 24%
[libx264 @ 03d5f100] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 21% 17%  5%  7%  5%  8%  4%  3%
[libx264 @ 03d5f100] i8c dc,h,v,p: 58% 19% 18%  4%
[libx264 @ 03d5f100] kb/s:1631.28
[aac @ 03d80a80] Qavg: 212.419

C:\ffmpeg\x86>ffmpeg -ss 900ms -to 1100ms -i C:\db\test.mp4 -y -c copy C:/db/v1.mp4 -hide_banner
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\db\test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.71.100
  Duration: 00:00:09.67, start: 0.000000, bitrate: 429 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 323 kb/s, 30 fps, 30 tbr, 30030 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Output #0, mp4, to 'C:/db/v1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.49.100
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 323 kb/s, 30 fps, 30 tbr, 30030 tbn, 30030 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=    6 fps=0.0 q=-1.0 Lsize=      23kB time=00:00:00.18 bitrate=1018.0kbits/s speed= 183x
video:19kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 7.228971%

C:\ffmpeg\x86>ffmpeg -f concat -i c:/db/list.txt -c copy -y c:/db/out.mp4 -hide_banner
[mov,mp4,m4a,3gp,3g2,mj2 @ 03544800] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'c:/db/list.txt':
  Duration: N/A, start: -0.008209, bitrate: 1923 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1778 kb/s, 30 fps, 30 tbr, 30030 tbn, 60 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 144 kb/s
    Metadata:
      handler_name    : SoundHandler
Output #0, mp4, to 'c:/db/out.mp4':
  Metadata:
    encoder         : Lavf58.49.100
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 1778 kb/s, 30 fps, 30 tbr, 30030 tbn, 30030 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 144 kb/s
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 03544800] Auto-inserting h264_mp4toannexb bitstream filter
frame=    7 fps=0.0 q=-1.0 Lsize=      31kB time=00:00:00.23 bitrate=1083.9kbits/s speed=58.3x
video:26kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.516988%

C:\ffmpeg\x86>ffprobe c:\db\v0.mp4 -show_entries frame=pict_type,pkt_pts_time,pkt_duration_time -select_streams v:0 -of csv=print_section=0 -hide_banner
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\db\v0.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.49.100
  Duration: 00:00:00.04, start: 0.000000, bitrate: 1815 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1778 kb/s, 30 fps, 30 tbr, 30030 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 144 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
0.000000,0.033333,I


C:\ffmpeg\x86>ffprobe c:\db\v1.mp4 -show_entries frame=pict_type,pkt_pts_time,pkt_duration_time -select_streams v:0 -of csv=print_section=0 -hide_banner
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\db\v1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.49.100
  Duration: 00:00:00.21, start: 0.000000, bitrate: 891 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 765 kb/s, 30 fps, 30 tbr, 30030 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 99 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
0.000000,0.033267,I

0.033267,0.033333,P
0.066600,0.033400,P
0.100000,0.033300,P
0.133300,0.033300,P
0.166600,0.033400,P

C:\ffmpeg\x86>ffprobe c:\db\out.mp4 -show_entries frame=pict_type,pkt_pts_time,pkt_duration_time -select_streams v:0 -of csv=print_section=0 -hide_banner
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\db\out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.49.100
  Duration: 00:00:00.26, start: 0.000000, bitrate: 984 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 880 kb/s, 28.93 fps, 30 tbr, 30030 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 104 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
0.007992,0.041991,I

0.049983,0.033267,I

0.083250,0.033333,P
0.116583,0.033400,P
0.149983,0.033300,P
0.183283,0.033300,P
0.216583,0.025408,P


    


    How to generate these files, merge them with stream copy, and final video will start from 0.0 and have uniform frames duration ?

    


  • Use Google Analytics and risk fines, after CJEU ruling on Privacy Shield

    27 août 2020, par Joselyn Khor — Privacy

    EU websites using Google Analytics and Facebook are being targeted by European privacy group noyb after the invalidation of the Privacy Shield. They filed a complaint against 101 websites for continuing to send data to the US. 

    “A quick analysis of the HTML source code of major EU webpages shows that many companies still use Google Analytics or Facebook Connect one month after a major judgment by the Court of Justice of the European Union (CJEU) - despite both companies clearly falling under US surveillance laws, such as FISA 702. Neither Facebook nor Google seem to have a legal basis for the data transfers.”

    noyb website
    CJEU invalidates the Google Privacy Shield

    The Privacy Shield previously allowed for EU data to be transferred to the US. However, this was invalidated by the Court of Justice of the European Union (CJEU) on July 16, 2020. The CJEU deemed it illegal for any websites to transfer the personal data of European citizens to the US. 

    They also made it clear in a press release that “data subjects can claim compensation for inadmissible data exports (marginal no. 143 of the judgment). This should in particular include non-material damage (“compensation for pain and suffering”) and must be of a deterrent amount under European law.” Which puts extra financial pressure on websites to take the new ruling seriously.

    Immediate action is required after Google Privacy Shield invalidation

    The Berlin Commissioner for Data Protection and Freedom of Information therefore calls on all those responsible under its supervision to observe the decision of the ECJ [CJEU]. Those responsible who transfer personal data to the USA - especially when using cloud services - are now required to immediately switch to service providers in the European Union or in a country with an adequate level of data protection.

    The Berlin Commissioner for Data Protection and Freedom of Information

    As the ruling is effective immediately, there’s a pressing need for websites using Google Analytics to act, or face getting fined.

    What does this mean for you ?

    If you’re using Google Analytics the safest bet is to stop using it immediately

    "Neither Google Analytics nor Facebook Connect are necessary for the operation of these websites and could therefore have been replaced or at least deactivated in the meantime."

    Max Schrems, Honorary Chairman of noyb 

    If you still need to use it, then you’ll need to inform your visitors via a clear consent screen. This banner needs to make clear their personal data will be sent to the US, and to educate them about any potential risk related to this. They will then need to explicitly agree to this. 

    Another downside of cookie consent screens is that you may also suffer a damaging loss of visitors. After implementing cookie consent best practices, the UK’s data regulator the Information Commissioner’s Office (ICO) found a 90% drop in traffic, “implying a ninety percent drop in opt-in rates.”

    With an acceptance rate for such consent screens being lower than 10% your analytics becomes guesswork rather than science. 

    Looking for a privacy-respecting alternative to Google Analytics ?

    Privacy compliant Matomo Analytics is one of the best Google Analytics alternatives availalble. 

    With Matomo you’re able to continue using analytics without facing the wrath of both the GDPR and the CJEU. Matomo On-Premise lets you choose where your data is stored, so you can ensure no data is processed in the US. 

    Matomo is privacy-friendly and can be tweaked to comply with all privacy laws. Including the GDPR, HIPAA, CCPA and PECR. The benefits of this include : not needing to use tracking or cookie consent screens (like with GA) ; and avoiding fines because no personal data is collected. You also get 100% accurate data and the ability to protect your user’s privacy.

    Matomo is the privacy-respecting Google Analytics alternative

    Is your EU business at risk of being fined for using Google Analytics ?