Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (99)

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

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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (7575)

  • dnn_backend_native_layer_mathunary : add atanh support

    29 juin 2020, par Ting Fu
    dnn_backend_native_layer_mathunary : add atanh support
    

    It can be tested with the model generated with below python script :

    import tensorflow as tf
    import numpy as np
    import imageio

    in_img = imageio.imread('input.jpeg')
    in_img = in_img.astype(np.float32)/255.0
    in_data = in_img[np.newaxis, :]

    x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')

    please uncomment the part you want to test

    x_sinh_1 = tf.sinh(x)
    x_out = tf.divide(x_sinh_1, 1.176) # sinh(1.0)

    x_cosh_1 = tf.cosh(x)
    x_out = tf.divide(x_cosh_1, 1.55) # cosh(1.0)

    x_tanh_1 = tf.tanh(x)
    x__out = tf.divide(x_tanh_1, 0.77) # tanh(1.0)

    x_asinh_1 = tf.asinh(x)
    x_out = tf.divide(x_asinh_1, 0.89) # asinh(1.0/1.1)

    x_acosh_1 = tf.add(x, 1.1)
    x_acosh_2 = tf.acosh(x_acosh_1) # accept (1, inf)
    x_out = tf.divide(x_acosh_2, 1.4) # acosh(2.1)

    x_atanh_1 = tf.divide(x, 1.1)
    x_atanh_2 = tf.atanh(x_atanh_1) # accept (-1, 1)
    x_out = tf.divide(x_atanh_2, 1.55) # atanhh(1.0/1.1)

    y = tf.identity(x_out, name='dnn_out') #please only preserve the x_out you want to test

    sess=tf.Session()
    sess.run(tf.global_variables_initializer())

    graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
    tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False)

    print("image_process.pb generated, please use \
    path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n")

    output = sess.run(y, feed_dict=x : in_data)
    imageio.imsave("out.jpg", np.squeeze(output))

    Signed-off-by : Ting Fu <ting.fu@intel.com>

    • [DH] libavfilter/dnn/dnn_backend_native_layer_mathunary.c
    • [DH] libavfilter/dnn/dnn_backend_native_layer_mathunary.h
    • [DH] tools/python/convert_from_tensorflow.py
    • [DH] tools/python/convert_header.py
  • dnn_backend_native_layer_mathunary : add floor support

    6 août 2020, par Mingyu Yin
    dnn_backend_native_layer_mathunary : add floor support
    

    It can be tested with the model generated with below python script :

    import tensorflow as tf
    import os
    import numpy as np
    import imageio
    from tensorflow.python.framework import graph_util
    name = 'floor'

    pb_file_path = os.getcwd()
    if not os.path.exists(pb_file_path+'/{}_savemodel/'.format(name)) :
    os.mkdir(pb_file_path+'/{}_savemodel/'.format(name))

    with tf.Session(graph=tf.Graph()) as sess :
    in_img = imageio.imread('detection.jpg')
    in_img = in_img.astype(np.float32)
    in_data = in_img[np.newaxis, :]
    input_x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
    y_ = tf.math.floor(input_x*255)/255
    y = tf.identity(y_, name='dnn_out')
    sess.run(tf.global_variables_initializer())
    constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])

    with tf.gfile.FastGFile(pb_file_path+'/{}_savemodel/model.pb'.format(name), mode='wb') as f :
    f.write(constant_graph.SerializeToString())

    print("model.pb generated, please in ffmpeg path use\n \n \
    python tools/python/convert.py {}_savemodel/model.pb —outdir={}_savemodel/ \n \nto generate model.model\n".format(name,name))

    output = sess.run(y, feed_dict= input_x : in_data)
    imageio.imsave("out.jpg", np.squeeze(output))

    print("To verify, please ffmpeg path use\n \n \
    ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.pb:input=dnn_in:output=dnn_out:dnn_backend=tensorflow -f framemd5 {}_savemodel/tensorflow_out.md5\n \
    or\n \
    ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.pb:input=dnn_in:output=dnn_out:dnn_backend=tensorflow {}_savemodel/out_tensorflow.jpg\n \nto generate output result of tensorflow model\n".format(name, name, name, name))

    print("To verify, please ffmpeg path use\n \n \
    ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.model:input=dnn_in:output=dnn_out:dnn_backend=native -f framemd5 {}_savemodel/native_out.md5\n \
    or \n \
    ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.model:input=dnn_in:output=dnn_out:dnn_backend=native {}_savemodel/out_native.jpg\n \nto generate output result of native model\n".format(name, name, name, name))

    Signed-off-by : Mingyu Yin <mingyu.yin@intel.com>

    • [DH] libavfilter/dnn/dnn_backend_native_layer_mathunary.c
    • [DH] libavfilter/dnn/dnn_backend_native_layer_mathunary.h
    • [DH] tests/dnn/dnn-layer-mathunary-test.c
    • [DH] tools/python/convert_from_tensorflow.py
    • [DH] tools/python/convert_header.py
  • Desktop recording with ffmpeg won't play in anything but VLC

    12 mai 2022, par Alex

    I'm creating a desktop application for fun/education. Its primary function is to record my PCs screen and have a pretty UI to play this back. I am recording with ffmpeg like so :

    &#xA;

    ffmpeg -thread_queue_size 1024 -f gdigrab -framerate 50 -video_size 1920x1080 -i desktop -f dshow -i audio="virtual-audio-capturer" -r 50 -preset fast -c:v h264_nvenc -qp 23 "D:/vid.mp4"&#xA;

    &#xA;

    At first glance this seems fine, a file is created and playing it back in VLC media player also works fine.

    &#xA;

    The problem is that I can't play this back in anything else. Windows apps (videos + media player) just freeze up/provide no clue as to the problem. My end goal is to embed this into a HTML5 player to fit with the electron/react framework I'm writing my application in. This also doesn't play in a similar fashion.

    &#xA;

    I ran mediainfo on the file in WSL and got the following :

    &#xA;

    General&#xA;Complete name                            : vid.mp4&#xA;Format                                   : MPEG-4&#xA;Format profile                           : Base Media&#xA;Codec ID                                 : isom (isom/iso2/avc1/mp41)&#xA;File size                                : 544 MiB&#xA;Duration                                 : 1 min 15 s&#xA;Overall bit rate mode                    : Variable&#xA;Overall bit rate                         : 60.4 Mb/s&#xA;Writing application                      : Lavf59.10.100&#xA;&#xA;Video&#xA;ID                                       : 1&#xA;Format                                   : AVC&#xA;Format/Info                              : Advanced Video Codec&#xA;Format profile                           : High 4:4:4 Predictive@L4.2&#xA;Format settings                          : 1 Ref Frames&#xA;Format settings, CABAC                   : No&#xA;Format settings, Reference frames        : 1 frame&#xA;Codec ID                                 : avc1&#xA;Codec ID/Info                            : Advanced Video Coding&#xA;Duration                                 : 1 min 15 s&#xA;Bit rate mode                            : Variable&#xA;Bit rate                                 : 60.3 Mb/s&#xA;Maximum bit rate                         : 2 000 kb/s&#xA;Width                                    : 1 920 pixels&#xA;Height                                   : 1 080 pixels&#xA;Display aspect ratio                     : 16:9&#xA;Frame rate mode                          : Constant&#xA;Frame rate                               : 50.000 FPS&#xA;Color space                              : RGB&#xA;Bit depth                                : 8 bits&#xA;Scan type                                : Progressive&#xA;Bits/(Pixel*Frame)                       : 0.581&#xA;Stream size                              : 543 MiB (100%)&#xA;Color range                              : Full&#xA;Matrix coefficients                      : Identity&#xA;Codec configuration box                  : avcC&#xA;&#xA;Audio&#xA;ID                                       : 2&#xA;Format                                   : AAC LC&#xA;Format/Info                              : Advanced Audio Codec Low Complexity&#xA;Codec ID                                 : mp4a-40-2&#xA;Duration                                 : 1 min 15 s&#xA;Source duration                          : 1 min 15 s&#xA;Bit rate mode                            : Constant&#xA;Bit rate                                 : 132 kb/s&#xA;Channel(s)                               : 2 channels&#xA;Channel layout                           : L R&#xA;Sampling rate                            : 48.0 kHz&#xA;

    &#xA;

    I also saw this thread (ffmpeg created timelapse won’t play on other players than VLC) suggesting the bit rate may be the problem but having tried the suggestions there had no luck.

    &#xA;

    At a glance I suspected the "Codec ID" field as with comparison to other MP4 files that windows does play it is slightly different, i.e. :

    &#xA;

    isom (isom/iso2/avc1/mp41) vs mp42 (mp42/mp41/isom/avc1)

    &#xA;

    However fiddling with the ffmpeg encoder settings I managed to vary this and still could not play the video back.

    &#xA;

    Also including the ffprobe output :

    &#xA;

    ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers&#xA;  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)&#xA;  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;vid.mp4:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf59.10.100&#xA;  Duration: 00:01:15.50, start: 0.000000, bitrate: 60414 kb/s&#xA;    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), gbrp(pc, gbr/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 60277 kb/s, 50 fps, 50 tbr, 12800 tbn, 100 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 132 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;

    &#xA;