Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (76)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (6923)

  • Your guide to cookies, web analytics, and GDPR compliance

    25 février 2020, par Joselyn Khor — Analytics Tips, Privacy, Security

    It’s been almost two years since the GDPR came into effect and turned the online world on its head. Confusion around cookies/cookie consent/cookie compliance remains till today. So we’d like to take this chance to talk more about the supposed “big bad” of the latest century. 

    Online cookies seem to have a bad reputation, but are they as bad as they seem ?

    To start, what are cookies on the internet ?

    An internet cookie a.k.a. an HTTP cookie, is a small piece of data sent from websites that is stored on your computer or mobile when you visit that site.

    Are all cookies bad ?

    No. Cookies themselves are usually harmless as they can’t infect computers with malware. 

    They can also be helpful for both websites who use them and individuals visiting those websites. For example, when online shopping, cookies on ecommerce sites keep track of what you’re shopping for. If you didn’t have that tracking, your cart would be empty every time you moved away from that site.

    For businesses/websites, cookies can be used for authentication (logins) and tracking website user experience. For example, tracking multiple visits to the same site in order to provide better experiences to customers visiting their website.

    internet cookies tracking

    The not-so-sweet types of cookies :

    Cookies that contain personal data

    Another example of a bad cookie is when cookies contain personal data directly in the cookie itself. For example, when websites store demographics or your name in a cookie ; or when a website stores survey results in a cookie. Use of cookies in these ways is considered bad practice nowadays.

    Third-party cookies

    They can be used by websites to learn about your visit and activity across multiple websites. Cookies can enter harmful territory when employed for “big brother” types of tracking i.e. when they’re used to build a virtual fingerprint of individuals after their activity is tracked from website to website. For example most advertising networks create third party cookies in your browser when you view an ad, which lets these advertisers track users across these websites and let companies buy more targeted ads.

    Why does Matomo use cookies ?

    web analytics cookies

    For accurate reporting of new and returning visitors. Matomo uses cookies to store some information about visitors between visits. We also use cookies to remember if someone gave consent to tracking, or opted out of tracking. 

    Types of cookies Matomo uses :

    • Matomo by default uses first-party cookies, set on the domain of your site.
    • Cookies created by Matomo start with : _pk_ref_pk_cvar_pk_id_pk_ses. See a list of all Matomo cookies : https://matomo.org/faq/general/faq_146/

    Cookie-less tracking - disable cookies and ensure cookie compliance :

    It’s possible to disable tracking cookies in Matomo by adding a line on the javascript code. When cookies are disabled, Matomo data will become slightly less accurateAlso, when cookies are disabled, there may still be a few cookies created in specific cases.

    If you disable cookies, Matomo tries to detect unique visitors by a fingerprint based on a few browser attributes : operating system, browser, browser plugins, IP address and browser language.

    By disabling tracking cookies, you may also use Matomo without needing to display a cookie consent screen. You can also keep tracking when they reject cookie consent by keeping cookies disabled.

    Cookies and the GDPR

    In some countries and according to the GDPR, websites need to provide a way for users to opt-out of all tracking, in particular tracking cookies.

    The GDPR regulates the use of cookies when they compromise an individual’s privacy. When cookies can identify an individual, it is considered personal data.

    cookies and GDPR

    Cookie compliance and the GDPR

    To be GDPR compliant you must :

    • Receive user consent before using any cookies (except strictly necessary cookies). Read more on cookies that are “clearly exempt from consent”.
    • Provide accurate and specific information about the data each cookie tracks and its purpose in plain language before consent is received.
    • Document and store consent received from users.
    • Allow users to access your service even if they refuse to allow the use of certain cookies
    • Make it as easy for users to withdraw their consent as it was for them to give their consent in the first place.

    Source : https://gdpr.eu/cookies/

    When does GDPR require cookie consent ?

    The purpose of the GDPR is to give individuals control over their personal data. As such this regulation has provisions and requirements which regulate the processing of personal data to protect the privacy of individuals. 

    This means in order to use cookies, you will sometimes need explicit consent from those individuals.

    When does GDPR not require cookie consent ?

    Then there are many cookies that generally do NOT require consent (Source : https://wikis.ec.europa.eu/display/WEBGUIDE/04.+Cookies). 

    These are :

    • user input cookies, for the duration of a session
    • authentication cookies, for the duration of a session
    • user-centric security cookies, used to detect authentication abuses and linked to the functionality explicitly requested by the user, for a limited persistent duration
    • multimedia content player session cookies, such as flash player cookies, for the duration of a session
    • load balancing session cookies and other technical cookies, for the duration of session
    • user interface customisation cookies, for a browser session or a few hours, when additional information in a prominent location is provided (e.g. “uses cookies” written next to the customisation feature)

    Tracking cookies and consent vs legitimate interest

    cookie consent and GDPR legitimate interests

    User consent is not always required :

    We understand that whenever you collect and process personal data, you need – almost always – to ask for their consent. However, there are instances where you have to process data under “legitimate interests”. The GDPR states that processing of personal data is lawful “if processing is necessary for the purposes of the legitimate interests”. This means if you have “legitimate interests” you can avoid asking for consent for collecting and processing personal information. Learn more : https://cookieinformation.com/resources/blog/what-is-legitimate-interest-under-the-gdpr 

    A lawful basis for processing personal data (proceeding with caution) :

    We’ve also written about having a lawful basis for processing personal data under GDPR with Matomo. The caveat here is you need to have a strong argument for legitimate interests. If you are processing personal data which may represent a risk to the final user, then getting consent is, for us, still the right lawful basis. If you are not sure, at the time of writing ICO is providing a tool in order to help you make this decision.

    How is Matomo Analytics GDPR compliant ?

    Matomo can be configured to automatically anonymise data so you don’t process any personal data. This allows you to completely avoid GDPR. If you decide to process personal data, Matomo provides you with 12 steps to easily comply with the GDPR guidelines.

    New developments on cookies and the GDPR

    In the early days of the GDPR, a spate of cookie management platforms (CMPs) popped up to help websites and people comply with GDPR rules around cookies.

    These have become problematic in recent years. Europe’s highest court ruled pre-checked box for cookie boxes does not give enough consent

    As well as that, new research suggests most cookie consent pop-ups in the EU fall short of GDPR. A new study called, ‘Dark Patterns after the GDPR’ from MIT, UCL and Aarhus University found that a vast majority of websites aren’t following GDPR rules around cookies. The study found most cookie consent pop-ups in the EU to be undermining the GDPR by finding sneaky ways to convince website visitors to click ‘accept’.

    Disclaimer

    We are not lawyers and don’t claim to be. The information provided here is to help give an introduction to issues you may encounter when dealing cookies. We encourage every business and website to take data privacy seriously and discuss these issues with your lawyer if you have any concerns. 

    Additional resources :

  • FFmpeg -segment with a lot of time codes

    24 février 2020, par Grenight

    I’m making program that splits videos for running parallel encodes.

    My problem is that with putting all segments into command like i can hit a limit of maximum characters in windows console. Approximately 600, while 1-2 hour movie can easily be 1000-2000 scenes.

    Is there a way to use .csv file for segment so i don’t need to put all time codes to command line ? Or is there another ways ?

    Here is example of command line that is used in program :
    timecodes is where all time codes passed.

    cmd = f'{self.FFMPEG} -i {video} -map_metadata 0 -an -f segment -segment_times {timecodes} -c copy -avoid_negative_ts 1 {self.temp_dir / "split" / "%04d.mkv"}

  • ffmpeg conversion : Twitter rejects video with "Not valid video"

    12 février 2020, par DeadlyBacon

    I have an app that uploads via twitter api chunked upload, and it finally works with photos.

    However, I am trying to get it to work with videos.

    Uploading didnt work out-of-the-box even though the video format is mp4. The twitter guidelines for uploads are these

    With that in mind, I have this ffmpeg command so far :

    ffmpeg -i in.mp4  -vf \"scale=1280:720\" -b:v 5000K -minrate 5000K -maxrate 5000K -b:a 128K -r 30 -f mp4 -vcodec libx264 -profile:v high -pix_fmt yuv420p -strict -2  -ac 2 -acodec aac out.mp4

    I still get "Not valid video", and I don’t know why.

    Here’s my mediainfo output for out.mp4 :

    General
    Count                                    : 328
    Count of stream of this kind             : 1
    Kind of stream                           : General
    Kind of stream                           : General
    Stream identifier                        : 0
    Count of video streams                   : 1
    Count of audio streams                   : 1
    Video_Format_List                        : AVC
    Video_Format_WithHint_List               : AVC
    Codecs Video                             : AVC
    Video_Language_List                      : English
    Audio_Format_List                        : AAC
    Audio_Format_WithHint_List               : AAC
    Audio codecs                             : AAC LC
    Audio_Language_List                      : English
    Complete name                            : video-5e4405cd4348a5e4405cd434d2.mp4
    File name                                : video-5e4405cd4348a5e4405cd434d2
    File extension                           : mp4
    Format                                   : MPEG-4
    Format                                   : MPEG-4
    Format/Extensions usually used           : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
    Commercial name                          : MPEG-4
    Format profile                           : Base Media
    Internet media type                      : video/mp4
    Codec ID                                 : isom
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
    CodecID_Compatible                       : isom/iso2/avc1/mp41
    Codec                                    : MPEG-4
    Codec                                    : MPEG-4
    Codec/Extensions usually used            : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
    File size                                : 52664272
    File size                                : 50.2 MiB
    File size                                : 50 MiB
    File size                                : 50 MiB
    File size                                : 50.2 MiB
    File size                                : 50.22 MiB
    Duration                                 : 79744
    Duration                                 : 1 min 19 s
    Duration                                 : 1 min 19 s 744 ms
    Duration                                 : 1 min 19 s
    Duration                                 : 00:01:19.744
    Duration                                 : 00:01:19:20
    Duration                                 : 00:01:19.744 (00:01:19:20)
    Overall bit rate                         : 5283334
    Overall bit rate                         : 5 283 kb/s
    Frame rate                               : 30.000
    Frame rate                               : 30.000 FPS
    Frame count                              : 2390
    Stream size                              : 88780
    Stream size                              : 86.7 KiB (0%)
    Stream size                              : 87 KiB
    Stream size                              : 87 KiB
    Stream size                              : 86.7 KiB
    Stream size                              : 86.70 KiB
    Stream size                              : 86.7 KiB (0%)
    Proportion of this stream                : 0.00169
    HeaderSize                               : 40
    DataSize                                 : 52575500
    FooterSize                               : 88732
    IsStreamable                             : No
    File last modification date              : UTC 2020-02-12 14:05:37
    File last modification date (local)      : 2020-02-12 15:05:37
    Writing application                      : Lavf57.83.100
    Writing application                      : Lavf57.83.100

    Video
    Count                                    : 342
    Count of stream of this kind             : 1
    Kind of stream                           : Video
    Kind of stream                           : Video
    Stream identifier                        : 0
    StreamOrder                              : 0
    ID                                       : 1
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format/Url                               : http://developers.videolan.org/x264.html
    Commercial name                          : AVC
    Format profile                           : High@L3.1
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4
    Format settings, ReFrames                : 4 frames
    Internet media type                      : video/H264
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Codec                                    : AVC
    Codec                                    : AVC
    Codec/Family                             : AVC
    Codec/Info                               : Advanced Video Codec
    Codec/Url                                : http://developers.videolan.org/x264.html
    Codec/CC                                 : avc1
    Codec profile                            : High@L3.1
    Codec settings                           : CABAC / 4 Ref Frames
    Codec settings, CABAC                    : Yes
    Codec_Settings_RefFrames                 : 4
    Duration                                 : 79667
    Duration                                 : 1 min 19 s
    Duration                                 : 1 min 19 s 667 ms
    Duration                                 : 1 min 19 s
    Duration                                 : 00:01:19.667
    Duration                                 : 00:01:19:20
    Duration                                 : 00:01:19.667 (00:01:19:20)
    Bit rate                                 : 5000000
    Bit rate                                 : 5 000 kb/s
    Width                                    : 1280
    Width                                    : 1 280 pixels
    Height                                   : 720
    Height                                   : 720 pixels
    Sampled_Width                            : 1280
    Sampled_Height                           : 720
    Pixel aspect ratio                       : 1.000
    Display aspect ratio                     : 1.778
    Display aspect ratio                     : 16:9
    Rotation                                 : 0.000
    Frame rate mode                          : CFR
    Frame rate mode                          : Constant
    FrameRate_Mode_Original                  : VFR
    Frame rate                               : 30.000
    Frame rate                               : 30.000 FPS
    Frame count                              : 2390
    Resolution                               : 8
    Resolution                               : 8 bits
    Colorimetry                              : 4:2:0
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Scan type                                : Progressive
    Interlacement                            : PPF
    Interlacement                            : Progressive
    Bits/(Pixel*Frame)                       : 0.181
    Stream size                              : 51297022
    Stream size                              : 48.9 MiB (97%)
    Stream size                              : 49 MiB
    Stream size                              : 49 MiB
    Stream size                              : 48.9 MiB
    Stream size                              : 48.92 MiB
    Stream size                              : 48.9 MiB (97%)
    Proportion of this stream                : 0.97404
    Writing library                          : x264 - core 152 r2854 e9a5903
    Writing library                          : x264 core 152 r2854 e9a5903
    Encoded_Library_Name                     : x264
    Encoded_Library_Version                  : core 152 r2854 e9a5903
    Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=5000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en

    Audio
    Count                                    : 275
    Count of stream of this kind             : 1
    Kind of stream                           : Audio
    Kind of stream                           : Audio
    Stream identifier                        : 0
    StreamOrder                              : 1
    ID                                       : 2
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Commercial name                          : AAC
    Format profile                           : LC
    Format settings, SBR                     : No (Explicit)
    Format settings, SBR                     : No (Explicit)
    Codec ID                                 : mp4a-40-2
    Codec                                    : AAC LC
    Codec                                    : AAC LC
    Codec/Family                             : AAC
    Codec/CC                                 : 40
    Duration                                 : 79744
    Duration                                 : 1 min 19 s
    Duration                                 : 1 min 19 s 744 ms
    Duration                                 : 1 min 19 s
    Duration                                 : 00:01:19.744
    Duration                                 : 00:01:19:25
    Duration                                 : 00:01:19.744 (00:01:19:25)
    Bit rate mode                            : CBR
    Bit rate mode                            : Constant
    Bit rate                                 : 128257
    Bit rate                                 : 128 kb/s
    Channel(s)                               : 2
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Channel positions                        : 2/0/0
    ChannelLayout                            : L R
    Samples per frame                        : 1024
    Sampling rate                            : 48000
    Sampling rate                            : 48.0 kHz
    Samples count                            : 3827712
    Frame rate                               : 46.875
    Frame rate                               : 46.875 FPS (1024 SPF)
    Frame count                              : 3738
    Compression mode                         : Lossy
    Compression mode                         : Lossy
    Stream size                              : 1278470
    Stream size                              : 1.22 MiB (2%)
    Stream size                              : 1 MiB
    Stream size                              : 1.2 MiB
    Stream size                              : 1.22 MiB
    Stream size                              : 1.219 MiB
    Stream size                              : 1.22 MiB (2%)
    Proportion of this stream                : 0.02428
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en
    Default                                  : Yes
    Default                                  : Yes
    Alternate group                          : 1
    Alternate group                          : 1

    Edit : Guess Ill add my PHP code too (This is chopped in a sensible manner because the actual file is very large) :

    // Set up Codebird
    \Codebird\Codebird::setConsumerKey($consumer_key, $consumer_secret); // static, see README

    $cb = \Codebird\Codebird::getInstance();

    $cb->setToken($token, $token_secret);
    $cb->setTimeout(60 * 1000); // 60 second request timeout

     $video = new Video($path);

       // Convert to the parameter required by twitter.
       $converted = $video->convert();

       $path = realpath('videos/' . $converted);

       $file = fopen($path, 'rb');

       $size = fstat($file)['size'];
       $mime_type = mime_content_type($path);

       $media = $cb->media_upload([
         'command' => 'INIT',
         'media_type' => $mime_type,
       'media_category' => 'tweet_video',
         'total_bytes' => $size,
       ]);

    $success = $media->httpstatus >= 200 && $media->httpstatus < 300; # 2xx

     if (!$success) {
       throw new TwitterException("Failed to INIT upload for $path...");
     }


     // APPEND chunks to upload.
     $mediaId = $media->media_id_string;
     $segmentId = 0;

     while (!feof($file)) {
       echo "chunk #$segmentId....";

       $chunk = fread($file, 512 * 1024); // caps out at 512 MB

       echo "chunk size: ". strlen($chunk);

       $media = $cb->media_upload([
         'command' => 'APPEND',
         'media_id' => $mediaId,
         'segment_index' => $segmentId,
         'media' => $chunk,
       ]);

       $success = $media->httpstatus >= 200 && $media->httpstatus < 300; # 2xx

       if (!$success) {
         throw new TwitterException("Failed to APPEND to upload for $path, chunk $segmentId...");
       }

       $segmentId++;
     }
     // Close file and FINALIZE upload.
     fclose($file);

    echo "FINALIZING id $mediaId...";
     $media = $cb->media_upload([
         'command' => 'FINALIZE',
         'media_id' => $mediaId,
     ]);

     $success = $media->httpstatus >= 200 && $media->httpstatus < 300; # 2xx

     if (!$success) {
       var_dump($media);
       throw new TwitterException("Failed to FINALIZE upload for $path...");
     }

     return $mediaId;

    Video is my ffmpeg class, which I’ll paste below, and $path is a URL leading to a perfectly valid mp4 video.

    Video.php :

    <?php

    class VideoConversionException extends \Exception {}

    class Video {
     public $name;
     public $converted;


     public function __construct($name) {
       self::clear();

       $this->name = $name;
     }


     public function convert() {
       $tmpVideo = 'video-' . uniqid() . uniqid() . '.mp4';
       $videoPath = 'videos/' . $tmpVideo;

       //$ffmpeg = "ffmpeg -i https://tvcanarias.acfipress.com/BC_190907_gc_teror.mp4  -vf "scale=1280:720" -b:v 5000K -b:a 128K -r 30 -f mp4 -vcodec libx264 -acodec aac output_video.mp4";
       $ffmpeg = "ffmpeg -i {$this->name}  -vf \"scale=1280:720\" -b:v 5000K -minrate 5000K -maxrate 5000K -b:a 128K -r 30 -f mp4 -vcodec libx264 -profile:v high -pix_fmt yuv420p -strict -2  -ac 2 -acodec aac $videoPath";
       //$ffmpeg = "ffmpeg -i {$this->name} -pix_fmt yuv420p -vcodec libx264 -vf scale=640:-1 -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100  -ac 2  -strict experimental -r 30 $videoPath";
       $output = [];
       exec($ffmpeg, $output, $status);

       if ($status != 0) {
         //die("Couldnt run ffmpeg. (Error code: #$status)");
         throw new VideoConversionException("Couldn't run ffmpeg. (Error code: #$status)");
       }

       $this->converted = $tmpVideo;
       return $tmpVideo;
     }

     public function shredConverted() {
       // delete video.
       @unlink("videos/{$this->$converted}");
     }

     public static function clear() {
       // We can't really shred videos right away as they might be still uploading.
       // Therefore, every time this library is used, we will just delete videos older
       // than, say, an hour.

       $files = scandir('videos');

       $curtime = time();

       foreach ($files as $file) {
         if ($file == '.gitignore' || $file == '.' || $file == '..') {
           continue;
         }

         $mtime = filemtime("videos/$file");

         $diff = $curtime - $mtime;
         $overAnHour = $diff > (60 * 60);

         if ($overAnHour) {
           @unlink("videos/$file");
         }
       }
     }
    }