Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (102)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

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

  • libavfilter/dnn : determine dnn output during execute_model instead of set_input_output

    25 avril 2019, par Guo, Yejun
    libavfilter/dnn : determine dnn output during execute_model instead of set_input_output
    

    Currently, within interface set_input_output, the dims/memory of the tensorflow
    dnn model output is determined by executing the model with zero input,
    actually, the output dims might vary with different input data for networks
    such as object detection models faster-rcnn, ssd and yolo.

    This patch moves the logic from set_input_output to execute_model which
    is suitable for all the cases. Since interface changed, and so dnn_backend_native
    also changes.

    In vf_sr.c, it knows it's srcnn or espcn by executing the model with zero input,
    so execute_model has to be called in function config_props

    Signed-off-by : Guo, Yejun <yejun.guo@intel.com>
    Signed-off-by : Pedro Arthur <bygrandao@gmail.com>

    • [DH] libavfilter/dnn_backend_native.c
    • [DH] libavfilter/dnn_backend_native.h
    • [DH] libavfilter/dnn_backend_tf.c
    • [DH] libavfilter/dnn_backend_tf.h
    • [DH] libavfilter/dnn_interface.h
    • [DH] libavfilter/vf_sr.c
  • A ffmpeg comman canwork in cmd but not in Python using subprocess.call() or os.system()

    6 juin 2018, par Starrysky

    I wanna transfer a .mp3 to .wav. This is my command :
    ffmpeg -i a.mp3 -ar 16000 -ac 1 -acodec pcm_s16le a.wav

    It worked well in cmd

    C:\Users\starrysky\Documents\GitHub\bing_pic\html>ffmpeg -i a.mp3 -ar 16000 -ac 1 -acodec pcm_s16le a.wav
    ffmpeg version N-86482-gbc40674 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.1.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
     libavutil      55. 66.100 / 55. 66.100
     libavcodec     57. 99.100 / 57. 99.100
     libavformat    57. 73.100 / 57. 73.100
     libavdevice    57.  7.100 / 57.  7.100
     libavfilter     6. 92.100 /  6. 92.100
     libswscale      4.  7.101 /  4.  7.101
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    Input #0, mp3, from 'a.mp3':
     Metadata:
       encoder         : Lavf54.6.100
     Duration: 00:00:01.87, start: 0.000000, bitrate: 8 kb/s
       Stream #0:0: Audio: mp3, 8000 Hz, mono, s16p, 8 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))
    Press [q] to stop, [?] for help
    Output #0, wav, to 'a.wav':
     Metadata:
       ISFT            : Lavf57.73.100
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
       Metadata:
         encoder         : Lavc57.99.100 pcm_s16le
    size=      59kB time=00:00:01.87 bitrate= 256.3kbits/s speed= 187x
    video:0kB audio:58kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.130208%

    but when I moved it into my python program, something strange happened.

    >>> C:\Users\starrysky\Documents\GitHub\bing_pic\html\
    'ffmpeg' �����ڲ����ⲿ���Ҳ���ǿ����еij���
    �����������
    1 Command 'ffmpeg -i a.mp3 -ar 16000 -ac 1 -acodec pcm_s16le a.wav' returned non-zero exit status 1.
    文件错误啊,亲
    [WinError 2] 系统找不到指定的文件。: 'a.wav'

    This is part of my python code :

    @bot.register(wife, RECORDING)
    def translate_sound(msg):
       msg.get_file(save_path='a.mp3')
       path = os.path.abspath('.')+'\\'
       print(path)
       try:
           subprocess.check_call('ffmpeg -i a.mp3 -ar 16000 -ac 1 -acodec pcm_s16le a.wav', shell=True)
           # ''
       except Exception as e:
           print(1, e)
       wav_to_text('a.wav')
       try:
           os.remove('a.wav')
       except Exception as e:
           print(e)

    # 调用百度语音识别API
    def get_token():
       URL = 'http://openapi.baidu.com/oauth/2.0/token'
       _params = urllib.parse.urlencode({'grant_type': b'client_credentials',
                                         'client_id': b''
                                         'client_secret': b''})
       _res = urllib.request.Request(URL, _params.encode())
       _response = urllib.request.urlopen(_res)
       _data = _response.read()
       _data = json.loads(_data)
       return _data['access_token']


    def wav_to_text(wav_file):
       try:
           wav_file = open(wav_file, 'rb')
       except IOError:
           print('文件错误啊,亲')
           return
       wav_file = wave.open(wav_file)
       n_frames = wav_file.getnframes()
       print('n_frames ', n_frames)
       frame_rate = wav_file.getframerate()
       print("frame_rate ", frame_rate)
       if n_frames == 1 or frame_rate not in (8000, 16000):
           print('不符合格式')
           return
       audio = wav_file.readframes(n_frames)
       seconds = n_frames/frame_rate+1
       minute = int(seconds/60 + 1)
       for i in range(0, minute):
           sub_audio = audio[i*60*frame_rate:(i+1)*60*frame_rate]
           base_data = base64.b64encode(sub_audio)
           data = {"format": "wav",
                   "token": get_token(),
                   "len": len(sub_audio),
                   "rate": frame_rate,
                   "speech": base_data.decode(),
                   "cuid": "B8-AC-6F-2D-7A-94",
                   "channel": 1}
           data = json.dumps(data)
           res = urllib.request.Request('http://vop.baidu.com/server_api',
                                 data.encode(),
                                 {'content-type': 'application/json'})
           response = urllib.request.urlopen(res)
           res_data = json.loads(response.read())
           try:
               print(res_data['result'][0])
           except Exception as e:
               print(e)

    What happened ?

  • FFMPEG fails while processing MOV files

    29 septembre 2020, par Tom

    I'm trying to convert video files to DASH format. All videos work great except MOV videos.

    &#xA;

    I'm using the following command :

    &#xA;

    /usr/local/bin/ffmpeg -y -i /path/to/mov/video.mov -c:v libx264 -c:a aac -bf 1 -keyint_min 25 -g 250 -sc_threshold 40 -use_timeline 1 -use_template 1 -init_seg_name &#x27;video_init_$RepresentationID$.$ext$&#x27; -media_seg_name &#x27;video_chunk_$RepresentationID$_$Number%05d$.$ext$&#x27; -seg_duration 10 -hls_playlist 0 -f dash -adaptation_sets -0:s -map 0 -s:v:0 854x480 -b:v:0 750k -strict -2 -threads 12 /output/path/video.mpd&#xA;

    &#xA;

    I get the error :

    &#xA;

      &#xA;
    • Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument ... Error initializing output stream 0:1
    • &#xA;

    &#xA;

    The full command output is :

    &#xA;

    ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;built with Apple clang version 11.0.3 (clang-1103.0.32.62)&#xA;configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack&#xA;libavutil 56. 51.100 / 56. 51.100&#xA;libavcodec 58. 91.100 / 58. 91.100&#xA;libavformat 58. 45.100 / 58. 45.100&#xA;libavdevice 58. 10.100 / 58. 10.100&#xA;libavfilter 7. 85.100 / 7. 85.100&#xA;libavresample 4. 0. 0 / 4. 0. 0&#xA;libswscale 5. 7.100 / 5. 7.100&#xA;libswresample 3. 7.100 / 3. 7.100&#xA;libpostproc 55. 7.100 / 55. 7.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/path/to/file.mov&#x27;:&#xA;Metadata:&#xA;major_brand : qt&#xA;minor_version : 0&#xA;compatible_brands: qt&#xA;creation_time : 2020-09-21T09:45:27.000000Z&#xA;com.apple.quicktime.make: Apple&#xA;com.apple.quicktime.model: iPhone 7&#xA;com.apple.quicktime.software: 13.4.1&#xA;com.apple.quicktime.creationdate: 2020-06-15T11:59:36&#x2B;0200&#xA;com.apple.photos.originating.signature: AXfhZgW4nrUdSusOMUuJRarfxD7R&#xA;Duration: 00:01:13.40, start: 0.000000, bitrate: 10616 kb/s&#xA;Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 96 kb/s (default)&#xA;Metadata:&#xA;creation_time : 2020-09-21T09:45:27.000000Z&#xA;handler_name : Core Media Audio&#xA;Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 10514 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)&#xA;Metadata:&#xA;creation_time : 2020-09-21T09:45:27.000000Z&#xA;handler_name : Core Media Video&#xA;encoder : H.264&#xA;Stream #0:2(und): Data: none (mebx / 0x7862656D) (default)&#xA;Metadata:&#xA;creation_time : 2020-09-21T09:45:27.000000Z&#xA;handler_name : Core Media Metadata&#xA;Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;Metadata:&#xA;creation_time : 2020-09-21T09:45:27.000000Z&#xA;handler_name : Core Media Metadata&#xA;Stream mapping:&#xA;Stream #0:0 -> #0:0 (aac (native) -> aac (native))&#xA;Stream #0:1 -> #0:1 (h264 (native) -> h264 (libx264))&#xA;Stream #0:2 -> #0:2 (copy)&#xA;Stream #0:3 -> #0:3 (copy)&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x7f7f2600e000] using SAR=1280/1281&#xA;[libx264 @ 0x7f7f2600e000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x7f7f2600e000] profile High, level 3.1, 4:2:0, 8-bit&#xA;[libx264 @ 0x7f7f2600e000] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=1 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=750 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument&#xA;Error initializing output stream 0:1 --&#xA;[aac @ 0x7f7f2600c000] Qavg: 880.111&#xA;[aac @ 0x7f7f2600c000] 2 frames left in the queue on closing&#xA;[libx264 @ 0x7f7f2600e000] final ratefactor: 28.97&#xA;Conversion failed!&#xA;

    &#xA;

    Stream #0:2 -> #0:2 (copy)&#xA;Stream #0:3 -> #0:3 (copy)&#xA;

    &#xA;

    I guess the problem is that the file contains two not audio/video streams :&#xA;I can not find a way to exclude or ignore or copy without processing those last two streams (#2 and #3).

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;IMG_3599.mov&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt&#xA;    minor_version   : 0&#xA;    compatible_brands: qt&#xA;    creation_time   : 2020-09-21T09:45:27.000000Z&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 7&#xA;    com.apple.quicktime.software: 13.4.1&#xA;    com.apple.quicktime.creationdate: 2020-06-15T11:59:36&#x2B;0200&#xA;    com.apple.photos.originating.signature: AXfhZgW4nrUdSusOMUuJRarfxD7R&#xA;  Duration: 00:01:13.40, start: 0.000000, bitrate: 10616 kb/s&#xA;    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 96 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-09-21T09:45:27.000000Z&#xA;      handler_name    : Core Media Audio&#xA;    Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 10514 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-09-21T09:45:27.000000Z&#xA;      handler_name    : Core Media Video&#xA;      encoder         : H.264&#xA;    Stream #0:2(und): Data: none (mebx / 0x7862656D) (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-09-21T09:45:27.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;    Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-09-21T09:45:27.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;

    &#xA;