Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (68)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (14302)

  • ffmpeg separate images from %3.png format

    15 juillet 2020, par Alexander Wilkinson

    I want to feed an input -i input%3.png into a filter graph and then use those inputs in a -filter_complex like I normally would with [x:v] or [0:v:x] where x is the index. Both of those don't work, throwing errors like Invalid file index 1 in filtergraph description or stream specifier :v:1 in ... matches no stream

    


    Edit : The log and command, as requested.
ffmpeg -i background.mkv -i comment%3d.png -filter_complex_script filter_complex.txt background-comments.mkv
The filter graph is shown in full below in the error message, but the gist is :
[0:v][1:v] overlay=0:0:enable='background(t,0,1)' [tmp0]; [tmp0][2:v] overlay=0:0:enable='background(t,1,2)' [tmp1]; [tmp1] ...

    


      built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 50.100 / 56. 50.100
  libavcodec     58. 90.100 / 58. 90.100
  libavformat    58. 44.100 / 58. 44.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 84.100 /  7. 84.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Background\background.mkv':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
    creation_time   : 2020-07-14T15:38:36.000000Z
  Duration: 00:01:42.49, start: 0.000000, bitrate: 17469 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 17355 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2020-07-14T15:38:36.000000Z
      handler_name    : VideoHandler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 117 kb/s (default)
    Metadata:
      creation_time   : 2020-07-14T15:38:36.000000Z
      handler_name    : SoundHandler
