Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (62)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (5481)

  • opencv cannot read MP4 file from sony camcorder

    7 juin 2016, par Jundong

    The sony camcorder recorded video in MP4 format. I am reading the file by

    import cv2
    vid = cv2.VideoCapture('sample.MP4')

    my OpenCV version is 2.4.8, as a Python module.

    The codec of the ’sample.MP4’ is H.264, Linear PCM.

    ffprobe sample.MP4

    returns :

    > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C0004.mp4':   Metadata:
    >     major_brand     : XAVC
    >     minor_version   : 16785407
    >     compatible_brands: XAVCmp42iso2
    >     creation_time   : 2016-06-06 13:41:51   Duration: 00:00:15.02, start: 0.000000, bitrate: 50439 kb/s
    >     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/iec61966-2-4), 1920x1080 [SAR 1:1 DAR 16:9],
    > 48655 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    >     Metadata:
    >       creation_time   : 2016-06-06 13:41:51
    >       handler_name    : Video Media Handler
    >       encoder         : AVC Coding
    >     Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    >     Metadata:
    >       creation_time   : 2016-06-06 13:41:51
    >       handler_name    : Sound Media Handler
    >     Stream #0:2(und): Data: none (rtmd / 0x646D7472), 245 kb/s (default)
    >     Metadata:
    >       creation_time   : 2016-06-06 13:41:51
    >       handler_name    : Timed Metadata Media Handler
    > Unsupported codec with id 0 for input stream 2

    It seems that the codec for h.264 is missing. The version of my FFmpeg is 3.0.

    I tried avconv -i sample.MP4 -c:a copy -c:v copy sample_converted.mp4 to convert the sample.MP4 to sample_converted.mp4, this command line did not work. The command ffmpeg -i sample.mp4 sample_converted.mp4 worked ; however, it compromised the video quality badly.I used an online video converter : http://www.online-convert.com/ (which output nice quality video in mp4 format, but it has size limitation for free users)
    to convert the MP4 to mp4, the command in Terminal as below :

    ffprobe 'sample_converted.mp4'

    returns

    > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C0001_converted.mp4':  
    > Metadata:
    >     major_brand     : isom
    >     minor_version   : 512
    >     compatible_brands: isomiso2avc1mp41
    >     encoder         : Lavf57.36.100   Duration: 00:00:02.02, start: 0.000000, bitrate: 16777 kb/s
    >     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 16801 kb/s, 59.94
    > fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
    >     Metadata:
    >       handler_name    : VideoHandler
    >     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    >     Metadata:
    >       handler_name    : SoundHandler

    Obviously, the encoders, handler_names etc. of the sample.MP4 and sample_converted.mp4 are different. Any idea using FFmpeg or OpenCV to convert this raw video from camcorder to the readable format without compromising the video quality ?

  • How can I make sure trimming in ffmpeg with -c:v copy is accurate

    9 avril 2020, par Angelo

    I looked at many things online and I understand it's better to re-encode if you want precision.

    



    But for instance, I have the following command :

    



    -ss 00:00:09 -i "input.mp4" -c:v copy -c:a copy -vframes 600 "output.mp4


    



    Where 600 is calculated using the video's FPS and duration, in this case 10 seconds from an 60FPS video. Can I expect to get something accurate with this all the time ? I tested many variants but this seems to be doing ok for the couple videos I tested for.. And if not, can I really ever get complete ACCURACY with copying, or must I stick to H264 for instance ?

    


  • DiscordJS Music Bot Connects and Then Immediately Disconnects From Voice Channel

    23 janvier 2020, par კΙбthebraɨɴs

    I see that questions similar to this one have been asked, and after following their solutions I still end up the same as I started. Below I have listed my code, a link to test it with a sample bot I created, and the modules you will need to test it using a self-hosted instance.

    My problem is that upon connecting to the specified voice channel, the bot immediately leaves afterwards without any signs of errors or exceptions. I’m not sure if it is a problem with my code, or with one of the libraries I am using. The only console output I receive is as follows :

    Bot Ready For Use
    joined channel
    left channel

    Thanks !

    My Code

    var voiceChannel = message.member.voiceChannel;

    if (!message.member.voiceChannel) return message.channel.send(`You do realize you have to be in a voice channel to do that, right ${message.author.username}?`)

    if (!message.member.voiceConnection) voiceChannel.join().then(async connection => {

       let streamURL = args.slice(1).join(" ")
       let streamTitle = "";
       let streamThumb = "";
       let streamAuth = "";
       let streamAuthThumb = "";

       if (streamURL.includes("https://www.youtube.com") || streamURL.includes("https://youtu.be/") && !streamURL.includes(' ')) {
           let results = await youtube.getVideo(streamURL)

           let {
               body
           } = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&id=${results.channel.id}&fields=items%2Fsnippet%2Fthumbnails&key=${ytapikey}`).query({
               limit: 800
           })

           streamTitle = results.title
           streamThumb = results.thumbnails.medium.url
           streamAuth = results.channel.title
           streamAuthThumb = body.items[0].snippet.thumbnails.medium.url

       } else if (!streamURL.includes("https://www.youtube.com") || !streamURL.includes("https://youtu.be/")) {

           let results = await youtube.searchVideos(streamURL)

           let {
               body
           } = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&id=${results[0].channel.id}&fields=items%2Fsnippet%2Fthumbnails&key=${ytapikey}`).query({
               limit: 800
           })

           streamURL = results[0].url
           streamTitle = results[0].title
           streamThumb = results[0].thumbnails.medium.url
           streamAuth = results[0].channel.title
           streamAuthThumb = body.items[0].snippet.thumbnails.medium.url

       } else {
           return message.reply("I can only play videos from YouTube (#NotSponsored).")
       }

       console.log("joined channel");
       const stream = ytdl('https://www.youtube.com/watch?v=gOMhN-hfMtY', {
           filter: 'audioonly'
       });
       const dispatcher = connection.playStream(stream, {
           seek: 0,
           volume: 1
       });
       dispatcher.on("end", end => {
           console.log("left channel");
           voiceChannel.leave();
       });

       let musicEmbed = new Discord.RichEmbed()
           .setAuthor(streamAuth, streamAuthThumb)
           .setTitle(`Now Playing:`)
           .addField(`${streamAuth}`, `${streamTitle}`)
           .setImage(streamThumb)
           .setColor(embedRed)
           .setFooter(`${streamAuth} - ${streamTitle} (${streamURL}`)

       message.channel.send(musicEmbed)

    }).catch(console.error);
    break

    List of Modules

    discord.js
    simple-youtube-api
    node-opus
    ffmpeg
    ffbinaries
    ffmpeg-binaries
    opusscript
    snekfetch
    node-fetch
    ytdl-core

    Click here to use my sample bot through repl.it.

    Thanks Again !