Recherche avancée

Médias (91)

Autres articles (94)

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

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (6155)

  • Winamp and the March of GUI

    1er juillet 2012, par Multimedia Mike — General, ars technica, gui, user interface, winamp

    Ars Technica recently published a 15-year retrospective on the venerable Winamp multimedia player, prompting bouts of nostalgia and revelations of "Huh ? That program is still around ?" from many readers. I was among them.



    I remember first using Winamp in 1997. I remember finding a few of these new files called MP3s online and being able to play the first 20 seconds using the official Fraunhofer Windows player— full playback required the fully licensed version. Then I searched for another player and came up with Winamp. The first version I ever used was v1.05 in the summer of 1997. I remember checking the website often for updates and trying out every single one. I can’t imagine doing that nowadays— programs need to auto-update themselves (which Winamp probably does now ; I can’t recall the last time I used the program).

    Video Underdog
    The last time Winamp came up on my radar was early in 2003 when a new version came with support for a custom, proprietary multimedia audio/video format called Nullsoft Video (NSV). I remember the timeframe because the date is indicated in the earliest revision of my NSV spec document (back when I was maintaining such docs in a series of plaintext files). This was cobbled together from details I and others in the open source multimedia community sorted out from sample files. It was missing quite a few details, though.

    Then, Winamp founder Justin Frankel — introduced through a colleague on the xine team — emailed me his official NSV format and told me I was free to incorporate details into my document just as long as it wasn’t obvious that I had the official spec. This put me in an obnoxious position of trying to incorporate details which would have been very difficult to reverse engineer without the official doc. I think I coped with the situation by never really getting around to updating my doc in any meaningful way. Then, one day, the official spec was released to the world anyway, and it is now mirrored here at multimedia.cx.

    I don’t think the format ever really caught on in any meaningful way, so not a big deal. (Anytime I say that about a format, I always learn it saw huge adoption is some small but vocal community.)

    What’s Wrong With This Picture ?
    What I really wanted to discuss in this post was the matter of graphical user interfaces and how they have changed in the last 15 years.

    I still remember when I first downloaded Winamp v1.05 and tried it on my Windows machine at the time. Indignantly, the first thought I had was, "What makes this program think it’s so special that it’s allowed to violate the user interface conventions put forth by the rest of the desktop ?" All of the Windows programs followed a standard set of user interface patterns and had a consistent look and feel... and then Winamp came along and felt it could violate all those conventions.

    I guess I let the program get away with it because it was either that or only play 20-second clips from the unregistered Fraunhofer player. Though incredibly sterile by comparison, the Fraunhofer player, it should be noted, followed Windows UI guidelines to the letter.

    As the summer of 1997 progressed and more Winamp versions were released, eventually one came out (I think it was v1.6 or so) that supported skins. I was excited because there was a skin that made the program look like a proper Windows program— at least if you used the default Windows color scheme, and had all of your fonts a certain type and size.

    Skins were implemented by packaging together a set of BMP images to overlay on various UI elements. I immediately saw a number of shortcomings with this skinning approach. A big one was UI lock-in. Ironically, if you skin an app and wish to maintain backwards compatibility with the thousands of skins selflessly authored by your vibrant community (seriously, I couldn’t believe how prolific these things were), then you were effectively locked into the primary UI. Forget about adding a new button anywhere.

    Another big problem was resolution-independence. Basing your UI on static bitmaps doesn’t scale well with various resolutions. Winamp had its normal mode and it also had double-sized mode.

    Skins proliferated among many types of programs in the late 1990s. I always treasured this Suck.com (remember them ? that’s a whole other nostalgia trip) essay from April, 2000 entitled Skin Cancer. Still, Winamp was basically the standard, and the best, and I put away my righteous nerd rage and even dug through the vast troves of skins. I remember settling on Swankamp for a good part of 1998, probably due to the neo-swing revival at the time.



    Then again, if Winamp irked me, imagine my reaction when I was first exposed to the Sonique Music Player in 1998 :



    The New UI Order
    Upon reflection, I realize now that I had a really myopic view of what a computer GUI should be. I thought the GUIs were necessarily supposed to follow the WIMP (windows, icons, mouse, pointer) paradigm and couldn’t conceive of anything different. For a long time, I couldn’t envision a useful GUI on a small device (like a phone) because WIMP didn’t fit well on such a small interface (even though I saw various ill-fated attempts to make it work). This thinking seriously crippled me when I was trying to craft a GUI for a custom console media player I was developing as a hobby many years ago.

    I’m looking around at what I have open on my Windows 7 desktop right now. Google Chrome browser, Apple iTunes, Adobe Photoshop Elements, and VMware Player are 4 programs which all seem to have their own skins. Maybe Winamp doesn’t look so out of place these days.

  • "Cannot read property 'url' of undefined" even though it's already defined

    28 novembre 2020, par Levi Stancz

    I'm making a Discord music Bot and I'm having trouble with an error saying

    


    TypeError: Cannot read property 'url' of undefined


    


    I tried console logging it and it showed me the url, so I don't understand what is the problem with my code.

    


    Here's my code :

    


    //musicBOT