Input #1, image2, from 'Working\comment%3d.png':
  Duration: 00:00:03.56, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: png, rgba(pc), 1920x1080, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream specifier ':v:1' in filtergraph description [0:v][1:v:1] overlay=0:0:enable='between(t,0,4.464)' [tmp0]; [tmp0][1:v:2] overlay=0:0:enable='between(t,4.464,6.456)' [tmp1]; [tmp1][1:v:3] overlay=0:0:enable='between(t,6.456,12.120000000000001)' [tmp2]; [tmp2][1:v:4] overlay=0:0:enable='between(t,12.120000000000001,15.96)' [tmp3]; [tmp3][1:v:5] overlay=0:0:enable='between(t,15.96,22.224)' [tmp4]; [tmp4][1:v:6] overlay=0:0:enable='between(t,22.224,30.096)' [tmp5]; [tmp5][1:v:7] overlay=0:0:enable='between(t,30.096,36.264)' [tmp6]; [tmp6][1:v:8] overlay=0:0:enable='between(t,36.264,44.80800000000001)' [tmp7]; [tmp7][1:v:9] overlay=0:0:enable='between(t,44.80800000000001,51.864000000000004)' [tmp8]; [tmp8][1:v:10] overlay=0:0:enable='between(t,51.864000000000004,55.776)' [tmp9]; [tmp9][1:v:11] overlay=0:0:enable='between(t,55.776,61.008)' [tmp10]; [tmp10][1:v:12] overlay=0:0:enable='between(t,61.008,66.24000000000001)' [tmp11]; [tmp11][1:v:13] overlay=0:0:enable='between(t,66.24000000000001,73.34400000000001)' [tmp12]; [tmp12][1:v:14] overlay=0:0:enable='between(t,73.34400000000001,84.888)' [tmp13]; [tmp13][1:v:15] overlay=0:0:enable='between(t,84.888,89.52000000000001)' [tmp14]; [tmp14][1:v:16] overlay=0:0:enable='between(t,89.52000000000001,99.04800000000002)' [tmp15]; [tmp15][1:v:17] overlay=0:0:enable='between(t,99.04800000000002,104.97600000000001)' [tmp16]; [tmp16][1:v:18] overlay=0:0:enable='between(t,104.97600000000001,112.53600000000002)' [tmp17]; [tmp17][1:v:19] overlay=0:0:enable='between(t,112.53600000000002,116.49600000000001)' [tmp18]; [tmp18][1:v:20] overlay=0:0:enable='between(t,116.49600000000001,121.2)' [tmp19]; [tmp19][1:v:21] overlay=0:0:enable='between(t,121.2,121.92)' [tmp20]; [tmp20][1:v:22] overlay=0:0:enable='between(t,121.92,126.768)' [tmp21]; [tmp21][1:v:23] overlay=0:0:enable='between(t,126.768,134.976)' [tmp22]; [tmp22][1:v:24] overlay=0:0:enable='between(t,134.976,137.328)' [tmp23]; [tmp23][1:v:25] overlay=0:0:enable='between(t,137.328,145.68)' [tmp24]; [tmp24][1:v:26] overlay=0:0:enable='between(t,145.68,152.376)' [tmp25]; [tmp25][1:v:27] overlay=0:0:enable='between(t,152.376,158.544)' [tmp26]; [tmp26][1:v:28] overlay=0:0:enable='between(t,158.544,165.38400000000001)' [tmp27]; [tmp27][1:v:29] overlay=0:0:enable='between(t,165.38400000000001,166.22400000000002)' [tmp28]; [tmp28][1:v:30] overlay=0:0:enable='between(t,166.22400000000002,166.94400000000002)' [tmp29]; [tmp29][1:v:31] overlay=0:0:enable='between(t,166.94400000000002,167.85600000000002)' [tmp30]; [tmp30][1:v:32] overlay=0:0:enable='between(t,167.85600000000002,173.23200000000003)' [tmp31]; [tmp31][1:v:33] overlay=0:0:enable='between(t,173.23200000000003,178.72800000000004)' [tmp32]; [tmp32][1:v:34] overlay=0:0:enable='between(t,178.72800000000004,185.18400000000003)' [tmp33]; [tmp33][1:v:35] overlay=0:0:enable='between(t,185.18400000000003,186.00000000000003)' [tmp34]; [tmp34][1:v:36] overlay=0:0:enable='between(t,186.00000000000003,191.73600000000002)' [tmp35]; [tmp35][1:v:37] overlay=0:0:enable='between(t,191.73600000000002,196.39200000000002)' [tmp36]; [tmp36][1:v:38] overlay=0:0:enable='between(t,196.39200000000002,200.88000000000002)' [tmp37]; [tmp37][1:v:39] overlay=0:0:enable='between(t,200.88000000000002,203.64000000000001)' [tmp38]; [tmp38][1:v:40] overlay=0:0:enable='between(t,203.64000000000001,204.36)' [tmp39]; [tmp39][1:v:41] overlay=0:0:enable='between(t,204.36,209.328)' [tmp40]; [tmp40][1:v:42] overlay=0:0:enable='between(t,209.328,210.168)' [tmp41]; [tmp41][1:v:43] overlay=0:0:enable='between(t,210.168,210.888)' [tmp42]; [tmp42][1:v:44] overlay=0:0:enable='between(t,210.888,213.48000000000002)' [tmp43]; [tmp43][1:v:45] overlay=0:0:enable='between(t,213.48000000000002,214.20000000000002)' [tmp44]; [tmp44][1:v:46] overlay=0:0:enable='between(t,214.20000000000002,218.376)' [tmp45]; [tmp45][1:v:47] overlay=0:0:enable='between(t,218.376,220.704)' [tmp46]; [tmp46][1:v:48] overlay=0:0:enable='between(t,220.704,222.84)' [tmp47]; [tmp47][1:v:49] overlay=0:0:enable='between(t,222.84,226.992)' [tmp48]; [tmp48][1:v:50] overlay=0:0:enable='between(t,226.992,227.832)' [tmp49]; [tmp49][1:v:51] overlay=0:0:enable='between(t,227.832,231.28799999999998)' [tmp50]; [tmp50][1:v:52] overlay=0:0:enable='between(t,231.28799999999998,233.04)' [tmp51]; [tmp51][1:v:53] overlay=0:0:enable='between(t,233.04,234.26399999999998)' [tmp52]; [tmp52][1:v:54] overlay=0:0:enable='between(t,234.26399999999998,234.98399999999998)' [tmp53]; [tmp53][1:v:55] overlay=0:0:enable='between(t,234.98399999999998,237.04799999999997)' [tmp54]; [tmp54][1:v:56] overlay=0:0:enable='between(t,237.04799999999997,237.88799999999998)' [tmp55]; [tmp55][1:v:57] overlay=0:0:enable='between(t,237.88799999999998,238.60799999999998)' [tmp56]; [tmp56][1:v:58] overlay=0:0:enable='between(t,238.60799999999998,244.99199999999996)' [tmp57]; [tmp57][1:v:59] overlay=0:0:enable='between(t,244.99199999999996,247.19999999999996)' [tmp58]; [tmp58][1:v:60] overlay=0:0:enable='between(t,247.19999999999996,251.56799999999996)' [tmp59]; [tmp59][1:v:61] overlay=0:0:enable='between(t,251.56799999999996,253.87199999999996)' [tmp60]; [tmp60][1:v:62] overlay=0:0:enable='between(t,253.87199999999996,254.59199999999996)' [tmp61]; [tmp61][1:v:63] overlay=0:0:enable='between(t,254.59199999999996,255.76799999999994)' [tmp62]; [tmp62][1:v:64] overlay=0:0:enable='between(t,255.76799999999994,258.21599999999995)' [tmp63]; [tmp63][1:v:65] overlay=0:0:enable='between(t,258.21599999999995,259.0559999999999)' [tmp64]; [tmp64][1:v:66] overlay=0:0:enable='between(t,259.0559999999999,259.77599999999995)' [tmp65]; [tmp65][1:v:67] overlay=0:0:enable='between(t,259.77599999999995,266.352)' [tmp66]; [tmp66][1:v:68] overlay=0:0:enable='between(t,266.352,268.008)' [tmp67]; [tmp67][1:v:69] overlay=0:0:enable='between(t,268.008,270.69599999999997)' [tmp68]; [tmp68][1:v:70] overlay=0:0:enable='between(t,270.69599999999997,276.74399999999997)' [tmp69]; [tmp69][1:v:71] overlay=0:0:enable='between(t,276.74399999999997,277.58399999999995)' [tmp70]; [tmp70][1:v:72] overlay=0:0:enable='between(t,277.58399999999995,278.304)' [tmp71]; [tmp71][1:v:73] overlay=0:0:enable='between(t,278.304,279.43199999999996)' [tmp72]; [tmp72][1:v:74] overlay=0:0:enable='between(t,279.43199999999996,282.50399999999996)' [tmp73]; [tmp73][1:v:75] overlay=0:0:enable='between(t,282.50399999999996,283.34399999999994)' [tmp74]; [tmp74][1:v:76] overlay=0:0:enable='between(t,283.34399999999994,284.06399999999996)' [tmp75]; [tmp75][1:v:77] overlay=0:0:enable='between(t,284.06399999999996,285.19199999999995)' [tmp76]; [tmp76][1:v:78] overlay=0:0:enable='between(t,285.19199999999995,287.376)' [tmp77]; [tmp77][1:v:79] overlay=0:0:enable='between(t,287.376,292.008)' [tmp78]; [tmp78][1:v:80] overlay=0:0:enable='between(t,292.008,297.47999999999996)' [tmp79]; [tmp79][1:v:81] overlay=0:0:enable='between(t,297.47999999999996,298.84799999999996)' [tmp80]; [tmp80][1:v:82] overlay=0:0:enable='between(t,298.84799999999996,302.544)' [tmp81]; [tmp81][1:v:83] overlay=0:0:enable='between(t,302.544,303.38399999999996)' [tmp82]; [tmp82][1:v:84] overlay=0:0:enable='between(t,303.38399999999996,304.104)' [tmp83]; [tmp83][1:v:85] overlay=0:0:enable='between(t,304.104,309.47999999999996)' [tmp84]; [tmp84][1:v:86] overlay=0:0:enable='between(t,309.47999999999996,312.47999999999996)' [tmp85]; [tmp85][1:v:87] overlay=0:0:enable='between(t,312.47999999999996,318.62399999999997)' [tmp86]; [tmp86][1:v:88] overlay=0:0:enable='between(t,318.62399999999997,323.688)' [tmp87]; [tmp87][1:v:89] overlay=0:0:enable='between(t,323.688,325.392)' matches no streams.```


    


  • How to get frames from HDR video in scRGB color space ?

    5 mars 2018, par Виталий Синявский

    I want to create a simple video player that will show HDR video on HDR TV. For example, this "LG Chess HDR" video. It is encoded with HEVC, its bit depth is 10 bit, pixel format is YUV420P10LE and it has metadata abount BT2020 color space and PQ transfer function.

    In this NVIDIA article I found the next :

    The display driver takes the scRGB back buffer, and converts it to the
    standard expected by the display presently connected. In general, this
    means converting the color space from sRGB primaries to BT. 2020
    primaries, scaling to an appropriate level, and encoding with a
    mechanism like PQ. Also, possibly performing conversions like RGB to
    YCC if that display connection requires it.

    It means that my player should render pixels in the scRGB color space (linear encoding, sRGB primaries, full range is -0.5 through just less than +7.5). So I need to get frames from the source video in this color space somehow, preferably in FP16 pixel format (half float, 16 bits per one color channel). I come to the following simple pipeline to render videos to HDR :

    source HDR video in BT2020 color space with applied PQ -> [some video library] ->
    -> video frames with colors in scRGB color space -> [my program] ->
    -> rendered video on HDR TV with applied conversions by display driver

    I’m trying to use FFmpeg as this library and do not understand how to get frames from the source HDR video in scRGB color space.

    I use sws_scale FFmpeg method now to get frames and know about filters API. But I did not found any information and help about how to transparantly get frames in scRGB using these functionality without parsing metadata for all source videos and create custom video filters for them.

    Please, tell me what I can do to get frames in the scRGB color space using FFmpeg. Can someone tell other libraries with which I can do it ?

  • What am I doing wrong ? Tweepy with ffmpeg

    27 août 2020, par pigeonburger

    I'm trying to get this code to pull the media from any tweet that mentions my twitter handle, convert it using ffmpeg via the subprocess module, then send the converted media back to the person as a reply ? Is this all correct ?


    I am also getting an error at tweet_media = clean_data['entities']['media']['media_url'] and I don't understand what I'm doing wrong there (Exception has occurred : TypeError
list indices must be integers or slices, not str
line 32, in on_data
tweet_media = clean_data['entities']['media']['media_url'])

    


    Also is there a better way to use ffmpeg with python that I am not aware of ?

    


    Here is the code I wrote that I'm trying to use :

    


    import tweepy
from tweepy import Stream
from tweepy.streaming import StreamListener
from datetime import datetime
import time
import subprocess

stdout = subprocess.PIPE
def runcmd(cmd):
    x = subprocess.Popen(cmd, stdout=subprocess.PIPE)
    return x.communicate(stdout)

print(" TWITTER BOT")
time.sleep(1.5)
print(" By PigeonBurger, updated 26 August 2020 \n")

import json
import random

class StdOutListener(StreamListener):
    def on_data(self, data):
        clean_data = json.loads(data)
        tweetId = clean_data['id']
        tweet_name = clean_data['user']['screen_name']
        tweet_media = clean_data['entities']['media']['media_url']
        tweet_photo = runcmd('ffmpeg -i tweet_media output.jpg')
        print(clean_data)
        tweet = 'Here ya go'
        now = datetime.now()
        dt_string = now.strftime("%d/%m/%Y %H:%M:%S")
        print(' Reply sent to @'+tweet_name, 'on', dt_string, '\n' ' Message:', tweet, '\n')
        respondToTweet(tweet_photo, tweet, tweetId)

def setUpAuth():
    auth = tweepy.OAuthHandler("consumer_key", "consumer_secret")
    auth.set_access_token("access_token", "access_token_secret")
    api = tweepy.API(auth)
    return api, auth

def followStream():
    api, auth = setUpAuth()
    listener = StdOutListener()
    stream = Stream(auth, listener)
    stream.filter(track=["@YOUR_TWITTER_HANDLE"], is_async=True)

def respondToTweet(tweet_photo, tweet, tweetId):
    api, auth = setUpAuth()
    api.update_with_media(tweet_photo, tweet, in_reply_to_status_id=tweetId, auto_populate_reply_metadata=True, stall_warnings=True)

if __name__ == "__main__":
    followStream()