Recherche avancée

Médias (91)

Autres articles (36)

  • 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

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (6923)

  • Play Raspberry Pi h264 stream in C# app

    5 septembre 2019, par CoreMeltdown

    I have a Raspberry Pi board with dedicated camera that records video only in h264. I am looking for the best method to stream and play recorded video in real-time (as in, less than 1 sec delay) in c# windows forms app. The additional requirement is that such stream can be easily processed before displaying, for example for searching for objects on the image.

    Stuff I tried :

    - VLC server on raspi and VLC control in c# forms app <- simple solution, with RTSP, but has a serious flaw, which is a 3sec delay in image displayed. I couldn’t fix it with buffor size/options etc.

    - creating a socket on raspi with nc, receiving raw h264 data in c# and passing it to mplayer frontend <- If I simply start raspivid | nc and on the laptop nc | mplayer, i get exactly the results i want, the video i get is pretty much realtime, but the problem arises when i try to create mplayer frontend in c# and simulate the nc.exe. Maybe I’m passing the h264 data wrong (simply write them to stdin) or maybe something else.

    - using https://github.com/cisco/openh264 <- I compiled everything, but i can’t even get to decode sample vid.h264 i recorded on raspi with h264dec.exe, not to mention using it in c#.

    h264dec.exe vid.h264 out.yuv

    This produces 0bytes out.yuv file, while :

    h264dec.exe  vid.h264

    Gives me error message : "No input file specified in configuration file."

    - ffmpeg <- I implemented ffplay.exe playback in c# app but the lack of easy method to take screencaps etc. discouraged me to further investigate and develop.

    I’m not even sure whether I’m properly approaching the subject, so I’d be really thankful for every piece of advice I can get.

    EDIT
    Here is my ’working’ solution I am trying to implement in c#

    raspivid --width 400 --height 300 -t 9999999 --framerate 25 --output - | nc -l 5884

    nc ip_addr 5884 | mplayer -nosound -fps 100 -demuxer +h264es -cache 1024 -

    The key here is FPS 100, becuase then mplayer skips lag and plays the video it immediately receives with normal speed.
    The issue here is that I don’t know how to pass video data from socket into mplayer via c#, because I guess it is not done via stdin (already tried that).

  • Dreamcast Anniversary Programming

    10 septembre 2010, par Multimedia Mike — Game Hacking

    This day last year saw a lot of nostalgia posts on the internet regarding the Sega Dreamcast, launched 10 years prior to that day (on 9/9/99). Regrettably, none of the retrospectives that I read really seemed to mention the homebrew potential, which is the aspect that interested me. On the occasion of the DC’s 11th anniversary, I wanted to remind myself how to build something for the unit and do so using modern equipment and build tools.



    Background
    Like many other programmers, I initially gained interest in programming because I desired to program video games. Not content to just plunk out games on a PC, I always had a deep, abiding ambition to program actual video game hardware. That is, I wanted to program a purpose-built video game console. The Sega Dreamcast might be the most ideal candidate to ever emerge for that task. All that was required to run your own software on the unit was the console, a PC, some free software tools, and a special connectivity measure.

    The Equipment
    Here is the hardware required (ideally) to build software for the DC :

    • The console itself (I happen to have 3 of them laying around, as pictured above)
    • Some peripherals : Such as the basic DC controller, the DC keyboard (flagship title : Typing of the Dead), and the visual memory unit (VMU)


    • VGA box : The DC supported 480p gaming via a device that allowed you to connect the console straight to a VGA monitor via 15-pin D-sub. Not required for development, but very useful. I happen to have 3 of them from different third parties :


    • Finally, the connectivity measure for hooking the DC to the PC.
      There are 2 options here. The first is rare, expensive and relatively fast : A DC broadband adapter. The second is slower but much less expensive and relatively easy to come by– the DC coder’s cable. This was a DB-9 adapter on one end and a DC serial adapter on the other, and a circuit in the middle to monkey with voltage levels or some such ; I’m no electrical engineer. I procured this model from the notorious Lik Sang, well before that outfit was sued out of business.


    Dealing With Legacy
    Take a look at that coder’s cable again. DB-9 ? When was the last time you owned a computer with one of those ? And then think farther back to the last time to had occasion to plug something into one of those ports (likely a serial mouse).



    A few years ago, someone was about to toss out this Belkin USB to DB-9 serial converter when I intervened. I foresaw the day when I would dust off the coder’s cable. So now I can connect a USB serial cable to my Eee PC, which then connects via converter to a different serial cable, one which has its own conversion circuit that alters the connection to yet another type of serial cable.

    Bits is bits is bits as far as I’m concerned.



    Putting It All Together
    Now to assemble all the pieces (plus a monitor) into one development desktop :



    The monitor says “dcload 1.0.3, idle…”. That’s a custom boot CD-ROM that is patiently waiting to receive commands, code and data via the serial port.

    Getting The Software
    Back in the day, homebrew software development on the DC revolved around these components :

    • GNU binutils : for building base toolchains for the Hitachi SH-4 main CPU as well as the ARM7-based audio coprocessor
    • GNU gcc/g++ : for building compilers on top of binutils for the 2 CPUs
    • Newlib : a C library intended for embedded systems
    • KallistiOS : an open source, real-time OS developed for the DC

    The DC was my first exposure to building cross compilers. I developed some software for the DC in the earlier part of the decade. Now, I am trying to figure out how I did it, especially since I think I came up with a few interesting ideas at the time.

    Struggling With the Software Legacy
    The source for KallistiOS has gone untouched since about 2004 but is still around thanks to Sourceforge. The instructions for properly building the toolchain have been lost to time, or would be were it not for the Internet Archive’s copy of a site called Hangar Eleven. Also, KallistiOS makes reference to a program called ‘dc-tool’ which is needed on the client side for communicating with dcload. I was able to find this binary at the Boob ! site (well-known in DC circles).

    I was able to build the toolchain using binutils 2.20.1, gcc 4.5.1 and newlib 1.18.0. Building the toolchain is an odd process as it requires building the binutils, then building the C compiler, then newlib, and then building the C compiler again along with the C++ compiler because the C++ compiler depends on newlib.

    With some effort, I got the toolchain to build KallistiOS and most of its example programs. I documented most of the tweaks I had to make, several of them exactly the same as this one that I recently discovered while resurrecting a 10-year-old C program (common construct in C programming of old ?).

    Moment of Truth
    So I had some example programs built as ELF files. I told dc-tool to upload and run them on the waiting console. Unfortunately, the tool would just sort of stall, though some communication had evidently taken place. It has been many years since I have seen this in action but I recall that something more ought to be happening.

    Plan B (Hardware)
    This is the point that I remember that I have been holding onto one rather old little machine that still has a DB-9 serial port. It’s not especially ergonomic to set up. I have to run it on my floor because, to connect it to my network, I need to run a 25′ ethernet cable that just barely reaches from the other room. The machine doesn’t seem to like USB keyboards, which is a shame since I have long since ditched any PS/2 keyboards. Fortunately, the box still has an old Gentoo distro and is running sshd, a holdover from its former life as a headless box.



    Now when I run dc-tool, both the PC and DC report the upload progress while pretty overscan bars oscillate on the DC’s monitor. Now I’m back in business, until…

    Plan C (Software)
    None of these KallistiOS example programs are working. Some are even reporting catastrophic failures (register dumps) via the serial console. That’s when I remember that gcc can be a bit fickle on CPU architectures that are not, shall we say, first-class citizens. Back in the day, gcc 2.95 was a certified no-go for SH-4 development. 3.0.3 or 3.0.4 was called upon at the time. As I’m hosting this toolchain on x86_64 right now, gcc 3.0.4 can’t even be built (predates the architecture).

    One last option : As I searched through my old DC project directories, I found that I still have a lot of the resulting binaries, the ones I built 7-8 years ago. I upload a few of those and I finally see homebrew programming at work again, including this old program (described in detail here).

    Next Steps
    If I ever feel like revisiting this again, I suppose I can try some of the older 4.x series to see if they build valid programs. Alternatively, try building an x86_32-hosted 3.0.4 toolchain which ought to be a known good. And if that fails, search a little bit more to find that there are still active Dreamcast communities out there on the internet which probably have development toolchain binaries ready for download.

  • xdotool to tab to a button on a web page and use the mouse to disable a drop down menu option

    25 juin 2023, par Mash

    I have a Bash script that open a Amazon chime meeting URL in firefox, uses XDOtool to enter a meetig participant name, and tab and mouse click functions. and next uses ffmpeg to stream the video and audio output of the Amazon chime meeting to an RTMP destination.

    &#xA;

    When this is streamed, the Amazon chime web app has "More" drop down Menu. Within the Menu it has a option to disable the self view. I want to add xdotool commands to disable this self view option from the more drop down menu on the amazon chime web app page.

    &#xA;

    the Amazon chime meeting URL is - https://app.chime.aws/meetings/

    &#xA;

    Here is the Bash Script

    &#xA;

    #!/bin/bash&#xA;BROWSER_URL=${MEETING_URL}&#xA;SCREEN_WIDTH=1920&#xA;SCREEN_HEIGHT=1080&#xA;SCREEN_RESOLUTION=${SCREEN_WIDTH}x${SCREEN_HEIGHT}&#xA;CAPTURE_SCREEN_RESOLUTION=1920x1080&#xA;COLOR_DEPTH=24&#xA;X_SERVER_NUM=2&#xA;VIDEO_BITRATE=6000&#xA;VIDEO_FRAMERATE=30&#xA;VIDEO_GOP=$((VIDEO_FRAMERATE * 2))&#xA;AUDIO_BITRATE=160k&#xA;AUDIO_SAMPLERATE=44100&#xA;AUDIO_CHANNELS=2&#xA;&#xA;# Start PulseAudio server so Firefox will have somewhere to which to send audio&#xA;pulseaudio -D --exit-idle-time=-1&#xA;pacmd load-module module-virtual-sink sink_name=v1  # Load a virtual sink as `v1`&#xA;pacmd set-default-sink v1  # Set the `v1` as the default sink device&#xA;pacmd set-default-source v1.monitor  # Set the monitor of the v1 sink to be the default source&#xA;&#xA;# Start X11 virtual framebuffer so Firefox will have somewhere to draw&#xA;Xvfb :${X_SERVER_NUM} -ac -screen 0 ${SCREEN_RESOLUTION}x${COLOR_DEPTH} > /dev/null 2>&amp;1 &amp;&#xA;export DISPLAY=:${X_SERVER_NUM}.0&#xA;sleep 0.5  # Ensure this has started before moving on&#xA;&#xA;# Create a new Firefox profile for capturing preferences for this&#xA;firefox --no-remote --new-instance --createprofile "foo4 /tmp/foo4"&#xA;&#xA;# Install the OpenH264 plugin for Firefox&#xA;mkdir -p /tmp/foo4/gmp-gmpopenh264/1.8.1.1/&#xA;pushd /tmp/foo4/gmp-gmpopenh264/1.8.1.1 >&amp; /dev/null&#xA;curl -s -O http://ciscobinary.openh264.org/openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip&#xA;unzip openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip&#xA;rm -f openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip&#xA;popd >&amp; /dev/null&#xA;&#xA;# Set the Firefox preferences to enable automatic media playing with no user&#xA;# interaction and the use of the OpenH264 plugin.&#xA;cat &lt;<eof>> /tmp/foo4/prefs.js&#xA;user_pref("media.autoplay.default", 0);&#xA;user_pref("media.autoplay.enabled.user-gestures-needed", false);&#xA;user_pref("media.navigator.permission.disabled", true);&#xA;user_pref("media.gmp-gmpopenh264.abi", "x86_64-gcc3");&#xA;user_pref("media.gmp-gmpopenh264.lastUpdate", 1571534329);&#xA;user_pref("media.gmp-gmpopenh264.version", "1.8.1.1");&#xA;user_pref("doh-rollout.doorhanger-shown", true);&#xA;EOF&#xA;&#xA;# Start Firefox browser and point it at the URL we want to capture&#xA;#&#xA;# NB: The `--width` and `--height` arguments have to be very early in the&#xA;# argument list or else only a white screen will result in the capture for some&#xA;# reason.&#xA;firefox \&#xA;  -P foo4 \&#xA;  --width ${SCREEN_WIDTH} \&#xA;  --height ${SCREEN_HEIGHT} \&#xA;  --new-instance \&#xA;  --first-startup \&#xA;  --foreground \&#xA;  --kiosk \&#xA;  --ssb \&#xA;  "${BROWSER_URL}" \&#xA;  &amp;&#xA;sleep 10  # Ensure this has started before moving on, waiting for loading the Chime web app&#xA;xdotool key Return #Select yes for the pop-up window of "Would you like to open this link with Chime app?"&#xA;sleep 3&#xA;xdotool key Escape #Close the pop-up window&#xA;sleep 3&#xA;xdotool type Livestream #Type "Livestream" on the name input field&#xA;sleep 3&#xA;xdotool key Tab #Move to "join the meeting" button&#xA;sleep 3&#xA;xdotool key Return #Click "join the meeting" button&#xA;sleep 3&#xA;xdotool key Return #Close the pop-up window once again&#xA;sleep 3&#xA;xdotool key Escape #Close the pop-up window once again&#xA;sleep 3&#xA;xdotool key Return #Click "Use system audio" setting&#xA;sleep 3&#xA;xdotool key Escape #Close warning message&#xA;sleep 3&#xA;xdotool mousemove 1 1 click 1  # Move mouse out of the way so it doesn&#x27;t trigger the "pause" overlay on the video tile  &#xA;&#xA;# Start ffmpeg to transcode the capture from the X11 framebuffer and the&#xA;# PulseAudio virtual sound device we created earlier and send that to the RTMP&#xA;# endpoint in H.264/AAC format using a FLV container format.&#xA;#&#xA;# NB: These arguments have a very specific order. Seemingly inocuous changes in&#xA;# argument order can have pretty drastic effects, so be careful when&#xA;# adding/removing/reordering arguments here.&#xA;ffmpeg \&#xA;  -hide_banner -loglevel error \&#xA;  -nostdin \&#xA;  -s ${CAPTURE_SCREEN_RESOLUTION} \&#xA;  -r ${VIDEO_FRAMERATE} \&#xA;  -draw_mouse 0 \&#xA;  -f x11grab \&#xA;    -i ${DISPLAY} \&#xA;  -f pulse \&#xA;    -ac 2 \&#xA;    -i default \&#xA;    -vf "crop=1600:980:0:1080" \&#xA;  -c:v libx264 \&#xA;    -pix_fmt yuv420p \&#xA;    -profile:v main \&#xA;    -preset slow \&#xA;    -x264opts "nal-hrd=cbr:no-scenecut" \&#xA;    -minrate ${VIDEO_BITRATE} \&#xA;    -maxrate ${VIDEO_BITRATE} \&#xA;    -g ${VIDEO_GOP} \&#xA;  -filter_complex "aresample=async=1000:min_hard_comp=0.100000:first_pts=1" \&#xA;  -async 1 \&#xA;  -c:a aac \&#xA;    -b:a ${AUDIO_BITRATE} \&#xA;    -ac ${AUDIO_CHANNELS} \&#xA;    -ar ${AUDIO_SAMPLERATE} \&#xA;  -f flv ${RTMP_URL}``&#xA;&#xA;</eof>

    &#xA;

    what i have tried so far in in the bash script

    &#xA;