Recherche avancée

Médias (91)

Autres articles (67)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (4069)

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

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

    &#xA;

    Full traceback :

    &#xA;

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

    &#xA;

    Dockerfile :

    &#xA;

    ENV MEDIA_DIR=&#x27;/media/&#x27;&#xA;RUN mkdir -p /media&#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

    Play function :

    &#xA;

    async def play(voice_channel, message, control = None):&#xA;    vc = get_vc()&#xA;    if not vc:&#xA;        vc = await voice_channel.connect()&#xA;    next_yt = YouTube(next_song)&#xA;    next_file = sub(r&#x27;\W&#x2B;&#x27;, &#x27;&#x27;, next_yt.title.replace(&#x27; &#x27;, &#x27;_&#x27;).replace(&#x27;__&#x27;, &#x27;_&#x27;)).lower()&#xA;    next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension=&#x27;mp4&#x27;)[0], next_file)&#xA;&#xA;    await message.channel.send(f&#x27;Done getting ready, I\&#x27;ll be there in a moment.&#x27;)&#xA;&#xA;while next_song:&#xA;    while vc.is_playing():&#xA;        await asynciosleep(0.5)&#xA;        continue&#xA;&#xA;    try:&#xA;        vc.play(FFmpegPCMAudio(next_song_path))&#xA;        print(f&#x27;Playing {next_song_path} with latency of {vc.average_latency}&#x27;)&#xA;        vc.source = PCMVolumeTransformer(vc.source, volume=0.15)&#xA;    except Exception as e:&#xA;        print(e)&#xA;        await vc.disconnect()&#xA;        next_song = None&#xA;        return&#xA;    next_song = sounds_db.get_next_song()&#xA;    next_yt = YouTube(next_song) if next_song else None&#xA;    next_file = sub(r&#x27;\W&#x2B;&#x27;, &#x27;&#x27;, next_yt.title.replace(&#x27; &#x27;, &#x27;_&#x27;).replace(&#x27;__&#x27;, &#x27;_&#x27;)).lower() if next_song else None&#xA;    next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension=&#x27;mp4&#x27;)[0], next_file) if next_song else None&#xA;

    &#xA;

    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.

    &#xA;

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

    &#xA;

    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.

    &#xA;

  • Revision 37408 : déplacement de chaines de langue Faire refonctionner l’encodage sonore

    18 avril 2010, par kent1@… — Log

    déplacement de chaines de langue
    Faire refonctionner l’encodage sonore