Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (96)

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

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

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (9690)

  • OSError : [Errno 9] Bad file descriptor when downloading using pytube and playing with discord.py

    15 septembre 2022, par Trevor Mathisen

    When using pytube to download a YouTube video and discord.py to play it, I am getting a OSError : [Errno 9] Bad file descriptor error. I've had this working at one point and can't seem to figure out what I changed which broke it.

    


    Full traceback :

    


    2022-09-15 20:20:44 INFO       discord.voice_client The voice handshake is being terminated for Channel ID 902294184994693224 (Guild ID 902294184994693220)
2022-09-15T20:20:44.010142763Z 2022-09-15 20:20:44 INFO     discord.voice_client Disconnecting from voice normally, close code 1000.
2022-09-15T20:20:44.058592513Z 2022-09-15 20:20:44 ERROR    discord.player Exception in voice thread Thread-5
2022-09-15T20:20:44.058623864Z Traceback (most recent call last):
2022-09-15T20:20:44.058629130Z   File "/usr/local/lib/python3.10/dist-packages/discord/player.py", line 698, in run
2022-09-15T20:20:44.058632003Z     self._do_run()
2022-09-15T20:20:44.058634500Z   File "/usr/local/lib/python3.10/dist-packages/discord/player.py", line 691, in _do_run
2022-09-15T20:20:44.058637013Z     play_audio(data, encode=not self.source.is_opus())
2022-09-15T20:20:44.058639334Z   File "/usr/local/lib/python3.10/dist-packages/discord/voice_client.py", line 683, in send_audio_packet
2022-09-15T20:20:44.058648759Z     self.socket.sendto(packet, (self.endpoint_ip, self.voice_port))
2022-09-15T20:20:44.058653057Z OSError: [Errno 9] Bad file descriptor
2022-09-15T20:20:44.058673762Z 2022-09-15 20:20:44 INFO     discord.player ffmpeg process 12 has not terminated. Waiting to terminate...
2022-09-15T20:20:44.062083854Z 2022-09-15 20:20:44 INFO     discord.player ffmpeg process 12 should have terminated with a return code of -9.


    


    Dockerfile :

    


    ENV MEDIA_DIR='/media/'
RUN mkdir -p /media


    


    Download function (check_path returns True, showing the file is there) :

    


    def download_videos(stream, filename):
    print(f'downloading {filename}')
    filepath = stream.download(output_path=config_db.environ_path, filename=f'{filename}.mp4')
    print(f'completed download of {filepath}')
    check_path = Path(filepath)
    if check_path.is_file():
        print(check_path)
    return filepath


    


    Play function :

    


    async def play(voice_channel, message, control = None):
    vc = get_vc()
    if not vc:
        vc = await voice_channel.connect()
    next_yt = YouTube(next_song)
    next_file = sub(r'\W+', '', next_yt.title.replace(' ', '_').replace('__', '_')).lower()
    next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension='mp4')[0], next_file)

    await message.channel.send(f'Done getting ready, I\'ll be there in a moment.')

