Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (104)

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

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (13919)

  • How to run a python code via Django templates ?

    18 novembre 2018, par Iskender Berdiev

    I want to execute code below when the is submitted (project on Django) :

    from os import system, listdir, remove
    link = 'https://www.youtube.com/watch?v=ME9yO1KEVoo'

    def download(): ## Downloading a video from YouTube using youtube-dl
       system("youtube-dl -o download {}".format(link))

    def convert():  ## Converting downloaded video to mp3 format via ffmpeg.exe(same directory)
       listOfFiles = listdir('.')
       for i in listOfFiles:
           if i.startswith("download"):
               name = i
               system("ffmpeg -i {} download.mp3".format(name))

    def main():
       download()
       convert()

    main()

    I have tried to put this code into views.py :

    class download(TemplateView):
       def main(request):
           if request.method == 'POST':
               link = 'https://www.youtube.com/watch?v=ME9yO1KEVoo'
               system("youtube-dl -o download {}".format(link))
               listOfFiles = listdir('.')
               for i in listOfFiles:
                   if i.startswith("download"):
                       name = i
                       system("ffmpeg -i {} download.mp3".format(name))
           return redirect ('loader/wait.html')

    urls.py :

    path('wait/', views.download.as_view(), name='wait')

    and the html form which is submitted to run views.download.as_view() :

    <form action="{% url " method="POST">{% csrf_token %}
    <input type="submit" value="Yes" />
    </form>
  • FFmpeg adding 0.05 seconds of silence to transcoded AAC file ?

    29 octobre 2015, par FTLRalph

    In Java, I’m using FFmpeg to convert a WAV file to AAC with the function :

    -i input.wav -ac 1 -ab 64000 -ar 22050 output.aac

    When I open these two files in Audacity, I can clearly see that the AAC file is 0.05 seconds longer, with 0.05 seconds of silence added to the beginning.

    This is an issue when I try to mux this AAC file with a video file - the audio doesn’t sync up.

    Is there some sort of parameter to prevent this behavior or another way to get around this issue ?


    Edit - Console output while running the function :

    10-28 17:47:10.845: I/System.out(14784): FFmpeg: Running the function: -i "input.wav" -ac 1 -ab 64000 -ar 22050 "output.aac"
    10-28 17:47:10.845: I/System.out(14784): FFmpeg function: onStart()
    10-28 17:47:10.865: D/FFmpeg(14784): Running publishing updates method
    10-28 17:47:10.865: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.875: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.875: I/System.out(14784): ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
    10-28 17:47:10.875: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.875: I/System.out(14784):   built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
    10-28 17:47:10.875: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.875: I/System.out(14784):   configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    10-28 17:47:10.875: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.875: I/System.out(14784):   libavutil      54.  7.100 / 54.  7.100
    10-28 17:47:10.875: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.875: I/System.out(14784):   libavcodec     56.  1.100 / 56.  1.100
    10-28 17:47:10.875: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.875: I/System.out(14784):   libavformat    56.  4.101 / 56.  4.101
    10-28 17:47:10.880: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.880: I/System.out(14784):   libavdevice    56.  0.100 / 56.  0.100
    10-28 17:47:10.880: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.880: I/System.out(14784):   libavfilter     5.  1.100 /  5.  1.100
    10-28 17:47:10.880: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.880: I/System.out(14784):   libswscale      3.  0.100 /  3.  0.100
    10-28 17:47:10.880: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.880: I/System.out(14784):   libswresample   1.  1.100 /  1.  1.100
    10-28 17:47:10.880: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.880: I/System.out(14784):   libpostproc    53.  0.100 / 53.  0.100
    10-28 17:47:10.895: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.895: I/System.out(14784): Guessed Channel Layout for  Input Stream #0.0 : mono
    10-28 17:47:10.895: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.895: I/System.out(14784): Input #0, wav, from 'input.wav':
    10-28 17:47:10.895: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.900: I/System.out(14784):   Duration: 00:00:02.50, bitrate: 352 kb/s
    10-28 17:47:10.900: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.900: I/System.out(14784):     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
    10-28 17:47:10.935: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.935: I/System.out(14784): Output #0, adts, to 'output.aac':
    10-28 17:47:10.935: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.935: I/System.out(14784):   Metadata:
    10-28 17:47:10.935: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.935: I/System.out(14784):     encoder         : Lavf56.4.101
    10-28 17:47:10.935: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.935: I/System.out(14784):     Stream #0:0: Audio: aac, 22050 Hz, mono, fltp, 64 kb/s
    10-28 17:47:10.935: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.935: I/System.out(14784):     Metadata:
    10-28 17:47:10.935: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.935: I/System.out(14784):       encoder         : Lavc56.1.100 aac
    10-28 17:47:10.940: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.940: I/System.out(14784): Stream mapping:
    10-28 17:47:10.940: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.940: I/System.out(14784):   Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
    10-28 17:47:10.940: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:10.940: I/System.out(14784): Press [q] to stop, [?] for help
    10-28 17:47:11.395: D/dalvikvm(14784): JIT unchain all for threadid=16
    10-28 17:47:11.420: D/dalvikvm(14784): GC_FOR_ALLOC freed 4698K, 40% free 7190K/11964K, paused 271ms, total 272ms
    10-28 17:47:11.420: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:11.420: I/System.out(14784): size=      12kB time=00:00:02.50 bitrate=  37.7kbits/s    
    10-28 17:47:11.455: I/System.out(14784): FFmpeg function: onProgress()...
    10-28 17:47:11.455: I/System.out(14784): video:0kB audio:11kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.363914%
    10-28 17:47:11.470: I/System.out(14784): FFmpeg function: onSuccess(), message:
    10-28 17:47:11.470: I/System.out(14784): ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
    10-28 17:47:11.470: I/System.out(14784):   built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
    10-28 17:47:11.470: I/System.out(14784):   configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    10-28 17:47:11.470: I/System.out(14784):   libavutil      54.  7.100 / 54.  7.100
    10-28 17:47:11.470: I/System.out(14784):   libavcodec     56.  1.100 / 56.  1.100
    10-28 17:47:11.470: I/System.out(14784):   libavformat    56.  4.101 / 56.  4.101
    10-28 17:47:11.470: I/System.out(14784):   libavdevice    56.  0.100 / 56.  0.100
    10-28 17:47:11.470: I/System.out(14784):   libavfilter     5.  1.100 /  5.  1.100
    10-28 17:47:11.470: I/System.out(14784):   libswscale      3.  0.100 /  3.  0.100
    10-28 17:47:11.470: I/System.out(14784):   libswresample   1.  1.100 /  1.  1.100
    10-28 17:47:11.470: I/System.out(14784):   libpostproc    53.  0.100 / 53.  0.100
    10-28 17:47:11.470: I/System.out(14784): Guessed Channel Layout for  Input Stream #0.0 : mono
    10-28 17:47:11.470: I/System.out(14784): Input #0, wav, from 'input.wav':
    10-28 17:47:11.470: I/System.out(14784):   Duration: 00:00:02.50, bitrate: 352 kb/s
    10-28 17:47:11.475: I/System.out(14784):     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
    10-28 17:47:11.475: I/System.out(14784): Output #0, adts, to 'output.aac':
    10-28 17:47:11.475: I/System.out(14784):   Metadata:
    10-28 17:47:11.475: I/System.out(14784):     encoder         : Lavf56.4.101
    10-28 17:47:11.475: I/System.out(14784):     Stream #0:0: Audio: aac, 22050 Hz, mono, fltp, 64 kb/s
    10-28 17:47:11.475: I/System.out(14784):     Metadata:
    10-28 17:47:11.475: I/System.out(14784):       encoder         : Lavc56.1.100 aac
    10-28 17:47:11.475: I/System.out(14784): Stream mapping:
    10-28 17:47:11.475: I/System.out(14784):   Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
    10-28 17:47:11.475: I/System.out(14784): Press [q] to stop, [?] for help
    10-28 17:47:11.475: I/System.out(14784): size=      12kB time=00:00:02.50 bitrate=  37.7kbits/s    
    10-28 17:47:11.475: I/System.out(14784): video:0kB audio:11kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.363914%
    10-28 17:47:11.475: I/System.out(14784): FFmpeg function: onFinish()
  • How to distinguish a physical D3D adapter from a virtual adapter used by the Remote Desktop Protocol ?

    31 octobre 2023, par rustak

    I'm currently developing a desktop application(c#/wpf) that decodes video using FFmpeg. I would like to give the user the option to select an adapter for video decoding. I'm using Direct3D method EnumAdapters to list available adapters on current device which works fine. The list of available adapters looks something like this :

    &#xA;

    Adapter 0&#xA;  Description: Intel(R) HD Graphics 630&#xA;  Vendor ID:   0x8086&#xA;  Device ID:   0x5912&#xA;  SubSys ID:   0x86941043&#xA;  Revision:    4&#xA;  Luid:    46459&#xA;  Flags:    None&#xA;  Dedicated Video Memory:    128 MB&#xA;  Dedicated System Memory:  0 MB&#xA;  Shared System Memory:     8092 MB&#xA;Adapter 2&#xA;  Description: Microsoft Basic Render Driver&#xA;  Vendor ID:   0x1414&#xA;  Device ID:   0x8C&#xA;  SubSys ID:   0x0&#xA;  Revision:    0&#xA;  Luid:    50158&#xA;  Flags:    Software&#xA;  Dedicated Video Memory:    0 MB&#xA;  Dedicated System Memory:  0 MB&#xA;  Shared System Memory:     8092 MB&#xA;

    &#xA;

    I have noticed that an additional adapter appears in the list of available adapters when RDP is used. The additional adapter has the same properties as the physical one ; the only difference is in the LUID. The output looks something like this :

    &#xA;

    Adapter 0&#xA;  Description: Intel(R) HD Graphics 630&#xA;  Vendor ID:   0x8086&#xA;  Device ID:   0x5912&#xA;  SubSys ID:   0x86941043&#xA;  Revision:    4&#xA;  Luid:    46459&#xA;  Flags:    None&#xA;  Dedicated Video Memory:    128 MB&#xA;  Dedicated System Memory:  0 MB&#xA;  Shared System Memory:     8092 MB&#xA;Adapter 1 // &lt;- additional addapter&#xA;  Description: Intel(R) HD Graphics 630 &#xA;  Vendor ID:   0x8086&#xA;  Device ID:   0x5912&#xA;  SubSys ID:   0x86941043&#xA;  Revision:    4&#xA;  Luid:    1322913970&#xA;  Flags:    None&#xA;  Dedicated Video Memory:    128 MB&#xA;  Dedicated System Memory:  0 MB&#xA;  Shared System Memory:     8092 MB&#xA;Adapter 2&#xA;  Description: Microsoft Basic Render Driver&#xA;  Vendor ID:   0x1414&#xA;  Device ID:   0x8C&#xA;  SubSys ID:   0x0&#xA;  Revision:    0&#xA;  Luid:    50158&#xA;  Flags:    Software&#xA;  Dedicated Video Memory:    0 MB&#xA;  Dedicated System Memory:  0 MB&#xA;  Shared System Memory:     8092 MB&#xA;

    &#xA;

    I'm aware that the additional adapter is some kind of virtual adapter used by RDP. I have tried both of them, and it seems that both are suitable for video decoding using FFmpeg.

    &#xA;

    However, from a UX perspective, it doesn't look or feel right that the combo box contains two adapters with the same name. So my question is : how can I distinguish a physical adapter from a virtual adapter used by the Remote Desktop Protocol ?

    &#xA;