Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (102)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    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 (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (11155)

  • Can't view and record graph at the same time using FFMpegWriter [closed]

    7 juillet 2024, par Barkın Özer

    So this code is used for graphing and logging sensor data coming from bluetooth ports. I wanted to add an function that will record the graph in mp4 format. In order to achieve this I used ffmpegWriter. The issue is while this code records the graph I can't view the graph at the same time.

    


    import serial
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation, FFMpegWriter
import openpyxl
from datetime import datetime

# Constants
GRAVITY = 9.81  # Standard gravity in m/s²

# Initialize serial connections to HC-06 devices
ser_x_accel = serial.Serial('COM4', 9600, timeout=1)  # X-axis acceleration data
ser_y_angle = serial.Serial('COM11', 9600, timeout=1)  # Y-axis angle data

# Initialize empty lists to store data
x_accel_data = []
y_angle_data = []
timestamps = []

# Initialize Excel workbook
wb = openpyxl.Workbook()
ws = wb.active
ws.title = "Sensor Data"
ws.append(["Timestamp", "X Acceleration (m/s²)", "Y Angle (degrees)"])

# Function to update the plot and log data
def update(frame):
    # Read data from serial connections
    line_x_accel = ser_x_accel.readline().decode('utf-8').strip()
    line_y_angle = ser_y_angle.readline().decode('utf-8').strip()
    
    try:
        # Parse and process X-axis acceleration data
        x_accel_g = float(line_x_accel)  # Acceleration in g read from serial
        x_accel_ms2 = x_accel_g * GRAVITY  # Convert from g to m/s²
        x_accel_data.append(x_accel_ms2)
        
        # Parse and process Y-axis angle data
        y_angle = float(line_y_angle)
        y_angle_data.append(y_angle)
        
        # Append timestamp
        timestamps.append(datetime.now())

        # Limit data points to show only the latest 100
        if len(x_accel_data) > 100:
            x_accel_data.pop(0)
            y_angle_data.pop(0)
            timestamps.pop(0)

        # Log data to Excel with timestamp
        timestamp_str = timestamps[-1].strftime("%H:%M:%S")
        ws.append([timestamp_str, x_accel_data[-1], y_angle_data[-1]])

        # Clear and update plots
        ax1.clear()
        ax1.plot(timestamps, x_accel_data, label='X Acceleration', color='b')
        ax1.legend(loc='upper left')
        ax1.set_ylim([-20, 20])  # Adjust based on expected acceleration range in m/s²
        ax1.set_title('Real-time X Acceleration Data')
        ax1.set_xlabel('Time')
        ax1.set_ylabel('Acceleration (m/s²)')
        ax1.grid(True)

        ax2.clear()
        ax2.plot(timestamps, y_angle_data, label='Y Angle', color='g')
        ax2.legend(loc='upper left')
        ax2.set_ylim([-180, 180])
        ax2.set_title('Real-time Y Angle Data')
        ax2.set_xlabel('Time')
        ax2.set_ylabel('Angle (degrees)')
        ax2.grid(True)

        # Update text boxes with latest values
        text_box.set_text(f'X Acceleration: {x_accel_data[-1]:.2f} m/s²')
        text_box2.set_text(f'Y Angle: {y_angle_data[-1]:.2f}°')
        
        # Save the workbook periodically (every 100 updates)
        if frame % 100 == 0:
            wb.save("sensor_data.xlsx")
        
    except ValueError:
        pass  # Ignore lines that are not properly formatted

# Setup the plots
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(10, 8))
text_box = ax1.text(0.05, 0.95, '', transform=ax1.transAxes, fontsize=12, verticalalignment='top', bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.5))
text_box2 = ax2.text(0.05, 0.95, '', transform=ax2.transAxes, fontsize=12, verticalalignment='top', bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.5))

# Animate the plots
ani = FuncAnimation(fig, update, interval=100)  # Update interval of 100ms

# Save the animation as a video file
writer = FFMpegWriter(fps=10, metadata=dict(artist='Me'), bitrate=1800)
ani.save("sensor_data.mp4", writer=writer)

plt.tight_layout()
plt.show()

