Recherche avancée

Médias (0)

Mot : - Tags -/médias

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

Autres articles (85)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • À propos des documents

    21 juin 2013, par

    Que faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
    Document bloqué en file d’attente ?
    Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (6431)

  • AttributeError : 'FilterableStream' object has no attribute 'input' - ffmpeg-python

    26 septembre 2024, par Karolek

    I am a fresh programmer and I am learning the Python language.
I have been trying to design a graphical application (using tkinter and ffmpeg-python libraries) that converts an image file along with audio into a video of audio length displaying the image. Unfortunately whenever I try run program I keep encountering errors

    


    At first it was due to installing the ffmpeg library in pip package manager instead of ffmpeg-python. I uninstalled the previous one, installing the correct one making sure no other package causes problems. Using a short script like this, the library functioned smoothly :

    


    '''
The Error causing Statement
import ffmpeg 
(
    ffmpeg.input("something.mp3")
    .output("output.wav")
    .run()
)
'''
# When I tried to use the ffmpeg library in a graphics program within a function, unfortunately I was not able to get it to work

import tkinter as tk
from tkinter import filedialog
from tkinter import ttk

def select_image():
    file_path = filedialog.askopenfilename(title="Select a file", filetypes=[("image files","*.jpg;*.png;*.gif;*.jfif;")])
    print("Selected file:", file_path)

def select_audio():
    file_path = filedialog.askopenfilename(title="Select a file", filetypes=[("audio files","*.mp3;*.wav;*.ogg;*.flac;*.m4a;*.acc;")])
    print("Selected file:", file_path)

def create_video(image_file, audio_file, output_format):
    import ffmpeg
    (
        ffmpeg.input(image_file, loop=1)
        .input(audio_file)
        .output("output" + output_format)
        .run()
    )   

def choose_directory():
    directory_path = filedialog.askdirectory(title="Select directory")
    print("Selected directory:", directory_path)


root = tk.Tk()

root.title("Audio To Video Converter")
root.geometry("500x700")

title = tk.Label(root, text="Audio To Video Converter", font=('Arial', 28))
title.pack(padx=20, pady=20)

selectImage_button = tk.Button(root, text="Select image", command=select_image, height=3, width=50)
selectImage_button.pack(pady=10, padx=20)
selectAudio_button = tk.Button(root, text="Select audio", command=select_audio, height=3, width=50)
selectAudio_button.pack(pady=10, padx=20)

label1 = tk.Label(root, text="Output video format", font=('Arial', 16))
label1.pack(padx=20, pady=10)

outputFormat = ttk.Combobox(root, width=55)
outputFormat['values'] = ('.avi', '.mkv', '.mp4', '.webm')
outputFormat['state'] = 'readonly'
outputFormat.pack(pady=5, padx=20)

label2 = tk.Label(root, text="Output directory", font=('Arial', 16))
label2.pack(padx=20, pady=10)

outputDirectory_button = tk.Button(root, text="Select directory", command=choose_directory, height=3, width=50)
outputDirectory_button.pack(pady=5, padx=60)


convert_button = tk.Button(root, text="Convert", height=3, width=50, command=create_video(selectImage_button, selectAudio_button, outputFormat['values'] ))