const Discord = require('discord.js');
const client = new Discord.Client();
const ytdl = require('ytdl-core');
const mcPrefix = '.';

const queue = new Map();

client.on('ready', () => console.log('Music bot ready!'));

client.on('message', async message => {
    if(message.author.bot) return;
    if(!message.content.startsWith(mcPrefix)) return;

    const args = message.content.substring(mcPrefix.length).split(" ");
    const serverQueue = queue.get(message.guild.id);

    if(message.content.startsWith(`${mcPrefix}play`)) {

        const voiceChannel = message.member.voice.channel;
        if(!voiceChannel) return message.channel.send("Hang-szobában kell lenned zenelejátszáshoz.");
        const permissions = voiceChannel.permissionsFor(message.client.user);
        if(!permissions.has('CONNECT')) return message.channel.send("Nincs jogosultságom csatlakozni a hangszobához.");
        if(!permissions.has('SPEAK')) return message.channel.send("Nincs jogosultságom megszólalni ebben a hangszobában.");

        const songInfo = await ytdl.getInfo(args[1])
        const song = {
            title: songInfo.title,
            url: songInfo.videoDetails.video_url
        }

        if(!serverQueue) {
            const queueConstruct = {
                textChannel: message.channel,
                voiceChannel: voiceChannel,
                connection: null,
                songs: [],
                volume: 5,
                playing: true
            }
            queue.set(message.guild.id, queueConstruct)

            queueConstruct.songs.push(song)

            try{
                var connection = await voiceChannel.join();
                message.channel.send(`${song.title} lejátszása.`)
                queueConstruct.connection = connection
                play(message.guild, queueConstruct.songs[0])
            }catch(e){
                console.log(`Hiba csatlakozás közben itt: ${e}`);
                queue.delete(message.guild.id)
                return message.channel.send(`Hiba volt a csatlakozás közben itt: ${e}`)
            }
        } else{
            serverQueue.songs.push(song)
            return message.channel.send(`**${song.title}** hozzáadva a lejátszási listához.`)
        }
        return undefined
        

        
    }else if (message.content.startsWith(`${mcPrefix}stop`)) {
        if(!message.member.voice.channel) return message.channel.send("Hang-szobában kell lenned ahhoz, hogy leállítsd a zenét.")
        if(!serverQueue) return message.channel.send("There is nothing playing")
        serverQueue.songs= []
        serverQueue.connection.dispatcher.end()
        message.channel.send("Sikeresen megálltottad a zenét.")
        return undefined
    }else if(message.content.startsWith(`${mcPrefix}skip`)){
        if(!message.member.voice.channel) return message.channel.send("Hang-szobában kell lenned a skip parancshoz.")
        if(!serverQueue) return message.channel.send("There is nothing playing")
        serverQueue.connection.dispatcher.end()
        message.channel.send("Zene továbbléptetve.")
        message.channel.send(`${song.title} játszása.`)
        
        return undefined
    }

    function play(guild, song) {
        const serverQueue = queue.get(guild.id)
    
        if(!serverQueue.songs){
            serverQueue.voiceChannel.leave()
            queue.delete(guild.id)
            return
        }
    
        const dispatcher = serverQueue.connection.play(ytdl(song.url))
            .on('finish', () => {
                serverQueue.songs.shift()
                play(guild, serverQueue.songs[0])
            })
            .on('error', error => {
                console.log(error)
            })
            dispatcher.setVolumeLogarithmic(serverQueue.volume / 5)
    }

})
//musicBOT


    


    and here is the full error :

    


    const dispatcher = serverQueue.connection.play(ytdl(songInfo.url))&#xA;                                                                     ^&#xA;TypeError: Cannot read property &#x27;url&#x27; of undefined&#xA;    at play (C:\Users\Levi\Desktop\Discord BOT Javascript\bot.js:97:70)&#xA;    at StreamDispatcher.<anonymous> (C:\Users\Levi\Desktop\Discord BOT Javascript\bot.js:100:17)&#xA;    at StreamDispatcher.emit (node:events:388:22)&#xA;    at finish (node:internal/streams/writable:734:10)&#xA;    at processTicksAndRejections (node:internal/process/task_queues:80:21)&#xA;</anonymous>

    &#xA;

    I started searching on the internet but found nothing about it, I guess my basic javascript knowledge is just not enough.

    &#xA;

  • php video upload and ffmpeg won't create a thumbnail

    18 mai 2020, par Azzo

    I am trying to make a video upload feature for my project. But I have a problem with ffmpeg section. ffmpeg is already installed on my server. But i can not get any thumbnail. I have try to create thumbnail using the following code :

    &#xA;&#xA;

    $videoa = exec("/usr/bin/ffmpeg  -i $videoUrlp.flv -f flv -s 650x390 $videoUrlp.mp4 2>&amp;1");&#xA;$videob = exec("/usr/bin/ffmpeg  -i $videoUrlp.mp4 -vcodec png -ss 00:00:5 -s 650x390 -vframes 1 -an -f rawvideo $videoUrlp.png");&#xA;

    &#xA;&#xA;

    But i ge this when use var_dump(); for var_dump($videoa); and var_dump($videob);

    &#xA;&#xA;

    &#xA;

    string(74) "https://mywebsite.com/uploads/video/ey1kXNew_video.flv :&#xA; Input/output error" string(0) ""

    &#xA;

    &#xA;&#xA;

    Also if i use the shell_exec like this :

    &#xA;&#xA;

    $videoa = shell_exec("/usr/bin/ffmpeg  -i $videoUrlp.flv -f flv -s 650x390 $videoUrlp.mp4");&#xA;$videob = shell_exec("/usr/bin/ffmpeg  -i $videoUrlp.mp4 -vcodec png -ss 00:00:5 -s 650x390 -vframes 1 -an -f rawvideo $videoUrlp.png");&#xA;

    &#xA;&#xA;

    and the var_dumps() giving me NULL NULL.

    &#xA;&#xA;

    Please help me where am I wrong.

    &#xA;&#xA;

    And here is my full video upload code :

    &#xA;&#xA;

    $valid_formats = array("mp4","MP4","flv");&#xA;            if(isset($_POST) and $_SERVER[&#x27;REQUEST_METHOD&#x27;] == "POST") {&#xA;               $name = $_FILES[&#x27;uploading&#x27;][&#x27;name&#x27;];&#xA;               $size = $_FILES[&#x27;uploading&#x27;][&#x27;size&#x27;];&#xA;               if(strlen($name)) {&#xA;                   $ext = strtolower(pathinfo($name, PATHINFO_EXTENSION)); &#xA;                   $name = alphaID(microtime(true) * 10000).&#x27;_video&#x27;;&#xA;                   if(in_array($ext,$valid_formats)) {&#xA;                   if($size&lt;(50024*50024)) {&#xA;                      $GetVideoName = $name;&#xA;                      $video_ext=$ext;&#xA;                       $tmp = $_FILES[&#x27;uploading&#x27;][&#x27;tmp_name&#x27;];&#xA;                       if(move_uploaded_file($tmp, $videoPath.$GetVideoName.&#x27;.&#x27;.$video_ext)) {&#xA;                           $videoUrlp = $base_url.&#x27;uploads/video/&#x27;.$GetVideoName;&#xA;                           $videoa = exec("/usr/bin/ffmpeg  -i $videoUrlp.flv -f flv -s 650x390 $videoUrlp.mp4 2>&amp;1");&#xA;                           $videob = exec("/usr/bin/ffmpeg  -i $videoUrlp.mp4 -vcodec png -ss 00:00:5 -s 650x390 -vframes 1 -an -f rawvideo $videoUrlp.png");&#xA;                           echo var_dump($videoa);&#xA;                           echo var_dump($videob);&#xA;&#xA;                        } else {&#xA;                            echo "Fail upload folder with read access.";&#xA;                        }&#xA;                     } else&#xA;                        echo "Image file size max 1 MB";                    &#xA;                     } else&#xA;                        echo "invalidvieo"; &#xA;                 } else&#xA;                    echo "Please select image..!";&#xA;                 exit;&#xA;              }&#xA;

    &#xA;&#xA;

    I have tested also like this way :

    &#xA;&#xA;

    echo exec("/usr/bin/ffmpeg -i $videoUrlp.flv -ar 22050 -ab 32 -f flv -s 780x400 $videoUrlp.$video_ext");&#xA;echo exec("/usr/bin/ffmpeg -i $videoUrlp.$video_ext -deinterlace -an -ss 1 -t 00:00:05 -r 1 -y -vcodec mjpeg -f mjpeg $videoUrlp.png 2>&amp;1");&#xA;

    &#xA;&#xA;

    and I see the following echo

    &#xA;&#xA;

    video:71kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

    &#xA;&#xA;

    and another try then I get this note : https://mywebsite.com/uploads/video/1547892356_video.flv : Connection refused

    &#xA;&#xA;

    echo exec("/usr/bin/ffmpeg -i $videoUrlp.flv -ar 22050 -ab 32 -f flv -s 780x400 $videoUrlp.$video_ext");&#xA;echo exec("/usr/bin/ffmpeg -i $videoUrlp.$video_ext -deinterlace -an -ss 1 -t 00:00:05 -r 1 -y -vcodec mjpeg -f mjpeg $videoUrlp.png 2>&amp;1");&#xA;

    &#xA;&#xA;

    Here is last shell_exec Output :

    &#xA;&#xA;

     $local = &#x27;https://website.com/uploads/video/&#x27;.$GetVideoName.&#x27;.&#x27;.$video_ext;&#xA; $localTumb = &#x27;https://website.com/uploads/video/&#x27;.$GetVideoName.&#x27;.png&#x27;;&#xA; echo shell_exec("/usr/bin/ffmpeg -i $local -deinterlace -an -ss 1 -t 00:00:05 -r 1 -y -vcodec mjpeg -f mjpeg $localTumb 2>&amp;1");    &#xA;

    &#xA;&#xA;

    &#xA;

    ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)&#xA; configuration : —prefix=/usr —bindir=/usr/bin
    &#xA; —datadir=/usr/share/ffmpeg —incdir=/usr/include/ffmpeg —libdir=/usr/lib64 —mandir=/usr/share/man —arch=x86_64 —optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong —param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' —extra-ldflags='-Wl,-z,relro ' —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libvo-amrwbenc —enable-version3 —enable-bzlib —disable-crystalhd —enable-gnutls —enable-ladspa —enable-libass —enable-libcdio —enable-libdc1394 —enable-libfdk-aac —enable-nonfree —disable-indev=jack —enable-libfreetype —enable-libgsm —enable-libmp3lame —enable-openal —enable-libopenjpeg —enable-libopus —enable-libpulse —enable-libschroedinger —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libvorbis —enable-libv4l2 —enable-libx264 —enable-libx265 —enable-libxvid —enable-x11grab —enable-avfilter —enable-avresample —enable-postproc —enable-pthreads —disable-static —enable-shared —enable-gpl —disable-debug —disable-stripping —shlibdir=/usr/lib64 —enable-runtime-cpudetect libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56.&#xA; 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://website.com/uploads/video/e0J6HwtK_video.mp4' : Metadata :&#xA; major_brand : mp42 minor_version : 0 compatible_brands : isommp42&#xA; creation_time : 2018-01-01 12:09:49 Duration : 00:00:41.49, start :&#xA; 0.000000, bitrate : 230 kb/s Stream #0:0(und) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 240x360 [SAR 1:1 DAR 2:3], 158&#xA; kb/s, 9.73 fps, 9.73 tbr, 19462 tbn, 19.46 tbc (default) Metadata :&#xA; handler_name : VideoHandler Stream #0:1(und) : Audio : aac (LC) (mp4a /&#xA; 0x6134706D), 44100 Hz, mono, fltp, 71 kb/s (default) Metadata :&#xA; creation_time : 2018-01-01 12:09:49 handler_name : IsoMedia File&#xA; Produced by Google, 5-11-2011 [swscaler @ 0xc8c580] deprecated pixel&#xA; format used, make sure you did set range correctly Output #0, mjpeg,&#xA; to 'https://website.com/uploads/video/e0J6HwtK_video.png' : Metadata :&#xA; major_brand : mp42 minor_version : 0 compatible_brands : isommp42&#xA; encoder : Lavf56.40.101 Stream #0:0(und) : Video : mjpeg, yuvj420p(pc),&#xA; 240x360 [SAR 1:1 DAR 2:3], q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc&#xA; (default) Metadata : handler_name : VideoHandler encoder :&#xA; Lavc56.60.100 mjpeg Stream mapping : Stream #0:0 -> #0:0 (h264 (native)&#xA; -> mjpeg (native)) Press [q] to stop, [?] for help frame= 5 fps=0.0 q=1.6 Lsize= 100kB time=00:00:05.00 bitrate= 163.9kbits/s dup=0&#xA; drop=32 video:100kB audio:0kB subtitle:0kB other streams:0kB global&#xA; headers:0kB muxing overhead : 0.000000%

    &#xA;

    &#xA;