Recherche avancée

Médias (91)

Autres articles (53)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

Sur d’autres sites (6115)

  • couldn't populate thumbnail on client side

    8 novembre 2020, par Loki
    router.post("/thumbnail",(req,res)=>{

  let thumbsFilePath="";
  let fileDuration="";



  ffmpeg.ffprobe(req.body.filePath, function(err,metadata){
    console.dir(metadata);
    console.log('METADATA==>'+metadata);
    console.log(metadata.format.duration);

    fileDuration=metadata.format.duration;

  })

  
  ffmpeg(req.body.filePath)
  .on('filenames', function(filenames) {
    console.log('Will generate ' + filenames.join(','))
    thumbsFilePath="uploads/thumbnails/"+ filenames[0];
  })
  .on('end', function() {
    console.log('Screenshots taken');
    console.log('FILEPATH===>'+thumbsFilePath);
    console.log('FILEDURATION===>'+fileDuration);
    return res.json({success: true, thumbsFilePath , fileDuration})
  })
  .screenshots({
    // Will take screens at 20%, 40%, 60% and 80% of the video
    count: 3,
    folder: 'uploads/thumbnails/',
    size:'320x240',
    // %b input basename ( filename w/o extension )
    filename:'thumbnail-%b.png'
  });
})


    


    the screenshots are saved perfectly and their path is also received to the client-side from thumbsFilePath but I cant populate it in the client-side page(react).. idk what I am doing wrong here.

    


    here is client-side code. I used usestate

    


      const [FilePath, setFilePath]= useState('');
  const [Duration, setDuration] = useState('');
  const [Thumbnail, setThumbnail] = useState('');


    


    here is an error when I try to populate img

    


    enter image description here

    


    const onDrop=(files)=>{&#xA;      let formData= new FormData();&#xA;      let config={&#xA;        header:{&#x27;content-type&#x27;:&#x27;multipart/form-data&#x27;}&#xA;      }&#xA;      &#xA;      formData.append("file",files[0])&#xA;      Axios.post(&#x27;http://localhost:5000/api/video/uploadFiles&#x27;,formData,config)&#xA;      .then(response=>{&#xA;        console.log(response);&#xA;     if(response.data.success){&#xA;       console.log(&#x27;FILEPATH==>&#x27;&#x2B;response.data.filePath);&#xA;       console.log(&#x27;filename==>&#x27;&#x2B;response.data.fileName);&#xA;      let variable={&#xA;        filePath:response.data.filePath,&#xA;        fileName:response.data.fileName&#xA;      }&#xA;      setFilePath(response.data.filePath);&#xA;      Axios.post(&#x27;http://localhost:5000/api/video/thumbnail&#x27;,variable)&#xA;      .then(response=>{&#xA;        if(response.data.success){&#xA;          setDuration(response.data.fileDuration)&#xA;          setThumbnail(response.data.thumbsFilePath)&#xA;        }else{&#xA;          alert("failed to make thumbnails");&#xA;        }&#xA;      })&#xA;     }&#xA;      }).catch(err=>{&#xA;        console.log(&#x27;error&#x27;&#x2B;err);&#xA;      })&#xA;  }&#xA;  &#xA;    return (&#xA;      &lt;>&#xA;        <form>&#xA;        <dropzone>&#xA;  {({getRootProps, getInputProps}) => (&#xA;    <section>&#xA;      <div classname="dropzone__container">&#xA;        <input />&#xA;        <p>Drag &#x27;n&#x27; drop some files here, or click to select files</p>&#xA;      </div>&#xA;    </section>&#xA;  )}&#xA;</dropzone>&#xA; &#xA;    {Thumbnail !== "" &amp;&amp;&#xA;     <div>&#xA;       <img src="http://stackoverflow.com/feeds/tag/{`http:/localhost:5000/server/${Thumbnail}`}" alt="haha" style='max-width: 300px; max-height: 300px' />&#xA;     </div>&#xA;    }&#xA;&#xA;{data: {…}, status: 200, statusText: "OK", headers: {…}, config: {…},&#xA0;…}config: {url: "http://localhost:5000/api/video/uploadFiles", method: "post", data: FormData, headers: {…}, transformRequest: Array(1),&#xA0;…}data: {success: true, fileName: "SampleVideo_1280x720_1mb.mp4", filePath: "uploads\SampleVideo_1280x720_1mb.mp4"}headers: {content-length: "109", content-type: "application/json; charset=utf-8"}request: XMLHttpRequest&#xA0;{readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, onreadystatechange: ƒ,&#xA0;…}status: 200statusText: "OK"__proto__: Object&#xA;UploadVideo.js:51 FILEPATH==>uploads\SampleVideo_1280x720_1mb.mp4&#xA;UploadVideo.js:52 filename==>SampleVideo_1280x720_1mb.mp4&#xA;thumbnail-SampleVideo_1280x720_1mb_1.png:1 GET http://localhost:5000/server/uploads/thumbnails/thumbnail-SampleVideo_1280x720_1mb_1.png 404 (Not Found)&#xA;but the thumbnail is in that directory..but it says not found.and it shows the "alt"(haha) in browser.`enter code here`&#xA;(C:\Users\chidori\Desktop\project\server\uploads\thumbnails\thumbnail-SampleVideo_1280x720_1mb_1.png).&#xA;</form>

    &#xA;

    sorry for messy presentation..

    &#xA;

  • Ffmpeg - Incorrect codec parameters

    29 avril 2015, par DevPM

    I always got the following error, when trying to connect ffmpeg with ffserver :

    But let’s start with the theory :
    I want to Broadcast a stream, which is already existing in the internet (to able to do some analytic stuff on the stream).
    So my idea is as follows :
    i have one ubuntu-server (currently ubuntu-desktop version 12.x on a virtual machine, i will change it to a real server later...).
    and i want to run on the server :
    - ffmpeg, which should record the live-stream (and saves it locally)
    - ffserver, for broadcasting the same live-stream, using the rtp protocoll (because of the timestamp-header in the protocoll).
    so if i understoot the documentation correctly, this is my idea :
    - start ffserver from linux-terminal
    (ffserver -f ~/Desktop/ffserver.conf)
    - start ffmpeg and connect to the feed of ffserver
    (ffmpeg -re -i "http://InternetStreamer.sdp/playlist.m3u8" -vcodec libx264 -s 320x240 -pix_fmt yuv420p -vb 200000 -minrate 200000 -maxrate 200000 -bufsize 2000000 -acodec libmp3lame -ab 128k -ar 44100 -f rtp -an http://localhost:8090/feed1.ffm)
    (I am getting the Stream from the URL "http://InternetStreamer.sdp/playlist.m3u8" and want sent it to ffserver(also i want to save it locally for backup later...))

    now when i start ffmpeg i get the following error :
    Could not write header for output file #0 (incorrect codec parameters ?)

    Last thing to say is that is very important to broadcast the stream with RTP-Protocoll. (Best case would be directly from ffmpeg, because then the RTP-headers are as set as early as possible)

    my server.conf looks like follows :

    Port 8090
    BindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 1000
    CustomLog -
    NoDaemon
    <feed>
    #file ffmpeg http://localhost:8090/feed1.ffm
    #Format rtp
    #File /tmp/feed1.ffm
    #FileMaxSize 200K
    File /tmp/cam1.ffm
    ACL allow 127.0.0.1
    #VideoFrameRate  25
    </feed>
    <stream>
    Feed feed1.ffm
    Format rtp
    #VideoFrameRate  25
    #Hier: alle parameter von ffmpeg angeben!
    #-re -i "http://apasfiisl.apa.at/ipad/orf2_q4a/orf.sdp/playlist.m3u8"
    #-vcodec libx264
    #-s 320x240
    #-pix_fmt yuv420p
    #-vb 200000
    #-minrate 200000
    #-maxrate 200000
    #-bufsize 2000000
    #-acodec libmp3lame
    #-ab 128k
    #-ar 44100
    #AudioBitRate 32
    #AudioChannels 1
    #AudioSampleRate 44100
    #VideoBitRate 64
    #VideoBufferSize 40
    VideoFrameRate 3
    #VideoSize 160x128
    #VideoGopSize 12
    </stream>

    ##################################################################
    # Special streams
    # Server status
    <stream>
    Format status

    # Only allow local people to get the status
    ACL allow localhost
    ACL allow 192.168.0.0 192.168.255.255

    #FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
    </stream>

    # Redirect index.html to the appropriate sites
    <redirect>
    URL http://www.ffmpeg.org/
    </redirect>

    ####################################################################
    This is the full console output from ffmpeg :
    ####################################################################

    The ffmpeg program is only provided for script compatibility and will be removed
    in a future release. It has been deprecated in the Libav project to allow for
    incompatible command line syntax improvements in its replacement called avconv
    (see Changelog for details). Please use avconv instead.
    [applehttp @ 0x91fa240] max_analyze_duration reached
    [applehttp @ 0x91fa240] Estimating duration from bitrate, this may be inaccurate

    Seems stream 1 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 25.00 (25/1)
    Input #0, applehttp, from 'http://InternetStreamer.sdp/playlist.m3u8':
     Duration: N/A, start: 61442.038956, bitrate: N/A
       Stream #0.0: Data: [21][0][0][0] / 0x0015
       Metadata:
         variant_bitrate : 831114
       Stream #0.1: Video: h264 (Main), yuvj420p, 640x360 [PAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 180k tbc
       Metadata:
         variant_bitrate : 831114
       Stream #0.2: Audio: aac, 44100 Hz, stereo, s16
       Metadata:
         variant_bitrate : 831114
    [buffer @ 0x9215720] w:640 h:360 pixfmt:yuvj420p
    [scale @ 0x9434300] w:640 h:360 fmt:yuvj420p -> w:320 h:240 fmt:yuv420p flags:0x4
    [libx264 @ 0x923a560] using SAR=4/3
    [libx264 @ 0x923a560] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
    [libx264 @ 0x923a560] profile Main, level 1.3
    Output #0, rtp, to 'http://localhost:8090/feed1.ffm':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Video: libx264, yuv420p, 320x240 [PAR 4:3 DAR 16:9], q=-1--1, 200 kb/s, 90k tbn, 25 tbc
       Metadata:
         variant_bitrate : 831114
    Stream mapping:
     Stream #0.1 -> #0.0
    Could not write header for output file #0 (incorrect codec parameters ?)

    Kind Regards
    DevPM

  • French CNIL recommends Piwik : the only analytics tool that does not require Cookie Consent

    29 octobre 2014, par Matthieu Aubry — Press Releases

    There has been recent and important changes in France regarding data privacy and the use of cookies. This blog post will introduce you to these changes and explain how you make your website compliant.

    Cookie Consent in the data freedom law

    Since the adoption of the EU Directive 2009/136/EC “Telecom Package”, Internet users must be informed and provide their prior consent to the storage of cookies on their computer. The use of cookies for advertising, analytics and social share buttons require the user’s consent :

    It is necessary to inform users of the presence, purpose and duration of the cookies placed in their browsers, and the means at their disposal to oppose it.

    What is a cookie ?

    Cookies are tracers placed on Internet users’ hard drives by the web hosts of the visited website. They allow the website to identify a single user across multiple visits with a unique identifier. Cookies may be used for various purposes : building up a shopping cart, storing a website’s language settings, or targeting advertising by monitoring the user’s web-browsing.

    Which cookies are exempt from the Cookie Consent rule ?

    France has exempted certain cookies from the cookie consent rule : for those cookies that are strictly necessary to offer the service sought after by the user you do not need to ask consent to user. Examples of such cookies are :

    • the shopping cart cookie,
    • authentication cookies,
    • short lived session cookies,
    • load balancer cookies,
    • certain first party analytics (such as Piwik cookies),
    • persistent cookies for interface personalisation.

    Asking users for consent for Analytics (tracking) Cookies

    For all cookies that are not exempted from the Cookie Consent then you will need to :

    • obtain consent from web users before placing or reading cookies and similar technologies,
    • clearly inform web users of the different purposes for which the cookies and similar technologies will be used,
    • propose a real choice to web users between accepting or refusing cookies and similar technologies.

    You don’t need Cookie Consent with Piwik

    The excellent news is that there is a way to bypass the Cookie Consent banner on your website :

    If you are using another analytics solution other than Piwik then you will need to ask users for consent. If you do not want to ask for consent then download and install Piwik or signup to Piwik Cloud to get started.

    If you are already using Piwik you need to do two simple things : (1) anonymise visitor IP addresses (at least two bytes) and (2) include the opt-out iframe solution in your website (learn more).

    Note that these recommendations currently only apply in France, but because the law is European we can expect similar findings in other European countries.

    CNIL recommends Piwik

    We are proud that the CNIL has identified Piwik as the only tool that respects all privacy requirements set by the European Telecom law.

    About the CNIL

    The CNIL is an independent administrative body that operates in accordance with the French data protection legislation. The CNIL has been entrusted with the general duty to inform people of the rights that the data protection legislation allows them.

    The role and responsabilities of the CNIL are :

    • to protect citizens and their data
    • to regulate and control processing of personal data
    • to inspect the security of data processing systems and applications, and impose penalties

    Piwik and Privacy

    At Piwik we love Privacy – our open analytics platform comes with built-in Privacy.

    Future of Privacy at Piwik

    Piwik is already the leader when it comes to respecting user privacy but we plan to continue improving privacy within the open analytics platform. For more information and specific ideas see Privacy enhancing issues in our issue tracker.

    References

    Learn more in these articles in French [fr] or English :

    Contact

    To learn more about Piwik, please visit piwik.org,

    Get in touch with the Piwik team : Contact information,

    For professional support contact Piwik PRO.