root.mainloop()


    


    This is the only thing the console displayed after attempting to run

    


    Traceback (most recent call last):&#xA;  File "c:\Users\Admin\Documents\konwerter\konwerter.py", line 56, in <module>&#xA;    convert_button = tk.Button(root, text="Convert", height=3, width=50, command=create_video(selectImage_button, selectAudio_button, outputFormat[&#x27;values&#x27;] ))&#xA;                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "c:\Users\Admin\Documents\konwerter\konwerter.py", line 17, in create_video&#xA;    .input(audio_file)&#xA;     ^^^^^&#xA;AttributeError: &#x27;FilterableStream&#x27; object has no attribute &#x27;input&#x27;&#xA;</module>

    &#xA;

    I did some research and did not find any information about this error except that it may be due to installing the wrong libraries. This is my list of installed libraries in pip package manager :

    &#xA;

    colored           2.2.4 customtkinter     5.2.2 darkdetect        0.8.0 ffmpeg-python     0.2.0 future            1.0.0 Gooey             1.0.8.1 packaging         24.1 pillow            10.4.0 pip               24.2 psutil            6.0.0 pyee              12.0.0 pygtrie           2.5.0 six               1.16.0 tkinterdnd2       0.4.2 typing_extensions 4.12.2 wxPython          4.2.2&#xA;

    &#xA;

    Perhaps the solution to the problem is simple, but I am new and don't understand many things. I will be very grateful for your answer !

    &#xA;

  • How to analyse 404 pages

    1er juillet 2019, par Matomo Core Team — Development, Plugins

    How to analyse “not found” pages (404) in digital analytics

    Have you ever sent out a newsletter and one link wasn’t active yet ? Would you like to know how many users get affected when this happens ? Would you like to know if your visitors are encountering 404 pages ? 

    In this article we’re describing an easy way to analyse “not found” pages on your website with Matomo to increase your visitors’ user experience, user acquisition, and SEO (search engine optimization).

    How to know the number of 404s on my website ?

    There are different ways to get this information. Depending on how your website is built, you may or may not collect this data.

    The easiest way to answer this question is to fire a 404 page on your website, you do this by accessing a wrong url :

    how to analyse 404 pages

    As you can see here, in our case, the page title starts with “Page non trouvée” which stands for “Page not found” when translated in English (as the website we are considering here is in French) :

    404 page analysis

    In this example 19 page views have been fired and it generated a bounce rate of 67%. As a result ⅔ of the visits ended here.

    In some cases, the information related to a “not found” page can be found either within the title or within the URL, as some websites redirect you to a specific web page when a page can’t be found.

    If you can’t identify “not found” pages via a page title or a page URL, we strongly advise you to use this specific tracking code method on your 404 page : “How to track error pages in Matomo ?”

    You can easily set it with Matomo Tag Manager with a custom HTML tag :

    Analysing 404 pages

    where the trigger is the following :

    how to analyse 404 page

    You will however, have to define this trigger as an exclusion for all the other tags which may conflict with it (here below is the new trigger defined for the generic Matomo tags we are inserting on all pages) :

    404 page how to analyse

    Once this specific tracking is set, you will be able to track the source of the 404 and will gather all the “not found” pages in a specific group within your Page Title report :

    404 url

    Here, for example, you can identify that the homepage of this website had a link pointing to a 404, in our case it was https://www.webassoc.org/pro-du-web.

    Note that this is just one technique. You could also create a custom dimension report and decide to send the 404 there also.

    How to get notified when a 404 page is visited ?

    Trust us, you’re not going to check everyday whether a 404 page has been visited. In order to avoid checking it manually, you can define custom alerts.

    There are three possible scenarios when “not found” pages can be fired :

    • internal 404 : one link within your website is pointing to a wrong url on the same website.
    • external 404 : someone from an external website made a link to yours and the link is not correct.
    • direct access 404 : someone access directly to a not found page on your website.

    You can define all those three within Matomo, but in your case, you will only have to focus on the first two only. In fact, you can’t really fix the third scenario. That’s the reason why we’re not focusing on it. It would result in irrelevant alerts.

    Custom alert for internal 404

    An internal 404 is defined from a 404 where the source is an internal web page. As a result, it will look like the following in your report :

    In this example, we’re using this specific custom implementation, the title of the page will contain “From = https://www.webassoc.org/”. So set our custom alert accordingly :

    Help for 404 pages

    Now every time a 404 page will be fired from an internal page, you’ll be notified by email.

    Note that you can also decide to not receive any email and track the evolution of alerts with the History of triggered alerts feature.

    Custom alert for external 404

    External 404 is almost the same setup. The only thing you need to keep in mind is that we want to exclude the 404 where the source is not indicated. As a result, your configuration will look like the following :

    how to analyse 404 page

    Here your regular expression pattern is the following one :

    404/URL = .*From = (?!https://www.webassoc.org)[^\s]+

    as you’ll want to have any referrer coming from a website which is not Matomo and not a direct 404.

     

    You can now be notified every time that a 404 is fired from any link.

    Note that this configuration may slightly differ from website to website. So always double check your tracking code and the way the values are sent to your reports. Also try to trigger those alerts first before validating them.

    How to follow the evolution of your 404 over time ?

    It may be interesting to know how good or how bad you are performing in terms of 404.

    In order to check this information, you can click on the evolution icon near the 404 title :

    404 page help

    But you may be interested in accessing this information more regularly without having to create this report each time.

    So, one way to analyse the evolution of your 404 is to create a segment such as :

    and to click after that on evolution icon :

    analyse 404

    As you can see below the number of “not found” pages is quite low in general, but we can also notice that a period received an increase in terms of 404 not found pages on May 27. It may be interesting to investigate it :

    404 analysis

    You can start from the overview of referrers :

    404 page help

    As you can notice here the main source of 404 is coming from direct entries which is the most difficult channel to analyse as we don’t really know where the visitors are coming from.

    How to perform your analysis even faster ?

    As you can see analysing reports in Matomo in order to detect 404 pages is a time-consuming activity. In order to make it faster, you can already create a report about it within the Email reports feature with the following settings :

    • Segment : 404
    • Email schedule : never.
    • Visits summary and Page titles as selected report.

    You will then end up with a saved report listing all the URLs concerned :

    404 url help

    You can also have a look at the “Custom reports” premium feature.

    It will provide you with more flexibility. You will then be able to focus on the most important thing : the cause of 404.

    Good luck and happy analytics !

  • FFMPEG with dashjs

    14 avril 2017, par Dániel Kis

    I am going to create a live video & audio stream with ffmeg with libvpx-vp9 codec, and I want to view it from html5 browser with dashjs. But when the dashjs opens the video it seatches for chunks than not yet exits.

    Here is how I create the stream :

    VP9_LIVE_PARAMS="-speed 6 -tile-columns 4 -frame-parallel 1 -threads 8 -static-thresh 0 -max-intra-rate 300 -deadline realtime -lag-in-frames 0 -error-resilient 1"
    TARGET_PATH="/var/www/html/live/stream"

    ffmpeg \
     -thread_queue_size 8192 \
     -f v4l2 -input_format mjpeg -r 30 -s 640x360 -i /dev/video0 \
     -thread_queue_size 16384 \
     -f alsa -ar 44100 -ac 2 -i hw:1,0 \
     -map 0:0 \
     -pix_fmt yuv422p \
     -c:v libvpx-vp9 \
       -s 640x360 -keyint_min 60 -g 60 ${VP9_LIVE_PARAMS} \
       -b:v 300k \
     -f webm_chunk \
       -header "${TARGET_PATH}/glass_360.hdr" \
       -chunk_start_index 1 \
     "${TARGET_PATH}/glass_360_%d.chk" \
     -map 1:0 \
     -c:a libvorbis \
       -b:a 64k -ar 44100 \
     -f webm_chunk \
       -audio_chunk_duration 2000 \
       -header "${TARGET_PATH}/glass_171.hdr" \
       -chunk_start_index 1 \
     "${TARGET_PATH}/glass_171_%d.chk" \

    some seconds later I call the ffmpeg again to create manifest file :

    ffmpeg \
     -analyzeduration 1000\
     -f webm_dash_manifest -live 1 \
     -i "${TARGET_PATH}/glass_360.hdr" \
     -f webm_dash_manifest -live 1 \
     -i "${TARGET_PATH}/glass_171.hdr" \
     -c copy \
     -map 0 -map 1 \
     -f webm_dash_manifest -live 1 \
       -adaptation_sets "id=0,streams=0 id=1,streams=1" \
       -chunk_start_index 1 \
       -chunk_duration_ms 2000 \
       -time_shift_buffer_depth 7200 \
       -minimum_update_period 7200 \
     "${TARGET_PATH}/glass_live_manifest.mpd"

    My server’s clock is synced to "http://time.akamai.com/?iso"

    HTML5 player :


       
       
       
       
       
       <code class="echappe-js">&lt;script src=&quot;https://cdn.dashjs.org/latest/dash.all.min.js&quot;&gt;&lt;/script&gt;
    Live broadcast
    &lt;script&gt;<br />
                   var url = &quot;glass_live_manifest.mpd&quot;;<br />
                   var player = dashjs.MediaPlayer().create();<br />
                   player.initialize(document.querySelector(&quot;#videoPlayer&quot;), url, true);<br />
    <br />
      &lt;/script&gt;