Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (57)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (10757)

  • Pyinstaller exe works halfway on another computer

    5 novembre 2022, par At Bay

    I wrote a code which uses FFMPEG and os, subprocess, datetime, speechrecognition, and xlsxwriter libraries. Below a brief sketch of the code - it goes through a directory of wav files and creates a transcription for X seconds in length and saves it into an excel sheet.
import os
import subprocess
import datetime
import speech_recognition as sr
import xlsxwriter

    


    def ffmpeg():
   #create clip
   subprocess.run(["ffmpeg", "-ss", starti, "-t", lengthi, "-i", filepathO, filepathNEW1])

   #convert to mono
   subprocess.run(["ffmpeg", "-i", filepathNEW1, "-ac", "1", filepathNEW2])
   
   #compres to 44.1 kHZ
   subprocess.run(["ffmpeg", "-i", filepathNEW2, "-ar", "44100", filepathNEW3])

def transcription():
    with sr.AudioFile(os.path.abspath(clippath)) as source:
       audio = r.record(source)  # read the entire audio file
       transcriptstring = str(r.recognize_google(audio, language = 'en', show_all=True))
       worksheet.write(tcol, transcriptstring)


#call functions in this order
for filename in os.listdir(ufolder):
   if (filename.endswith(".wav")):
       ffmpeg() #cuts clips, compresses to mono and 44.1 khz
       transcription() 

workbook.close()



    


    When I try to run the exe created by pyinstaller, I get the following error :

    


    Enter directory of wav files: C:\Users\myname\Downloads\&#xA;Enter clip start (seconds): 0&#xA;Enter desired clip length (seconds): 5&#xA;Traceback (most recent call last):&#xA;  File "cliptranscript.py", line 134, in <module>&#xA;  File "cliptranscript.py", line 47, in ffmpeg&#xA;  File "subprocess.py", line 503, in run&#xA;  File "subprocess.py", line 971, in __init__&#xA;  File "subprocess.py", line 1440, in _execute_child&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified&#xA;[13304] Failed to execute script &#x27;cliptranscript&#x27; due to unhandled exception!&#xA;</module>

    &#xA;

    Below is a partial view of the folder created by pyinstaller :&#xA;1

    &#xA;

  • How to grab voice and video in ffmpeg/mplayer/mencoder ? [closed]

    4 février 2013, par Kill Kill

    My target is to grab voice and video via webcamera.
    There are three ways to do :

    1.ffmpeg

    ffmpeg -f oss -i /dev/dsp -f video4linux2 -r 25 -b 500000 -s 320x240 -i /dev/video0 out.mpg  
    WARNING: gnome-keyring:: couldn&#39;t connect to: /home/debian/.cache/keyring-4Hzs4r/pkcs11: No such file or directory  
    ffmpeg version 0.8.5-6:0.8.5-1, Copyright (c) 2000-2012 the Libav developers  
    built on Jan 13 2013 16:02:15 with gcc 4.7.2  
    *** THIS PROGRAM IS DEPRECATED ***  
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.  
    [oss @ 0x9d63c60] /dev/dsp: No such file or directory  
    /dev/dsp: Input/output error

    in my computer how to revise it ?

    2.mplayer :

    mplayer tv:// -tv driver=v4l2:input=0:width=640:height=480:fps=25 -vo x11  

    I can see the video when the command run, how can I save the output into a file and grab the voice ?

    3.mencoder :

    mencoder tv:// -tv driver=v4l2:width=800:height=600:device=/dev/video0:fps=30:outfmt=yuy2:forceaudio:alsa:adevice=hw.2,0 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1800 -ffourcc xvid -oac mp3lame -lameopts cbr=128 -o output.avi  

    MEncoder svn r34540 (Debian), built with gcc-4.7 (C) 2000-2012 MPlayer Team  
    success: format: 9 data: 0x0 - 0x0  
    TV file format detected.  
    Selected driver: v4l2  
    name: Video 4 Linux 2 input  
    author: Martin Olschewski  
    comment: first try, more to come  
    v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.  
    Selected device: PC Camera  
    Capabilities: video capture read/write streaming  
    supported norms:  
    inputs: 0 = zc3xx;  
    Current input: 0  
    Current format: unknown (0x4745504a)  
    tv.c: norm_from_string(pal): Bogus norm parameter, setting default.  
    v4l2: ioctl enum norm failed: Inappropriate ioctl for device  
    Error: Cannot set norm!  
    Selected input hasn&#39;t got a tuner!  
    ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card  
    Error opening audio: No such file or directory  
    ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card  
    Error opening audio: No such file or directory  
    ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card  
    Error opening audio: No such file or directory  
    v4l2: ioctl set mute failed: Invalid argument  
    v4l2: 0 frames successfully processed, 0 frames dropped.  
    ============ Sorry, this file format is not recognized/supported =============  
    === If this file is an AVI, ASF or MPEG stream, please contact the author! ===  
    Cannot open demuxer.  

    Exiting...  
  • ffmpeg error when trying to convert mp4 to mp3 in python

    30 mai 2022, par Solphane
    from pytube import YouTube&#xA;from moviepy.editor import *&#xA;&#xA;with open(&#x27;test.txt&#x27;) as f:&#xA;    lines = f.readlines()&#xA;&#xA;for x in lines:&#xA;    yt = YouTube(x)&#xA;    yt.streams.filter(file_extension=&#x27;mp4&#x27;).first().download()&#xA;&#xA;    mp4_file = f"{yt.title}.mp4"&#xA;    mp3_file = f"{yt.title}.mp4"&#xA;&#xA;    videoclip = VideoFileClip(mp4_file)&#xA;    audioclip = videoclip.audio&#xA;    audioclip.write_audiofile(mp3_file)&#xA;&#xA;    audioclip.close()&#xA;    videoclip.close()&#xA;    &#xA;    title = f"{yt.author} {yt.title}"&#xA;    print(title)&#xA;

    &#xA;

    Trying to convert downloaded mp4 from Youtube videos to mp3 using pytube and moviepy. Downloading the mp4's works fine however I run into this error when the conversion part happens : https://i.imgur.com/JhJMQgR.png

    &#xA;

    Tried updating ffmpeg, but it didn't help.

    &#xA;