Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

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

Autres articles (60)

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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (13733)

  • trying to convert mp3 to wav

    7 décembre 2018, par Aakash aggarwal

    I am trying to convert mp3 file to wav format using pyaudio but getting an error
    My code

    from pydub import AudioSegment
    sound = AudioSegment.from_mp3("v1.mp3")
    sound.export("a.wav", format="wav")

    and I am getting error in line 2 as follow

    CouldntDecodeError : Decoding failed. ffmpeg returned error code : 1

    Output from ffmpeg/avlib :

    b"ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers\n built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1 16.04.10) 20160609\n configuration : —prefix=/usr —extra-version=0ubuntu0.16.04.1 —build-suffix=-ffmpeg —toolchain=hardened —libdir=/usr/lib/x86_64-linux-gnu —incdir=/usr/include/x86_64-linux-gnu —cc=cc —cxx=g++ —enable-gpl —enable-shared —disable-stripping —disable-decoder=libopenjpeg —disable-decoder=libschroedinger —enable-avresample —enable-avisynth —enable-gnutls —enable-ladspa —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libcdio —enable-libflite —enable-libfontconfig —enable-libfreetype —enable-libfribidi —enable-libgme —enable-libgsm —enable-libmodplug —enable-libmp3lame —enable-libopenjpeg —enable-libopus —enable-libpulse —enable-librtmp —enable-libschroedinger —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libssh —enable-libtheora —enable-libtwolame —enable-libvorbis —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx265 —enable-libxvid —enable-libzvbi —enable-openal —enable-opengl —enable-x11grab —enable-libdc1394 —enable-libiec61883 —enable-libzmq —enable-frei0r —enable-libx264 —enable-libopencv\n libavutil 54. 31.100 / 54. 31.100\n libavcodec 56. 60.100 / 56. 60.100\n libavformat 56. 40.101 / 56. 40.101\n libavdevice 56. 4.100 / 56. 4.100\n libavfilter 5. 40.101 / 5. 40.101\n libavresample 2. 1. 0 / 2. 1. 0\n libswscale 3. 1.101 / 3. 1.101\n libswresample 1. 2.101 / 1. 2.101\n libpostproc 53. 3.100 / 53. 3.100\n[mp3 @ 0x2446020] Header missing\n Last message repeated 1045 times\n[mp3 @ 0x243d060] decoding for stream 0 failed\n[mp3 @ 0x243d060] Could not find codec parameters for stream 0 (Audio : mp3, 0 channels, s16p) : unspecified frame size\nConsider increasing the value for the ’analyzeduration’ and ’probesize’ options\nv1.mp3 : could not find codec parameters\nInput #0, mp3, from ’v1.mp3’ :\n Duration : N/A, start : 0.000000, bitrate : N/A\n Stream #0:0 : Audio : mp3, 0 channels, s16p\n[abuffer @ 0x2449660] Value inf for parameter ’time_base’ out of range [0 - 2.14748e+09]\n Last message repeated 3 times\n[abuffer @ 0x2449660] Error setting option time_base to value 1/0.\n[graph 0 input from stream 0:0 @ 0x2449540] Error applying options to the filter.\nError opening filters !\n"

  • FFmpeg : concat protocol gives corrupt output and skips few frames

    11 décembre 2018, par Prashant_Sarin

    Using :

    var command = "-y -i concat:$concatString -c copy -bsf:a aac_adtstoasc $outputFile"

    output video skips few frames in between and jumps from 4th second to 6th sec

    If i use :

    var command = "-y -i concat:$concatString -c:v libx264 -preset ultrafast -crf 30 $outputFile"

    Then, the output is fine but it is taking too much time with the warning of

    [mp4 @ 0xf7228600] Non-monotonous DTS in output stream 0:1

    The logs are as :

    2018-12-11 13:27:19.146 7435-7435/com.onedayapp.mystory.dev D/com.onedayapp.mystory.oneday.controllers.service.VideoCompositionService: onProgress ----Merge---- [mp4 @ 0xf4524c00] Non-monotonous DTS in output stream 0:1; previous: 705608, current: 210096; changing to 705609. This may result in incorrect timestamps in the output file.
    2018-12-11 13:27:19.146 7435-7435/com.onedayapp.mystory.dev D/com.onedayapp.mystory.oneday.controllers.service.VideoCompositionService: onProgress ----Merge---- frame=  745 fps=0.0 q=-1.0 Lsize=    1823kB    time=00:03:04.84 bitrate=  80.8kbits/s speed= 758x    
    2018-12-11 13:27:19.147 7435-7435/com.onedayapp.mystory.dev D/com.onedayapp.mystory.oneday.controllers.service.VideoCompositionService: onProgress ----Merge---- video:1781kB audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.563412%
    2018-12-11 13:27:19.148 7435-7435/com.onedayapp.mystory.dev D/com.onedayapp.mystory.oneday.controllers.service.VideoCompositionService: Merged successfully message---------ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.8 (GCC)  configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --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/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.102 / 57. 24.102
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 31.100 /  6. 31.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0xf4524600] Auto-inserting h264_mp4toannexb bitstream filter
    Input #0, concat, from '/storage/emulated/0/OneDay/Member/128/Video/Story/94071beb-0b5f-4588-b388-ff78d24c07a8/concatVideo.txt':
     Duration: N/A, start: 0.000000, bitrate: 695 kb/s
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 693 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s
       Metadata:
         handler_name    : SoundHandler
    Output #0, mp4, to '/storage/emulated/0/OneDay/Member/128/Video/Story/94071beb-0b5f-4588-b388-ff78d24c07a8/Final.mp4':
     Metadata:
       encoder         : Lavf57.25.100
       Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 693 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 2 kb/s
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0xf4524600] Auto-inserting h264_mp4toannexb bitstream filter
    [mp4 @ 0xf4524c00] Non-monotonous DTS in output stream 0:1; previous: 132096, current: 24152; changing to 132097. This may result in incorrect timestamps in the output file.
    [mp4 @ 0xf4524c00] Non-monotonous DTS in output stream 0:1; previous: 132097, current: 25176; changing to 132098. This may result in incorrect timestamps in the output file.
    [mp4 @ 0xf4524c00] Non-monotonous DTS in output stream 0:1; previous: 132098, current: 26200; changing to 132099. This may result in incorrect timestamps in the output file.
    [mp4 @ 0xf4524c00] Non-monotonous DTS in output stream 0:1; previous: 132099, current: 27224; changing to 132100. This may result in incorrect timestamps in the output file.
    [mp4 @ 0xf4524c00] Non-monotonous DTS in output stream 0:1; previous: 132100, current: 28248; changing to 132101. This may result in incorrect timestamps in the output file.
    [mp4 @ 0xf4524c00] Non-monotonous DTS in output stream 0:1; previous: 132101, current: 29272; changing to 132102. This may result in incorrect timestamps in the output file.

    Last few lines are onSuccess() message of when i run with concat Demuxer.
    All files are *.mp4 files.

  • Flask send_file not sending file

    30 avril 2021, par jackmerrill

    I'm using Flask with send_file() to have people download a file off the server.

    



    My current code is as follows :

    



    @app.route('/', methods=["GET", "POST"])