# Save the workbook at the end of the session
wb.save("sensor_data.xlsx")



    


    I tried using OpenCV to record the graph but then I didn't even got any recording. I think solving this issue with my original code would be a better approach.

    


  • How (and Why) to Run a Web Accessibility Audit in 2024

    7 mai 2024, par Erin

    When most businesses design their websites, they primarily think about aesthetics, not accessibility. However, not everyone who visits your website has the same abilities or access needs. Eight percent of the US population has visual impairments.

    The last thing you want is to alienate website visitors with a bad experience because your site isn’t up to accessibility standards. (And with growing international regulation, risk fines or lawsuits as a result.)

    A web accessibility audit can help you identify and fix any issues for users with impaired vision, hearing or other physical disabilities. In this article, we’ll cover how to conduct such an audit efficiently for your website in 2024.

    What is a web accessibility audit ?

    A web accessibility audit is a way to evaluate the usability of your website for users with visual, auditory or physical impairments, as well as cognitive disabilities or neurological issues. The goal is to figure out how accessible your website is to each of these affected groups and solve any issues that come up.

    To complete an audit, you use digital tools and various manual accessibility testing processes to ensure your site meets modern web accessibility standards.

    Why is a web accessibility audit a must in 2024 ?

    For far too long, many businesses have not considered the experiences of those with disabilities. The growing frustrations of affected internet users have led to a new focus on web accessibility laws and enforcement.

    Lawsuits related to the ADA (Americans with Disabilities Act) reached all-time highs in 2023 — over 4,500 digital-related lawsuits were filed. The EU has also drawn up the European Accessibility Act (EAC), which goes into effect in June 2025.

    But at the end of the day, it’s not about accessibility legislation. It’s about doing right by people.

    Illustration of a sight-impaired person using text-to-speech to browse a website on a smartphone

    This video by voice actor, YouTuber, and surfer Pete Gustin demonstrates why accessibility measures are so important. If buttons, navigation and content sections aren’t properly labelled, sight-impaired people who rely on speech-to-text to browse the web can’t comfortably interact with your site.

    And you’re worse off for it. You can lose some of your best customers and advocates this way. 

    With stronger enforcement of accessibility regulations in the US and new regulations coming into effect in the EU in 2025, the time to act is now. It’s not enough to “keep accessibility in mind” — you must take concrete steps to improve it.

    Who should lead a web accessibility audit ?

    Ideally, you want to hire a third-party web accessibility expert to lead the audit. They can guide you through multiple stages of manual accessibility testing to ensure your site meets regulations and user needs. 

    Experienced accessibility auditors are familiar with common pitfalls and can help you avoid them. They ensure you meet the legal requirements with proper solutions, not quick fixes.

    If this isn’t an option, find someone with relevant experience within your company. And involve someone with “skin in the game” in the process. Hire someone with visual impairments to usability test your site. Don’t just do automated tests or “put yourself in their shoes.” Make sure the affected users can use your site without issues.

    Automated vs. manual audits and the danger of shortcuts

    While there are automated audits, they only check for the bare minimum :

    • Do your images have alt tags ? (They don’t check if the alt tag is descriptive or just SEO junk text.)
    • Are clickable buttons identified with text for visually impaired users ?
    • Is your text size adjustable ?
    • Are your background and foreground colours accessible for colour-blind users ? Is there a sufficient contrast ratio ?
    Illustration of the results of an automated accessibility test

    They don’t dive into the user journey (and typically can’t access login-locked parts of your site). They can be a good starting point, but it’s a bad idea to rely completely on automated audits.

    They’ll miss more complex issues like :

    • Dynamic content and animated elements or videos that could put people with epilepsy at risk of seizures
    • A navigational flow that is unnecessarily challenging for users with impairments
    • Video elements without proper captions

    So, don’t rely too much on automated tests and audits. Many lawsuits for ADA infractions are against companies that think they’ve already solved the problem. For example, 30% of 2023 lawsuits were against sites that used accessibility overlays.

    Key elements of the Web Content Accessibility Guidelines (WCAG)

    The international standard for web accessibility is the Web Content Accessibility Guidelines (WCAG). In the most recent version, WCAG 2.2, there are new requirements for visual elements and focus and other updates.

    Here’s a quick overview of the key priorities of WCAG :

    Diagram of core WCAG considerations like text scalability, colour choices, accessible navigation, and more

    Perceivable : Any user can read or listen to your site’s content

    The first priority is for any user to be able to perceive the actual content on your site. To be compliant, you need to make these adjustments and more :

    • Use text that scales with browser settings.
    • Avoid relying on colour contrasts to communicate something.
    • Ensure visual elements are explained in text.
    • Offer audio alternatives for things like CAPTCHA.
    • Form fields and interactive elements are properly named.

    Operable : Any user can navigate the site and complete tasks without issue

    The second priority is for users to navigate your website and complete tasks. Here are some of the main considerations for this section :

    • Navigation is possible through keyboard and text-to-speech interfaces.
    • You offer navigation tools to bypass repeated blocks of content.
    • Buttons are properly titled and named.
    • You give impaired users enough time to finish processes without timing out.
    • You allow users to turn off unnecessary animations (and ensure none include three flashes or more within one second).
    • Links have a clear purpose from their alt text (and context).

    Understandable : Any user can read and understand the content

    The third priority is making the content understandable. You need to communicate as simply and as clearly as possible. Here are a few key points :

    • Software can determine the default language of each page.
    • You use a consistent method to explain jargon or difficult terms.
    • You introduce the meaning of unfamiliar abbreviations and acronyms.
    • You offer tools to help users double-check and correct input.
    • The reading grade is not higher than grade 9. If it is, you must offer an alternative text with a lower grade.
    • Use consistent and predictable formatting and navigation.

    This intro to accessibility guidelines should help you see the wide range of potential accessibility issues. Accessibility is not just about screen readers — it’s about ensuring a good user experience for users with a wide range of disabilities.

    Note : If you’re not hiring a third-party expert for the manual accessibility audit, this introduction isn’t enough. You need to familiarise yourself with all 50 success criteria in WCAG 2.2.

    How to do your first web accessibility audit

    Ready to find and fix the accessibility issues across your website ? Follow the steps outlined below to do a successful accessibility audit.

    Start with an automated accessibility test

    To point you in the right direction, start with a digital accessibility checker. There are many free alternatives, including :

    • Accessibility Checker
    • Silktide accessibility checker
    • AAArdvark

    When choosing a tool, check it’s up-to-date with the newest accessibility guidelines. Many accessibility evaluation tools are still based on the WCAG 2.1 version rather than WCAG 2.2.

    The tool will give you a basic evaluation of the accessibility level of your site. A free report can quickly identify common issues with navigation, labelling, colour choices and more. 

    But this is only good as a starting point. Remember that even paid versions of these testing tools are limited and cannot replace a manual audit.

    Look for common issues

    The next step is to manually look for common issues that impact your site’s level of accessibility :

    • Undescriptive alt text
    • Colour combinations (and lack of ability to change background and foreground colours)
    • Unscalable text
    • Different site content sections that are not properly labelled

    The software you use to create your site can lead to many of these issues. Is your content management system (CMS) compliant with ADA or WCAG ? If not, you may want to move to a CMS before continuing the audit.

    Pinpoint customer journeys and test them for accessibility 

    After you’ve fixed common issues, it’s essential to put the actual customer journey to the test. Explore your most important journeys with behavioural analytics tools like session recordings and funnel analysis.

    Analysing funnel reports lets you quickly identify each page that usually contributes to a sale. You will also have an overview of the most popular funnels to evaluate for accessibility.

    If your current web analytics platform doesn’t offer behavioural reports like these, Matomo can help. Our privacy-friendly web analytics solution includes funnel reports, session recordings, A/B testing, form analytics, heatmaps and more.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    If you don’t have the budget to test every page individually, this is the perfect place to start. You want to ensure that users with disabilities have no issues completing the main tasks on your site. 

    Don’t focus solely on your web pages 

    Accessibility barriers can also exist outside of your standard web pages. So ensure that other file formats like PDFs and videos are also accessible. 

    Remember that downloadable materials are also part of your digital experience. Always consider the needs of individuals with disabilities when accessing things like case studies or video tutorials. 

    Highlight high-priority issues in a detailed report

    To complete the audit, you need to summarise and highlight high-priority issues. In a larger company, this will be in the form of a report. W3’s Web Accessibility Initiative offers a free accessibility report template and an online tool to generate a report.

    For smaller teams, it may make sense to input issues directly into the product backlog or a task list. Then, you can tackle the issues, starting with high-priority pages identified earlier in this process.

    Avoid quick fixes and focus on sustainable improvement

    As mentioned, AI-powered overlay solutions aren’t compliant and put you at risk for lawsuits. It’s not enough to install a quick accessibility tool and pat yourself on the back.

    And it’s not just about accessibility compliance. These solutions provide a disjointed experience that alienates potential users. 

    The point of a digital accessibility audit is to identify issues and provide a better experience to all your users. So don’t try to cut corners. Do the work required to implement solutions that work seamlessly for everyone. Invest in a long-term accessibility remediation process.

    Deliver a frictionless experience while gaining insight into your users

    An accessibility audit is crucial to ensure an inclusive experience — that a wide variety of users can read and interact with your site.

    But what about the basic usability of your website ? Are you sure the experience is without friction ? Matomo’s behavioural analytics tools can show how users interact with your website.

    For example, heatmaps can show you where users are clicking — which can help you identify a pattern, like many users mistaking a visual element for a button.

    Plus, our privacy-friendly web analytics are compliant with GDPR, CCPA and other data privacy regulations. That helps protect you against privacy-related lawsuits, just as an accessibility audit protects you against ADA lawsuits.

    And it never hurts that your users know you respect their privacy. Try Matomo free for 21-days. No credit card required.

  • how to remove duplicated frame from 00:00:00,00 to 00:00:00,25 section not overall with mpdecimate filter ?

    19 octobre 2018, par cool jobs

    how to remove duplicated frame from 00:00:00,00 to 00:00:00,25 (00frame 25frames)section not overall with mpdecimate filter ??
    normally H264 video have some duplicated frames on video start section ..

       i have tried like this ,

    1)  ./ffmpeg -i cated_2-3.UMMJI.MTS -map 0:0 -c:v prores_ks -profile:v 1 -qscale:v 8  -s 1920x1080  -r 29.97  -top 1  -c:a pcm_s16le    -map 0:1 -filter:a:0 "pan=mono|c0=c0" -map 0:1 -filter:a:1 "pan=mono|c0=c1"   -metadata:s encoder="Apple ProRes 422 LT"  -filter_complex "[0]split=2[a][b];[a]trim=end_frame=26,mpdecimate[a];[b]trim=start_frame=25,setpts=PTS-STARTPTS[b];[a][b]concat=n=2:v=1:a=0" -vsync vfr -vf blackdetect=d=0.1:pix_th=.1  cated_2-3.UMMJI_MTS_mpdecimate26_section.mov

    and  tried to check black_frame on out prores mov file
    2)./ffmpeg  -i cated_2-3.UMMJI_MTS_mpdecimate26_section.mov  -vf blackdetect=d=0.1:pix_th=.1  test.mov

    then , will be shown like below

    macmini-master:1.  two_file_test khan$ ./ffmpeg  -i cated_2-3.UMMJI_MTS_mpdecimate26_section.mov  -vf blackdetect=d=0.1:pix_th=.1  test.mov
    ffmpeg version N-92108-ge08a876e67-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
     built with Apple LLVM version 10.0.0 (clang-1000.11.45.2)
     configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
     libavutil      56. 19.101 / 56. 19.101
     libavcodec     58. 32.100 / 58. 32.100
     libavformat    58. 18.104 / 58. 18.104
     libavdevice    58.  4.105 / 58.  4.105
     libavfilter     7. 33.100 /  7. 33.100
     libswscale      5.  2.100 /  5.  2.100
     libswresample   3.  2.100 /  3.  2.100
     libpostproc    55.  2.100 / 55.  2.100
    Guessed Channel Layout for Input Stream #0.1 : mono
    Guessed Channel Layout for Input Stream #0.2 : mono
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'cated_2-3.UMMJI_MTS_mpdecimate26_section.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 512
       compatible_brands: qt
       encoder         : Lavf58.18.104
     Duration: 00:25:12.58, start: 0.000000, bitrate: 86198 kb/s
       Stream #0:0(eng): Video: prores (apcs / 0x73637061), yuv422p10le(tv, top first), 1920x1080, 84662 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 11988 tbn, 11988 tbc (default)
       Metadata:
         handler_name    : VideoHandler
         encoder         : Apple ProRes 422 LT
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
       Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (prores (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
    Press [q] to stop, [?] for help
    [libx264 @ 0x7f8eb2804200] using SAR=1/1
    [libx264 @ 0x7f8eb2804200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0x7f8eb2804200] profile High 4:2:2, level 4.0, 4:2:2, 8-bit
    [libx264 @ 0x7f8eb2804200] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: 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=6 lookahead_threads=1 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=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, mov, to 'test.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 512
       compatible_brands: qt
       encoder         : Lavf58.18.104
       Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc (default)
       Metadata:
         handler_name    : VideoHandler
         encoder         : Lavc58.32.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
         encoder         : Lavc58.32.100 aac
    frame= 8224 fps= 21 q=29.0 size=   86528kB time=00:04:34.49 bitrate=2582.3kbits/s dup=19 drop=0 speed=0.689x

    as you can see duplicated frame just changed to black frame , not removed
    this MTS file have 19 duplicated frames !
    also i have checked in FCPX and count how many dupicated frame on out prores mov file ...