while next_song:
    while vc.is_playing():
        await asynciosleep(0.5)
        continue

    try:
        vc.play(FFmpegPCMAudio(next_song_path))
        print(f'Playing {next_song_path} with latency of {vc.average_latency}')
        vc.source = PCMVolumeTransformer(vc.source, volume=0.15)
    except Exception as e:
        print(e)
        await vc.disconnect()
        next_song = None
        return
    next_song = sounds_db.get_next_song()
    next_yt = YouTube(next_song) if next_song else None
    next_file = sub(r'\W+', '', next_yt.title.replace(' ', '_').replace('__', '_')).lower() if next_song else None
    next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension='mp4')[0], next_file) if next_song else None


    


    I've mounted the /media/ dir during docker -v and can see the file is getting downloaded and when I copy the file to my local machine I can play it in an audio player.

    


    The program can access the SQLite database right next to the files in question just fine.

    


    I've deployed the container locally and to two different VPS's with the same file structure with the same behavior. I'm ripping my hair out.

    


  • libavcodec/sanm : clear codec47 diff buffers with specific color

    8 novembre 2024, par Manuel Lauss
    libavcodec/sanm : clear codec47 diff buffers with specific color
    

    The codec47 header provides colors to use to clear the
    2 difference buffers. This fixes artifacts (black hair, faces) in
    Curse of Monkey Island "CURSERNG.SAN" video.

    Signed-off-by : Manuel Lauss <manuel.lauss@gmail.com>
    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DH] libavcodec/sanm.c
  • How to stream H.264 bitstream to browser

    21 janvier 2019, par BobtheMagicMoose

    This is a followup to https://raspberrypi.stackexchange.com/questions/93254/stream-usb-webcam-with-audio?noredirect=1#comment150507_93254

    I, like many other brave tinkerers before me, thought it would be a simple task to take an old USB camera (c920) can pair it with a raspberry pi to make a network streaming device (e.g., baby monitor). As those that have gone before me, I have now realized (after two days of tearing my hair out), that this is an extremely complicated task.

    Problem statement : I have a raspberry pi zero and a c920 webcam. I want to use the H.264 bitstream from the webcam and serve it on the pi without transcoding it (the feeble processor would really struggle). I want to combine the video stream with its audio and send it over to a browser (phone, tablet, pc - something HTML5 without NAPI).

    My current strategy is to do the following :

    ffmpeg -re -f s16le -i /dev/zero -f v4l2 -thread_queue_size 512 -codec:v h264 -s 1920x1080 -i /dev/video0 -codec:v copy -acodec aac -ab 128k -g 50 http://localhost:8090/camera.ffm (this is with dummy audio - I figured I would add audio later)

    Followed by sudo ffserver -d -f /etc/ffserver.conf to received the feed and broadcast it as a stream. This is the ffserver.conf file :

    `HTTPPort 8090
    HTTPBindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 100000
    CustomLog -
    <feed>
     File /tmp/streamwebm.ffm
     FileMaxSize 50M
     ACL allow localhost
     ACL allow 128.199.149.46
     #ACL allow 127.0.0.1
     ACL allow 192.168.0.0 192.168.0.255
    </feed>
    <stream stream="stream">
    Format webm

    # Video Settings
    VideoFrameRate 30
    VideoSize 1920x1080

    # Audio settings
    AudioCodec libvorbis
    AudioSampleRate 48000
    AVOptionAudio flags +global_header

    MaxTime 0
    AVOptionVideo me_range 16
    AVOptionVideo qdiff 4
    AVOptionVideo qmin 4
    AVOptionVideo qmax 40
    #AVOptionVideo good
    AVOptionVideo flags +global_header

    # Streaming settings
    PreRoll 10
    StartSendOnKey

    Metadata author "author"
    Metadata copyright "copyright"
    Metadata title "Web app name"
    Metadata comment "comment"
    </stream>

    My basic html is<video>  <source src="http://localhost:8090/stream"> </source></video>

    The stream however, doesn’t work (the browser won’t connect) and I get the following :
    enter image description here

    And the browser on the client says (failed) NET::ERR_CONNECTION_REFUSED

    Thoughts :
    - Begin stream simple mp4 with ffserver explains that ffserver can’t stream .mp4 because of headers or something. This is why I am using webm (which doesn’t support h.264 I believe and is causing the really slow performance converting to vp9). I’m not concerned about CPU usage at the moment, just want to get an image to appear on the browser !

    • I hear one issue deals with ’chunking’ - that the camera h.264 is a bitstream but h.264 streams for html5 should be chunked. Not sure how that would work.

    • I have tried VLC for some things (RTP) but haven’t have success.

    • Most resources (SE and other sites) are from 2010-2015 and it seems as thought v4l2 and other things have developed since then.

    • As my problem is most likely general ignorance of the subject matter, I would appreciate any answers that provide some general understanding as to the theory behind different techniques. I know this makes the question more of a call for opinion and less appropriate for SE, but I’m fixing to throw my computer out the window (you know the feeling).

    Thank you !