def index():
    if request.method == "POST":
        link = request.form.get('Link')
        with youtube_dl.YoutubeDL(ydl_opts) as ydl:
            info_dict = ydl.extract_info(link, download=False)
            video_url = info_dict.get("url", None)
            video_id = info_dict.get("id", None)
            video_title = info_dict.get('title', None)
            ydl.download([link])
        print("sending file...")
        send_file("dl/"+video_title+".f137.mp4", as_attachment=True)
        print("file sent, deleting...")
        os.remove("dl/"+video_title+".f137.mp4")
        print("done.")
        return render_template("index.html", message="Success!")
    else:
        return render_template("index.html", message=message)


    



    The only reason I have .f137.mp4 added is because I am using AWS C9 to be my online IDE and I can't install FFMPEG to combine the audio and video on Amazon Linux. However, that is not the issue. The issue is that it is not sending the download request.

    



    Here is the console output :

    



    127.0.0.1 - - [12/Dec/2018 16:17:41] "POST / HTTP/1.1" 200 -
[youtube] 2AYgi2wsdkE: Downloading webpage
[youtube] 2AYgi2wsdkE: Downloading video info webpage
[youtube] 2AYgi2wsdkE: Downloading webpage
[youtube] 2AYgi2wsdkE: Downloading video info webpage
WARNING: You have requested multiple formats but ffmpeg or avconv are not installed. The formats won't be merged.
[download] Destination: dl/Meme Awards v244.f137.mp4
[download] 100% of 73.82MiB in 00:02
[download] Destination: dl/Meme Awards v244.f140.m4a
[download] 100% of 11.63MiB in 00:00
sending file...
file sent, deleting...
done.
127.0.0.1 - - [12/Dec/2018 16:18:03] "POST / HTTP/1.1" 200 -


    



    Any and all help is appreciated. Thanks !