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 (50)

  • 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 (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (7003)

  • OSError : MoviePy error : the file guitar.mp4 could not be found

    9 septembre 2023, par dunnjm814

    I'm working on a video to audio converter with react and flask/python.
I have received a 500 with this error :

    


    raise IOError(("MoviePy error: the file %s could not be found!\n"
OSError: MoviePy error: the file guitar.mp4 could not be found!
Please check that you entered the correct path.


    


    EDIT : As stated in comments, moviepy VideoFileClip is looking for a path. Per suggestion, I am now attempting to write the incoming video file to a temp directory housed in the backend of the app. The updated stack trace shows the filepath printing, however when presented to VideoFileClip it is still unhappy.

    


    The following snippet is the onSubmit for the video file upload :

    


    const onSubmit = async (e) => {
    e.preventDefault()
    const data = new FormData()
    console.log('hopefully the mp4', videoData)
    data.append('mp3', videoData)
    console.log('hopefully a form object with mp4', data)
    const response = await fetch('/api/convert', {
      method: "POST",
      body: data
    })
    if (response.ok) {
      const converted = await response.json()
      setMp3(converted)
      console.log(mp3)
    } else {
      window.alert("something went wrong :(");
    }
  }


    


    Here is a link to an image depicting the console output of my file upload
from within init.py

    


    app = Flask(__name__)

app.config.from_object(Config)
app.register_blueprint(convert, url_prefix='/api/convert')

CORS(app)



    


    from within converter.py

    


    import os
from flask import Blueprint, jsonify, request
import imageio
from moviepy.editor import *


convert = Blueprint('convert', __name__)

@convert.route('', methods=['POST'])
def convert_mp4():
  if request.files['mp3'].filename:
    os.getcwd()
    filename = request.files['mp3'].filename
    print('hey its a file again', filename)
    safe_filename = secure_filename(filename)
    video_file = os.path.join("/temp/", safe_filename)
    print('hey its the file path', video_file)
    video_clip = VideoFileClip(video_file)
    print('hey its the VideoFileClip', video_clip)
    audio_clip = video_clip.audio
    audio_clip.write_audiofile(os.path.join("/temp/", f"{safe_filename}-converted.mp3"))

    video_clip.close()
    audio_clip.close()

    return jsonify(send_from_directory(os.path.join("/temp/", f"{safe_filename}-converted.mp3")))
  else:
    return {'error': 'something went wrong :('}




    


    In the stack trace below you can see file printing the name of the video, my only other thought on why this may not be working was because it was getting lost in the post request, however the fact it is printing after my if file: check is leaving me pretty confused.

    


    hey its a file again guitar.mp4
hey its the file path /temp/guitar.mp4
127.0.0.1 - - [22/Apr/2021 12:12:15] "POST /api/convert HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/jasondunn/projects/audioconverter/back/api/converter.py", line 20, in convert_mp4
    video_clip = VideoFileClip(video_file)
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__
    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__
    infos = ffmpeg_parse_infos(filename, print_infos, check_duration,
  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 270, in ffmpeg_parse_infos
    raise IOError(("MoviePy error: the file %s could not be found!\n"
OSError: MoviePy error: the file /temp/guitar.mp4 could not be found!
Please check that you entered the correct path.


    


    thanks in advance for taking a look/future advice. First official post on Stack Overflow :)

    


  • Google Analytics Now Illegal in Austria ; Other EU Member States Expected to Follow

    18 janvier 2022, par Erin — Privacy

    Breaking news : The Austrian Data Protection Authority (“Datenschutzbehörde” or “DSB” or “DPA”) has ruled that Austrian website providers using Google Analytics are in violation of the GDPR. 

    This ruling stems from a decision made in 2020 by the Court of Justice of the European Union (CJEU) that stated that cloud services hosted in the US are incapable of complying with the GDPR and EU privacy laws. The decision was made because of the US surveillance laws requiring US providers (like Google or Facebook) to provide personal data to US authorities. 

    The 2020 ruling, known as “Schrems II”, marked the ending of the Privacy Shield, a framework that allowed for EU data to be transferred to US companies that became certified. 

    The tech industry was sent into a frenzy following this decision, but many US and EU companies decided to ignore the case. The choice to ignore is what landed one Austrian business in the DPA’s line of fire, damaging the brand’s reputation and possibly resulting in a hefty fine of up to €20 million or 4% of the organisation’s global turnover. 

    About the Austrian DPA’s Model Case 

    In this specific case, noyb (the European Center for Digital Rights) found that IP addresses (which are classified as personal data by the GDPR) and other identifiers were sent to the US in cookie data as a result of the organisation using Google Analytics. 

    This model case led to the DPA’s decision to rule that Austrian website providers using Google Analytics are in violation of GDPR. It is believed that other EU Member States will soon follow in this decision as well.

    "We expect similar decisions to now drop gradually in most EU member states. We have filed 101 complaints in almost all Member States and the authorities coordinated the response. A similar decision was also issued by the European Data Protection Supervisor last week."

    Max Schrems, honorary chair of noyb.eu

    What does this mean if you are using Google Analytics ?

    If there is one thing to learn from this case, it is that ignoring these court rulings and continuing to use Google Analytics is not a viable option. 

    If you are operating a website in Austria, or your website services Austrian citizens, you should remove Google Analytics from your website immediately. 

    For businesses in other EU Member States, it is also highly recommended that you take action before noyb and local data protection authorities start targeting more businesses. 

    "Instead of actually adapting services to be GDPR compliant, US companies have tried to simply add some text to their privacy policies and ignore the Court of Justice. Many EU companies have followed the lead instead of switching to legal options."

    Max Schrems

    Removing Google Analytics from your site doesn’t mean that you need to give up website analytics altogether though. There are a variety of Google Analytics alternatives available today. Matomo in particular is a powerful open-source web analytics platform that gives you 100% data ownership and GDPR compliance

    Tweet - Using Google Analytics is illegal in Europe
    Glenn F. Henriksen via Twitter

    Matomo is one of the best Google Analytics alternatives offering privacy by design on our Cloud, On-Premise and Matomo for WordPress. So you can get the insights you need while remaining compliant. As the GDPR continues to evolve, you can rest assured that Matomo will be at the forefront of these changes. 

    In addition, all Google Analytics data can be imported into Matomo so no historical data is lost. To make your migration as seamless as possible, we’ve put together a guide to migrating from Google Analytics to Matomo

    Ready to begin your journey to GDPR compliance ? Check out our live demo and start your 21-day free trial now – no credit card required.

    If you are interested in learning more about GDPR compliance and Matomo, check out our GDPR resources below :    

    What does this mean if you are using Matomo ? 

    Our users can rest assured that Matomo remains in compliance with GDPR as all data is stored in the EU (Matomo Cloud) or in any country of your choice (Matomo On-Premise). With Matomo you’re able to continue analysing your website and not worry about GDPR.

    Final thoughts

    For EU businesses operating websites, now is the time to act. While Google pushes out false narratives to try and convince users that it is safe to continue using Google Analytics, it’s clear from these court rulings that the data protection authorities across the EU disagree with Google’s narrative.

    The fines, reputational damage and stresses mounting from using Google Analytics are imminent. Find an alternative to Google Analytics as this problem is not going away. 

    Getting started with Matomo is easy. Make the switch today and start your free 21-day trial – no credit card required. 

  • avcodec : add DFPWM1a codec

    8 mars 2022, par Jack Bruienne
    avcodec : add DFPWM1a codec
    

    From the wiki page (https://wiki.vexatos.com/dfpwm) :
    > DFPWM (Dynamic Filter Pulse Width Modulation) is an audio codec
    > created by Ben “GreaseMonkey” Russell in 2012, originally to be used
    > as a voice codec for asiekierka's pixmess, a C remake of 64pixels.
    > It is a 1-bit-per-sample codec which uses a dynamic-strength one-pole
    > low-pass filter as a predictor. Due to the fact that a raw DPFWM decoding
    > creates a high-pitched whine, it is often followed by some post-processing
    > filters to make the stream more listenable.

    It has recently gained popularity through the ComputerCraft mod for
    Minecraft, which added support for audio through this codec, as well as
    the Computronics expansion which preceeded the official support. These
    both implement the slightly adjusted 1a version of the codec, which is
    the version I have chosen for this patch.

    This patch adds a new codec (with encoding and decoding) for DFPWM1a.
    The codec sources are pretty simple : they use the reference codec with
    a basic wrapper to connect it to the FFmpeg AVCodec system.

    To clarify, the codec does not have a specific sample rate - it is
    provided by the container (or user), which is typically 48000, but has
    also been known to be 32768. The codec does not specify channel info
    either, and it's pretty much always used with one mono channel.
    However, since it appears that libavcodec expects both sample rate and
    channel count to be handled by either the codec or container, I have
    made the decision to allow multiple channels interleaved, which as far
    as I know has never been used, but it works fine here nevertheless. The
    accompanying raw format has a channels option to set this. (I expect
    most users of this will not use multiple channels, but it remains an
    option just in case.)

    This patch will be highly useful to ComputerCraft developers who are
    working with audio, as it is the standard format for audio, and there
    are few user-friendly encoders out there, and even fewer decoders. It
    will streamline the process for importing and listening to audio,
    replacing the need to write code or use tools that require very
    specific input formats.

    You may use the CraftOS-PC program (https://www.craftos-pc.cc) to test
    out DFPWM playback. To use it, run the program and type this command :
    "attach left speaker" Then run "speaker play <file.dfpwm>" for each file.
    The app runs in a sandbox, so files have to be transferred in first ;
    the easiest way to do this is to simply drag the file on the window.
    (Or copy files to the folder at https://www.craftos-pc.cc/docs/saves.)

    Sample DFPWM files can be generated with an online tool at
    https://music.madefor.cc. This is the current best way to encode DFPWM
    files. Simply drag an audio file onto the page, and it will encode it,
    giving a download link on the page.

    I've made sure to update all of the docs as per Developer§7, and I've
    tested it as per section 8. Test files encoded to DFPWM play correctly
    in ComputerCraft, and other files that work in CC are correctly decoded.
    I have also verified that corrupt files do not crash the decoder - this
    should theoretically not be an issue as the result size is constant with
    respect to the input size.

    Signed-off-by : Jack Bruienne <jackbruienne@gmail.com>

    • [DH] Changelog
    • [DH] MAINTAINERS
    • [DH] doc/general_contents.texi
    • [DH] libavcodec/Makefile
    • [DH] libavcodec/allcodecs.c
    • [DH] libavcodec/codec_desc.c
    • [DH] libavcodec/codec_id.h
    • [DH] libavcodec/dfpwmdec.c
    • [DH] libavcodec/dfpwmenc.c
    • [DH] libavcodec/utils.c
    • [DH] libavcodec/version.h