Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (106)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

Sur d’autres sites (13416)

  • Evolution #4080 : Raccourci puce : se débarasser de l’image

    1er octobre 2018, par cedric -

    kent1 propose
    https://unicode-table.com/fr/203A/
    avec sa variante pour le rtl
    https://unicode-table.com/fr/2039/

    Qui a le mérite de l’élégance (bon ça c’est subjectif mais ça me semble mieux que le triangle plein) et d’un large support (puisque guillemet simple)
    La puce étant injectée en CSS (le html sera un tiret comme actuellement - simple ? demi/quart/entier cadratin ?) ça n’est sémantiquement pas gênant

  • Generate thumbnail of videos sent from frontend flask

    15 août 2021, par qqxlafk

    I want to generate a thumbnail(say, extract frame at 1s) for videos user uploaded and sent back from the frontend.
user_upload = request.files['file']
What is the proper way for doing that ? Is it possible to extract the frame without saving the file locally and read in first ?

    


    subprocess.call(['ffmpeg', '-i', user_upload, '-ss',
                     '00:00:00.000', '-vframes', '1', output_dir])


    


    or

    


         vidcap = cv2.VideoCapture(user_upload)
     success, image = vidcap.read()
     count = 0
     while success and count < 1:
         cv2.imwrite("frame%d.jpg" % count, image)     # save frame as JPEG file
         success, image = vidcap.read()
         print('Read a new frame: ', success)
         count += 1


    


    both FFmpeg and cv2 require to read in a Path, not a FileStorage.

    


      File "/Users/glwang/bikan/yc2020/eb-flask/siyu/utils.py", line 8, in capture_thumnail
    '00:00:00.000', '-vframes', '1', output_dir])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 267, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1275, in _execute_child
    restore_signals, start_new_session, preexec_fn)
TypeError: expected str, bytes or os.PathLike object, not FileStorage


    


    Also, when I tried to first save the file locally and use FFmpegfor extracting the frame,
user_upload.save('path/to/somewhere')
it shows

    


    File "/siyu/utils.py", line 7, in capture_thumnail
    video_input.save(video_input.filename)
  File "/Users/lib/python3.6/site-packages/werkzeug/datastructures.py", line 3070, in save
    copyfileobj(self.stream, dst, buffer_size)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/shutil.py", line 79, in copyfileobj
    buf = fsrc.read(length)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tempfile.py", line 738, in read
    return self._file.read(*args)
ValueError: read of closed file


    


  • fftools/graph/graphprint : Fix races when initializing graphprint

    30 mai, par Andreas Rheinhardt
    fftools/graph/graphprint : Fix races when initializing graphprint
    

    Setting print_graphs_format (in case no -print_graphs_format
    option was specified) is racy, as is using av_strtok()
    to split it. Both have been removed.

    Notice that using av_strtok() was destructive : In the absence
    of races the options would only have been applied for the
    first initialization.

    Reviewed-by : softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] fftools/graph/graphprint.c
    • [DH] fftools/textformat/avtextformat.c