Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (99)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (10342)

  • How can I correctly provide a fake webcam input to Chrome ?

    30 août 2018, par doppelgreener

    I’m trying to run end-to-end testing in Chrome for a product that requires a webcam feed halfway through to operate. From what I understand this means providing a fake webcam video to Chrome using the --use-file-for-fake-video-capture="/path/to/video.y4m" command line argument. It will then use that as a webcam video.

    However, no matter what y4m file I provide, I get the following error from Chrome running under these conditions :

    DOMException: Could not start video source
    {
     code: 0,
     message: "Could not start video source",
     name: "NotReadableError"
    }

    Notably I can provide an audio file just fine using --use-file-for-fake-audio-capture and Chrome will work with it well. The video has been my sticking point.

    This error comes out of the following straightforward mediaDevices request :

    navigator.mediaDevices.getUserMedia({ video: true, audio: true })
     .then(data => {
       // do stuff
     })
     .catch(err => {
       // oh no!
     });

    (This always hits the “oh no !” branch when a video file is provided.)

    What I’ve tried so far

    I’ve been running Chrome with the following command line arguments (newlines added for readability), and I’m using a Mac hence the open command :

    open -a "Google Chrome" --args
     --disable-gpu
     --use-fake-device-for-media-stream
     --use-file-for-fake-video-capture="~/Documents/mock/webcam.y4m"
     --use-file-for-fake-audio-capture="~/Documents/mock/microphone.wav"

    webcam.y4m and microphone.wav were generated from a video file I recorded.

    I first recorded a twenty-second mp4 video using my browser’s MediaRecorder, downloaded the result, and converted it using the following command line commands :

    ffmpeg -y -i original.mp4 -f wav -vn microphone.wav
    ffmpeg -y -i original.mp4 webcam.y4m

    When this didn’t work, I tried the same using a twenty-second movie file I recorded in Quicktime :

    ffmpeg -y -i original.mov -f wav -vn microphone.wav
    ffmpeg -y -i original.mov webcam.y4m

    When that also failed, I went straight to the Chromium file that explains fake video capture, went to the example y4m file list it provided, and downloaded the grandma file and provided that as a command line argument to Chrome instead :

    open -a "Google Chrome" --args
     --disable-gpu
     --use-fake-device-for-media-stream
     --use-file-for-fake-video-capture="~/Documents/mock/grandma_qcif.y4m"
     --use-file-for-fake-audio-capture="~/Documents/mock/microphone.wav"

    Chrome provides me with the exact same error in all of these situations.

    The only time Chrome doesn’t error out with that mediaDevices request is when I omit the video completely :

    open -a "Google Chrome" --args
     --disable-gpu
     --use-fake-device-for-media-stream
     --use-file-for-fake-audio-capture="~/Documents/mock/microphone.wav"

    Accounting for C420mpeg2

    TestRTC suggests Chrome will “crash” if I give it a C420mpeg2 file, and recommends that simply replacing the metadata fixes the issue. Indeed the video file I generate from ffmpeg gives me the following header :

    YUV4MPEG2 W1280 H720 F30:1 Ip A1:1 C420mpeg2 XYSCSS=420MPEG2

    Chrome doesn’t actually crash when run with this file, I just get the error above. If I edit the video file to the following header though per TestRTC’s recommendations I get the same situation :

    YUV4MPEG2 W1280 H720 F30:1 Ip A1:1 C420 XYSCSS=420MPEG2

    The video file still gives me the above error in these conditions.

    What can/should I do ?

    How should I be providing a video file to Chrome for this command line argument ?

    How should I be recording or creating the video file ?

    How should I convert it to y4m ?

  • Send stream from hdhomerun to AWS EC2 instance

    13 novembre 2018, par icalvete

    I’m trying something odd to get fun. Send stream from hdhomerun to AWS EC2 instance.

    First aproach. Read stream with ffmpeg
    (tested locally successfully)

    hdhomerun_config discover sya my device have ip 192.168.1.200 so I open port on my router in this way

    <my home="home" public="public" ip="ip">:5005 -> 192.168.1.200:80
    <my home="home" public="public" ip="ip">:5004 -> 192.168.1.200:5004
    </my></my>

    w3m and telnet say everything is ok.

    But...

    from EC2 instance I do

    /usr/bin/ffmpeg -y -i 'http://<my home="home" public="public" ip="ip">:5004/auto/v5057?transcode=internet240' -t 12 -vn -acodec pcm_s16le -ar 16000 -ac 1 '/tmp/test.wav'
    </my>

    In tuner1 I can see...

    Virtual Channel none
    Frequency   698.000 MHz
    Program Number  186
    Modulation Lock t8qam64
    Signal Strength 89%
    Signal Quality  100%
    Symbol Quality  100%
    Streaming Rate  none
    Resource Lock   <ec2 public="public" ip="ip">
    </ec2>

    In hdhomerun system logs...

    19700102-10:27:25 Tuner: tuner0 tuning 5057 Telecinco (t8qam64:698MHz-186)
    19700102-10:27:25 Tuner: tuner0 streaming http to <ec2 public="public" ip="ip">:34124
    </ec2>

    Everything seems ok but ffmpeg don’t get any data.

    Seccond aproach. Send stream to wowza

    I have a wowza server running in EC2 instance

    From a linux box at my home I do.

    root# /usr/bin/hdhomerun_config 1250D7B2 scan /tuner1 scan.log
    root# /usr/bin/hdhomerun_config 1250D7B2 set /tuner1/channel auto:651000000
    root# /usr/bin/hdhomerun_config 1250D7B2 get /tuner1/streaminfo
    root# /usr/bin/hdhomerun_config 1250D7B2 get /tuner1/program 190
    root# /usr/bin/hdhomerun_config 1250D7B2 set /tuner1/target rtp://<wowza server="server" public="public" ip="ip">:1935/TEST/hdhr
    root# echo $?
    root# 0
    </wowza>

    Ends without error buy doesn’t work
    This was a long shot but ....

    Any ideas to do this.

    Thanks !!!

  • Very basic Moviepy script failing to run

    1er juillet 2018, par cem akbulut

    So, I have this very basic script that concatenates two videos, and adds a background sound.

    def intro():

       voiceoverIntro = AudioFileClip(audio[3]) #get path for intro.mp3


       introVideo = []
       temp = p1vid + p2vid + p3vid

       for x in temp: # add product videos to introVideo if they are longer than intro.mp3
           x = VideoFileClip(x)

           if x.duration >= voiceoverIntro.duration:
               introVideo.append(x)


       if len(introVideo) >= 1:

           #Get the video and turn off its volume
           introBg = introVideo[0].volumex(0).resize((1280,720))
           introBg = introBg.set_audio(voiceoverIntro).set_duration(voiceoverIntro.duration)


           introBg.reader.close()
           introBg.audio.reader.close_proc()

           return introBg

    And this function creates the second clip

    def productThreeOpener(productName):
       opener3 = VideoFileClip("media/number3.mp4").volumex(0).resize((1280,720))



       text = TextClip(productName,fontsize=60,color='white', font="Dekar")\
           .set_pos(("right", "center"))\
           .set_duration(3)\
           .set_start(2)\
           .crossfadein(1)\
           .crossfadeout(1)\
           .margin(right=200,opacity=0)

       opener3 = CompositeVideoClip([opener3, text])

       return opener3

    Now we just concatenate the two outputs

    final_clip = concatenate_videoclips([intro, productThreeOpener], method="compose")

    final_clip.resize((1280, 720)).write_videofile("output/intro.mp4", threads=8, fps=24, progress_bar=False)

    Running the code above returns this error ;

    Traceback (most recent call last):
    [MoviePy] >>>> Building video output/intro.mp4
     File "C:/Users/Akbulut/PycharmProjects/youtubeVideoEditor/vidEditor/sandbox.py", line 145, in <module>
    [MoviePy] Writing audio in introTEMP_MPY_wvf_snd.mp3
       final_clip.write_videofile("output/intro.mp4", threads=8, fps=24, progress_bar=False)
     File "", line 2, in write_videofile
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
       return f(clip, *a, **k)
     File "", line 2, in write_videofile
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 137, in use_clip_fps_by_default
       return f(clip, *new_a, **new_kw)
     File "", line 2, in write_videofile
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 22, in convert_masks_to_RGB
       return f(clip, *a, **k)
     File "C:\Program Files\Python36\lib\site-packages\moviepy\video\VideoClip.py", line 318, in write_videofile
       progress_bar=progress_bar)
     File "", line 2, in write_audiofile
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
       return f(clip, *a, **k)
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\AudioClip.py", line 213, in write_audiofile
       progress_bar=progress_bar)
     File "", line 2, in ffmpeg_audiowrite
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
       return f(clip, *a, **k)
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 165, in ffmpeg_audiowrite
       ffmpeg_params=ffmpeg_params)
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 71, in __init__
       self.proc = sp.Popen(cmd, **popen_params)
     File "C:\Program Files\Python36\lib\subprocess.py", line 594, in __init__
       _cleanup()
     File "C:\Program Files\Python36\lib\subprocess.py", line 205, in _cleanup
       res = inst._internal_poll(_deadstate=sys.maxsize)
     File "C:\Program Files\Python36\lib\subprocess.py", line 1025, in _internal_poll
       if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
    OSError: [WinError 6] İşleyici geçersiz
    Exception ignored in: <bound method="method" of="of" object="object" at="at" 0x0000000a885019b0="0x0000000a885019b0">>
    Traceback (most recent call last):
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 134, in __del__
       self.close()
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 122, in close
       if self.proc:
    AttributeError: 'FFMPEG_AudioWriter' object has no attribute 'proc'

    Process finished with exit code 1
    </bound></module>

    I strictly followed MoviePY installation guide, installed it and all of its dependencies about 2 days ago. I work on a 64b Windows machine. Python version 3.6.1

    I’ve been stuck with this error for over a day now, and I don’t know what to try.. Any help/advice is highly appreciated.

    Thanks.