Recherche avancée

Médias (1)

Mot : - Tags -/graphisme

Autres articles (43)

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

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

  • Dash timestamp : 41390056 is out of range for mov/mp4 format

    26 octobre 2017, par mike

    I’m trying to convert a aac stream to dash. The issue is that I get a lot of errors as below(though it seems to segment it into multiple files but I get errors on the player too). The question is why do I get these errors and how can I fix it ? If I simply convert "copy" it into to a single mp4 file it works without error.

       ffmpeg -i  "a.mkv" -y -map  0:1 -c:0 copy -min_seg_duration 1000000
    -use_timeline 1 -use_template 1 -init_seg_name init.mp4s
    -media_seg_name  "\$Number\$.mp4s" -adaptation_sets "id=1,streams=0"
    -remove_at_exit 0  -f dash -dash 1
    "out/stream.mpd" -loglevel error

    Output

    [mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40475608 is out of range for mov/mp4 format
    [mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40764376 is out of range for mov/mp4 format
    [mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40860664 is out of range for mov/mp4 format
    [mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41149432 is out of range for mov/mp4 format
    [mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41390056 is out of range for mov/mp4 format
    [mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41823208 is out of range for mov/mp4 format

    Copy to a single MP4 works just fine
    ffmpeg -i "a.mkv" -y -map 0:1 -c:0 copy -f mp4 -dash 1 "out/out.mp4" -loglevel error

    Probe

    ffprobe a.mkv
    ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
     built with Apple LLVM version 9.0.0 (clang-900.0.37)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libavresample   3.  7.  0 /  3.  7.  0
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    Input #0, matroska,webm, from 'a.mkv':
     Metadata:
       encoder         : libebml v1.3.1 + libmatroska v1.4.2
       creation_time   : 2017-03-11T02:56:50.000000Z
     Duration: 02:12:52.39, start: 0.000000, bitrate: 740 kb/s
       Chapter #0:0: start 0.000000, end 520.270000
       Metadata:
         title           : 00:00:00.000
       Chapter #0:1: start 520.270000, end 1135.718000
       Metadata:
         title           : 00:08:40.270
       Chapter #0:2: start 1135.718000, end 1703.660000
       Metadata:
         title           : 00:18:55.718
       Chapter #0:3: start 1703.660000, end 2314.187000
       Metadata:
         title           : 00:28:23.660
       Chapter #0:4: start 2314.187000, end 2888.594000
       Metadata:
         title           : 00:38:34.187
       Chapter #0:5: start 2888.594000, end 3499.246000
       Metadata:
         title           : 00:48:08.594
       Chapter #0:6: start 3499.246000, end 4154.692000
       Metadata:
         title           : 00:58:19.246
       Chapter #0:7: start 4154.692000, end 4646.392000
       Metadata:
         title           : 01:09:14.692
       Chapter #0:8: start 4646.392000, end 5373.660000
       Metadata:
         title           : 01:17:26.392
       Chapter #0:9: start 5373.660000, end 5882.085000
       Metadata:
         title           : 01:29:33.660
       Chapter #0:10: start 5882.085000, end 6627.871000
       Metadata:
         title           : 01:38:02.085
       Chapter #0:11: start 6627.871000, end 7144.471000
       Metadata:
         title           : 01:50:27.871
       Chapter #0:12: start 7144.471000, end 7451.944000
       Metadata:
         title           : 01:59:04.471
       Chapter #0:13: start 7451.944000, end 7972.394000
       Metadata:
         title           : 02:04:11.944
       Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 720x300 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
       Metadata:
         title           : X264
         BPS             : 623765
         BPS-eng         : 623765
         DURATION        : 02:12:52.311000000
         DURATION-eng    : 02:12:52.311000000
         NUMBER_OF_FRAMES: 191144
         NUMBER_OF_FRAMES-eng: 191144
         NUMBER_OF_BYTES : 621606403
         NUMBER_OF_BYTES-eng: 621606403
         _STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 64bit
         _STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 64bit
         _STATISTICS_WRITING_DATE_UTC: 2017-03-11 02:56:50
         _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-11 02:56:50
         _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
       Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
       Metadata:
         BPS             : 114797
         BPS-eng         : 114797
         DURATION        : 02:12:52.394000000
         DURATION-eng    : 02:12:52.394000000
         NUMBER_OF_FRAMES: 373706
         NUMBER_OF_FRAMES-eng: 373706
         NUMBER_OF_BYTES : 114401387
         NUMBER_OF_BYTES-eng: 114401387
         _STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 64bit
         _STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 64bit
         _STATISTICS_WRITING_DATE_UTC: 2017-03-11 02:56:50
         _STATISTICS_WRITING_DATE_UTC-eng: 2017-03-11 02:56:50
         _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

    Shaka debug

    Assertion failed: This should be an update of the last segment in a period
    shaka.media.SegmentIndex.merge @ segment_index.js:153
    shaka.dash.SegmentTemplate.createStream @ segment_template.js:82
    shaka.dash.DashParser.parseRepresentation_ @ dash_parser.js:1080
    shaka.dash.DashParser.parseAdaptationSet_ @ dash_parser.js:978
    shaka.dash.DashParser.parsePeriod_ @ dash_parser.js:722
    shaka.dash.DashParser.parsePeriods_ @ dash_parser.js:626
    shaka.dash.DashParser.processManifest_ @ dash_parser.js:520
    (anonymous) @ dash_parser.js:431
    Promise resolved (async)
    shaka.dash.DashParser.parseManifest_ @ dash_parser.js:430
    (anonymous) @ dash_parser.js:397
    Promise resolved (async)
    shaka.dash.DashParser.requestManifest_ @ dash_parser.js:390
    shaka.dash.DashParser.onUpdate_ @ dash_parser.js:1161
    setTimeout (async)
    shaka.dash.DashParser.setUpdateTimer_ @ dash_parser.js:1209
    (anonymous) @ dash_parser.js:331
    Promise resolved (async)
    shaka.dash.DashParser.start @ dash_parser.js:329
    (anonymous) @ player.js:555
    Promise resolved (async)
    shaka.util.CancelableChain.then @ cancelable_chain.js:72
    shaka.Player.load @ player.js:499
    initPlayer @ ?x=149&y=88&q=http%3A%2F%2Flocalhost%3A8080%2Fmeta%2F%3FbucketID%3D%2FVolumes%2FTV%2FFa%26channelID%3D%2FVolumes%2FTV%26containerID%3D%2FUsers%2F%2Fbrev%%2FL1ZvbHVtZXMvVFYvRmFudGFzdGljLkJlYXN0cy5hbmQuV2hlcmUudG8uRmluZC5UaGVtLjIwMTYuQkRSaXAueDI2NC1TUEFSS1MvYS5ta3Y%2F97M4TS6IqnQ.mpd:392
    463segment_index.js:145 Refusing to rewrite original references on update!
    shaka.media.SegmentIndex.merge @ segment_index.js:145
    shaka.dash.SegmentTemplate.createStream @ segment_template.js:82
    shaka.dash.DashParser.parseRepresentation_ @ dash_parser.js:1080
    shaka.dash.DashParser.parseAdaptationSet_ @ dash_parser.js:978
    shaka.dash.DashParser.parsePeriod_ @ dash_parser.js:722
    shaka.dash.DashParser.parsePeriods_ @ dash_parser.js:626
    shaka.dash.DashParser.processManifest_ @ dash_parser.js:520
    (anonymous) @ dash_parser.js:431
    Promise resolved (async)
    shaka.dash.DashParser.parseManifest_ @ dash_parser.js:430
    (anonymous) @ dash_parser.js:397
    Promise resolved (async)
    shaka.dash.DashParser.requestManifest_ @ dash_parser.js:390
    shaka.dash.DashParser.onUpdate_ @ dash_parser.js:1161
    setTimeout (async)
    shaka.dash.DashParser.setUpdateTimer_ @ dash_parser.js:1209
    (anonymous) @ dash_parser.js:331
    Promise resolved (async)
    shaka.dash.DashParser.start @ dash_parser.js:329
    (anonymous) @ player.js:555
    Promise resolved (async)
    shaka.util.CancelableChain.then @ cancelable_chain.js:72
    shaka.Player.load @ player.js:499
    initPlayer @ ?x=149&y=88&q=http%3A%2F%2Flocalhost%3A8080%2Fmeta%2F%3FbucketID%3D%2FVolumes%2FTV%2FFa%26channelID%3D%2FVolumes%2FTV%26containerID%3D%2FUsers%2F%2Fbrev%%2FL1ZvbHVtZXMvVFYvRmFudGFzdGljLkJlYXN0cy5hbmQuV2hlcmUudG8uRmluZC5UaGVtLjIwMTYuQkRSaXAueDI2NC1TUEFSS1MvYS5ta3Y%2F97M4TS6IqnQ.mpd:392
  • Time lapse video using ffmpeg

    18 octobre 2017, par Rich S

    I’m trying to create a time-lapse video from 376 separate images. I want to adjust the framerate to get the best/smoothest result, but my video only includes 343 of the frames in the file.

    I’m using a text file (sequence.txt) to list the files..

    file 'images\20171016T040000Z.jpg'
    duration 0.1
    file 'images\20171016T040140Z.jpg'
    duration 0.1
    file 'images\20171016T040320Z.jpg'
    duration 0.1
    etc...

    And then running

    ffmpeg -safe 0 -f concat -i sequence.txt -pix_fmt yuv420p -y out.mp4

    As far as I can tell, the actual frame-rate of the output file will be 25fps (the default), and the duration of each frame will be 1/10 second. So there will be a few input frames duplicated for each output frame. But this shouldn’t be a problem.

    Why would the video only show the first 343 frames - actually I’ve just noticed that it’s exactly 90% of the required length.

    EDIT

    The log from running the ffmpeg is below

    ffmpeg version N-87353-g183fd30 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.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-libxml2 --enable-libzimg --enable-lzma --enable-zlib
     libavutil      55. 76.100 / 55. 76.100
     libavcodec     57.106.101 / 57.106.101
     libavformat    57. 82.101 / 57. 82.101
     libavdevice    57.  8.101 / 57.  8.101
     libavfilter     6.105.100 /  6.105.100
     libswscale      4.  7.103 /  4.  7.103
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    Input #0, concat, from 'sequence.txt':
     Duration: 00:00:32.80, start: 0.000000, bitrate: 4 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 2688x1520 [SAR 1:1 DAR 168:95], 25 tbr, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [swscaler @ 00000000021d8d20] deprecated pixel format used, make sure you did set range correctly
    [libx264 @ 0000000001f61920] using SAR=1/1
    [libx264 @ 0000000001f61920] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 0000000001f61920] profile High, level 5.0
    [libx264 @ 0000000001f61920] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=3 b_pyramid=2 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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'out.mp4':
     Metadata:
       encoder         : Lavf57.82.101
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 2688x1520 [SAR 1:1 DAR 168:95], q=-1--1, 25 fps, 12800 tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.106.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    frame=   34 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=20 drop=0 speed=   0x    
    frame=   49 fps= 45 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=29 drop=0 speed=   0x    
    frame=   61 fps= 35 q=28.0 size=     768kB time=00:00:00.08 bitrate=78571.4kbits/s dup=36 drop=0 speed=0.046x    
    frame=   71 fps= 30 q=28.0 size=    1536kB time=00:00:00.48 bitrate=26210.9kbits/s dup=42 drop=0 speed=0.201x    
    frame=   86 fps= 29 q=28.0 size=    3328kB time=00:00:01.08 bitrate=25242.0kbits/s dup=51 drop=0 speed=0.37x    
    frame=   91 fps= 25 q=28.0 size=    3840kB time=00:00:01.28 bitrate=24574.8kbits/s dup=54 drop=0 speed=0.356x    
    frame=   99 fps= 24 q=28.0 size=    4352kB time=00:00:01.60 bitrate=22281.4kbits/s dup=59 drop=0 speed=0.389x    
    frame=  116 fps= 23 q=28.0 size=    6400kB time=00:00:02.28 bitrate=22994.5kbits/s dup=69 drop=0 speed=0.459x    
    frame=  121 fps= 22 q=28.0 size=    6912kB time=00:00:02.48 bitrate=22831.3kbits/s dup=72 drop=0 speed=0.447x    
    frame=  139 fps= 23 q=28.0 size=    8704kB time=00:00:03.20 bitrate=22281.8kbits/s dup=83 drop=0 speed=0.523x    
    frame=  141 fps= 21 q=28.0 size=    8960kB time=00:00:03.28 bitrate=22377.7kbits/s dup=84 drop=0 speed=0.494x    
    frame=  149 fps= 21 q=28.0 size=    9728kB time=00:00:03.60 bitrate=22136.2kbits/s dup=89 drop=0 speed=0.499x    
    frame=  166 fps= 20 q=28.0 size=   11776kB time=00:00:04.28 bitrate=22539.2kbits/s dup=99 drop=0 speed=0.526x    
    frame=  174 fps= 20 q=28.0 size=   12288kB time=00:00:04.60 bitrate=21883.0kbits/s dup=104 drop=0 speed=0.525x    
    frame=  191 fps= 20 q=28.0 size=   14336kB time=00:00:05.28 bitrate=22242.3kbits/s dup=114 drop=0 speed=0.546x    
    frame=  199 fps= 19 q=28.0 size=   15104kB time=00:00:05.60 bitrate=22094.8kbits/s dup=119 drop=0 speed=0.543x    
    frame=  216 fps= 19 q=28.0 size=   17152kB time=00:00:06.28 bitrate=22373.9kbits/s dup=129 drop=0 speed=0.559x    
    frame=  224 fps= 19 q=28.0 size=   17920kB time=00:00:06.60 bitrate=22242.3kbits/s dup=134 drop=0 speed=0.558x    
    frame=  239 fps= 19 q=28.0 size=   20224kB time=00:00:07.20 bitrate=23010.2kbits/s dup=143 drop=0 speed=0.583x    
    frame=  244 fps= 19 q=28.0 size=   21760kB time=00:00:07.40 bitrate=24088.7kbits/s dup=146 drop=0 speed=0.575x    
    frame=  254 fps= 18 q=28.0 size=   23552kB time=00:00:07.80 bitrate=24735.4kbits/s dup=152 drop=0 speed=0.567x    
    frame=  261 fps= 18 q=28.0 size=   25856kB time=00:00:08.08 bitrate=26214.2kbits/s dup=156 drop=0 speed=0.564x    
    frame=  266 fps= 18 q=28.0 size=   27648kB time=00:00:08.28 bitrate=27353.9kbits/s dup=159 drop=0 speed=0.555x    
    frame=  279 fps= 18 q=28.0 size=   32000kB time=00:00:08.80 bitrate=29788.9kbits/s dup=167 drop=0 speed=0.557x    
    frame=  286 fps= 17 q=28.0 size=   34048kB time=00:00:09.08 bitrate=30718.0kbits/s dup=171 drop=0 speed=0.555x    
    frame=  294 fps= 17 q=28.0 size=   36096kB time=00:00:09.40 bitrate=31457.1kbits/s dup=176 drop=0 speed=0.553x    
    frame=  301 fps= 17 q=28.0 size=   38400kB time=00:00:09.68 bitrate=32497.0kbits/s dup=180 drop=0 speed=0.551x    
    frame=  314 fps= 17 q=28.0 size=   41984kB time=00:00:10.20 bitrate=33718.7kbits/s dup=188 drop=0 speed=0.556x    
    frame=  324 fps= 17 q=28.0 size=   45568kB time=00:00:10.60 bitrate=35216.1kbits/s dup=194 drop=0 speed=0.562x    
    frame=  331 fps= 17 q=28.0 size=   47104kB time=00:00:10.88 bitrate=35466.3kbits/s dup=198 drop=0 speed=0.557x    
    frame=  341 fps= 17 q=28.0 size=   49408kB time=00:00:11.28 bitrate=35881.9kbits/s dup=204 drop=0 speed=0.556x    
    frame=  354 fps= 17 q=28.0 size=   52736kB time=00:00:11.80 bitrate=36611.1kbits/s dup=212 drop=0 speed=0.561x    
    frame=  366 fps= 17 q=28.0 size=   55808kB time=00:00:12.28 bitrate=37229.4kbits/s dup=219 drop=0 speed=0.563x    
    frame=  379 fps= 17 q=28.0 size=   59136kB time=00:00:12.80 bitrate=37846.8kbits/s dup=227 drop=0 speed=0.568x    
    frame=  391 fps= 17 q=28.0 size=   62208kB time=00:00:13.28 bitrate=38373.9kbits/s dup=234 drop=0 speed=0.57x    
    frame=  401 fps= 17 q=28.0 size=   64512kB time=00:00:13.68 bitrate=38631.6kbits/s dup=240 drop=0 speed=0.566x    
    frame=  416 fps= 17 q=28.0 size=   68352kB time=00:00:14.28 bitrate=39211.3kbits/s dup=249 drop=0 speed=0.571x    
    frame=  429 fps= 17 q=28.0 size=   71424kB time=00:00:14.80 bitrate=39534.0kbits/s dup=257 drop=0 speed=0.575x    
    frame=  441 fps= 17 q=28.0 size=   74752kB time=00:00:15.28 bitrate=40076.3kbits/s dup=264 drop=0 speed=0.574x    
    frame=  454 fps= 17 q=28.0 size=   78080kB time=00:00:15.80 bitrate=40482.8kbits/s dup=272 drop=0 speed=0.578x    
    frame=  466 fps= 17 q=28.0 size=   81152kB time=00:00:16.28 bitrate=40835.0kbits/s dup=279 drop=0 speed=0.58x    
    frame=  476 fps= 16 q=28.0 size=   83456kB time=00:00:16.68 bitrate=40987.3kbits/s dup=285 drop=0 speed=0.577x    
    frame=  489 fps= 17 q=28.0 size=   87552kB time=00:00:17.20 bitrate=41699.0kbits/s dup=293 drop=0 speed=0.584x    
    frame=  494 fps= 16 q=28.0 size=   89088kB time=00:00:17.40 bitrate=41942.9kbits/s dup=296 drop=0 speed=0.58x    
    frame=  504 fps= 16 q=28.0 size=   91392kB time=00:00:17.80 bitrate=42060.7kbits/s dup=302 drop=0 speed=0.582x    
    frame=  509 fps= 16 q=28.0 size=   92672kB time=00:00:18.00 bitrate=42175.9kbits/s dup=305 drop=0 speed=0.579x    
    frame=  519 fps= 16 q=28.0 size=   95488kB time=00:00:18.40 bitrate=42512.8kbits/s dup=311 drop=0 speed=0.582x    
    frame=  526 fps= 16 q=28.0 size=   97280kB time=00:00:18.68 bitrate=42661.4kbits/s dup=315 drop=0 speed=0.581x    
    frame=  531 fps= 16 q=28.0 size=   98816kB time=00:00:18.88 bitrate=42875.9kbits/s dup=318 drop=0 speed=0.574x    
    frame=  544 fps= 16 q=28.0 size=  102144kB time=00:00:19.40 bitrate=43132.0kbits/s dup=326 drop=0 speed=0.574x    
    frame=  559 fps= 16 q=28.0 size=  106496kB time=00:00:20.00 bitrate=43620.6kbits/s dup=335 drop=0 speed=0.575x    
    frame=  571 fps= 16 q=28.0 size=  110080kB time=00:00:20.48 bitrate=44031.9kbits/s dup=342 drop=0 speed=0.573x    
    frame=  584 fps= 16 q=28.0 size=  113920kB time=00:00:21.00 bitrate=44439.5kbits/s dup=350 drop=0 speed=0.577x    
    frame=  596 fps= 16 q=28.0 size=  116992kB time=00:00:21.48 bitrate=44618.0kbits/s dup=357 drop=0 speed=0.579x    
    frame=  606 fps= 16 q=28.0 size=  119808kB time=00:00:21.88 bitrate=44856.7kbits/s dup=363 drop=0 speed=0.577x    
    frame=  616 fps= 16 q=28.0 size=  122368kB time=00:00:22.28 bitrate=44992.6kbits/s dup=369 drop=0 speed=0.58x    
    frame=  624 fps= 16 q=28.0 size=  124672kB time=00:00:22.60 bitrate=45190.7kbits/s dup=374 drop=0 speed=0.58x    
    frame=  631 fps= 16 q=28.0 size=  126464kB time=00:00:22.88 bitrate=45279.3kbits/s dup=378 drop=0 speed=0.576x    
    frame=  639 fps= 16 q=28.0 size=  128512kB time=00:00:23.20 bitrate=45377.9kbits/s dup=383 drop=0 speed=0.577x    
    frame=  651 fps= 16 q=28.0 size=  132096kB time=00:00:23.68 bitrate=45697.9kbits/s dup=390 drop=0 speed=0.575x    
    frame=  664 fps= 16 q=28.0 size=  135936kB time=00:00:24.20 bitrate=46015.9kbits/s dup=398 drop=0 speed=0.577x    
    frame=  676 fps= 16 q=28.0 size=  139264kB time=00:00:24.68 bitrate=46225.6kbits/s dup=405 drop=0 speed=0.578x    
    frame=  686 fps= 16 q=28.0 size=  141824kB time=00:00:25.08 bitrate=46324.5kbits/s dup=411 drop=0 speed=0.577x    
    frame=  699 fps= 16 q=28.0 size=  145152kB time=00:00:25.60 bitrate=46448.5kbits/s dup=419 drop=0 speed=0.577x    
    frame=  711 fps= 16 q=28.0 size=  148480kB time=00:00:26.08 bitrate=46639.0kbits/s dup=426 drop=0 speed=0.576x    
    frame=  724 fps= 16 q=28.0 size=  152320kB time=00:00:26.60 bitrate=46909.9kbits/s dup=434 drop=0 speed=0.576x    
    frame=  734 fps= 16 q=28.0 size=  155136kB time=00:00:27.00 bitrate=47069.3kbits/s dup=440 drop=0 speed=0.578x    
    frame=  741 fps= 16 q=28.0 size=  157440kB time=00:00:27.28 bitrate=47278.0kbits/s dup=444 drop=0 speed=0.576x    
    frame=  754 fps= 16 q=28.0 size=  160768kB time=00:00:27.80 bitrate=47374.4kbits/s dup=452 drop=0 speed=0.576x    
    frame=  766 fps= 16 q=28.0 size=  164352kB time=00:00:28.28 bitrate=47608.5kbits/s dup=459 drop=0 speed=0.575x    
    frame=  779 fps= 16 q=28.0 size=  167936kB time=00:00:28.80 bitrate=47768.3kbits/s dup=467 drop=0 speed=0.578x    
    frame=  791 fps= 16 q=28.0 size=  171264kB time=00:00:29.28 bitrate=47916.4kbits/s dup=474 drop=0 speed=0.578x    
    frame=  801 fps= 16 q=28.0 size=  174080kB time=00:00:29.68 bitrate=48047.8kbits/s dup=480 drop=0 speed=0.577x    
    frame=  809 fps= 16 q=28.0 size=  176128kB time=00:00:30.00 bitrate=48094.6kbits/s dup=485 drop=0 speed=0.577x    
    frame=  819 fps= 16 q=28.0 size=  178944kB time=00:00:30.40 bitrate=48220.6kbits/s dup=491 drop=0 speed=0.577x    
    frame=  820 fps= 15 q=-1.0 Lsize=  194048kB time=00:00:32.68 bitrate=48642.4kbits/s dup=492 drop=0 speed=0.581x    
    video:194033kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.007522%
    [libx264 @ 0000000001f61920] frame I:20    Avg QP:20.40  size:446315
    [libx264 @ 0000000001f61920] frame P:212   Avg QP:25.37  size:629518
    [libx264 @ 0000000001f61920] frame B:588   Avg QP:26.30  size: 95757
    [libx264 @ 0000000001f61920] consecutive B-frames:  3.4%  2.4%  1.5% 92.7%
    [libx264 @ 0000000001f61920] mb I  I16..4:  0.1% 99.2%  0.7%
    [libx264 @ 0000000001f61920] mb P  I16..4:  0.3% 28.7%  0.4%  P16..4: 21.3% 24.3% 16.3%  0.0%  0.0%    skip: 8.8%
    [libx264 @ 0000000001f61920] mb B  I16..4:  0.0%  2.8%  0.1%  B16..8:  7.0%  3.6%  1.7%  direct: 4.9%  skip:80.0%  L0:38.4% L1:18.0% BI:43.6%
    [libx264 @ 0000000001f61920] 8x8 transform intra:97.6% inter:89.5%
    [libx264 @ 0000000001f61920] coded y,uvDC,uvAC intra: 94.6% 71.9% 10.1% inter: 29.0% 20.0% 0.5%
    [libx264 @ 0000000001f61920] i16 v,h,dc,p: 15% 39% 26% 20%
    [libx264 @ 0000000001f61920] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 11% 46%  5%  5%  5%  6%  5%  9%
    [libx264 @ 0000000001f61920] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 12% 13%  9% 10% 10% 11% 10% 14%
    [libx264 @ 0000000001f61920] i8c dc,h,v,p: 51% 25% 20%  4%
    [libx264 @ 0000000001f61920] Weighted P-Frames: Y:48.6% UV:34.4%
    [libx264 @ 0000000001f61920] ref P L0: 36.9% 13.0% 18.1% 21.0% 11.0%
    [libx264 @ 0000000001f61920] ref B L0: 59.1% 21.9% 19.0%
    [libx264 @ 0000000001f61920] ref B L1: 99.7%  0.3%
    [libx264 @ 0000000001f61920] kb/s:48460.77
    [Finished in 57.7s]
  • FFmpeg on Azure Function call running slowly and producing an empty output file

    7 novembre 2017, par The Lemon

    I’m trying to make a function which uses ffmpeg, so far I haven’t been able to get anything other than the -version command to work properly. When I try to run a simple ffmpeg -i {input file path} {output file path} command, the function seems to get stuck for 3-4 minutes (in the process creating an empty output file), then try again and produce the error ’file already exists’. I’ve tried switching between the 64 bit ffmpeg.exe and the 32 bit ffmpeg.exe with the function running as both a 32 and 64 bit function. My code and the associated logs from trying to run the code are included below, if anyone can tell me what I’m doing wrong or how to get the process to work it would be greatly appreciated. Thanks in advance, Cuan

    edit : The process works on kudu with the same files, the output is shown at the bottom. On kudu the process ran in under half a minute, clearly something is causing the function process to hang, if anyone has advice it would be greatly appreciated. Thanks again, Cuan.

    second edit : I tried adding the -y to the end of my command, this works in that it no longer complains about overwriting, but alas it now just hangs twice due to timeout. (output at the bottom)

    edit the third : azure has a way to let you run functions locally, my function ran into the same issues on the local version but : as it turns out the actual processing is done within a few seconds, it just takes forever to decide to write to a file - if you terminate the process manually after the process had been running for 10 seconds the file immediately gets written. Again, any help is appreciated. Cuan.

    Run.csx :

    using System.Net;
    using System;
    using System.Diagnostics;
    using System.ComponentModel;
    public static async Task<httpresponsemessage> Run(HttpRequestMessage req, TraceWriter log)
    {
       log.Info("C# HTTP trigger function processed a request.");
       Process process = new Process();
       process.StartInfo.FileName = @"D:\home\site\wwwroot\HttpTestFunction\ffmpeg64.exe";
       string tmp = String.Format("-i \"" + "Airdocs Background Video.mp4" + "\" \"" + "tmpOut2.mp4" + "\"");
       log.Info("ffmpeg argument is: "+tmp);
       process.StartInfo.Arguments = tmp;
       process.StartInfo.UseShellExecute = false;
       process.StartInfo.RedirectStandardOutput = true;
       process.StartInfo.RedirectStandardError = true;
       process.StartInfo.WorkingDirectory = @"D:\home\site\wwwroot\HttpTestFunction";
       process.Start();
       log.Info("process started");
       string output = process.StandardOutput.ReadToEnd();
       string err = process.StandardError.ReadToEnd();
       log.Info("output:" + output);
       log.Info("error:"+err);
       process.WaitForExit();
    }
    </httpresponsemessage>

    Logs :

    2017-10-14T02:17:10.514 Function started (Id=e4ec7d1e-2bcb-4b74-8af2-15124f1576fb)
    2017-10-14T02:17:10.639 C# HTTP trigger function processed a request.
    2017-10-14T02:17:10.639 ffmpeg argument is: -i "Airdocs Background Video.mp4" "tmpOut2.mp4"
    2017-10-14T02:17:10.779 process started
    2017-10-14T02:18:15  No new trace in the past 1 min(s).
    2017-10-14T02:19:15  No new trace in the past 2 min(s).
    2017-10-14T02:20:15  No new trace in the past 3 min(s).
    2017-10-14T02:21:02.188 Function started (Id=b2ae9b59-8933-42e3-986c-fd26a6886285)
    2017-10-14T02:21:02.188 C# HTTP trigger function processed a request.
    2017-10-14T02:21:02.188 ffmpeg argument is: -i "Airdocs Background Video.mp4" "tmpOut2.mp4"
    2017-10-14T02:21:02.252 process started
    2017-10-14T02:21:02.377 output:
    2017-10-14T02:21:02.377 error:ffmpeg version N-87353-g183fd30 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.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-libxml2 --enable-libzimg --enable-lzma --enable-zlib
     libavutil      55. 76.100 / 55. 76.100
     libavcodec     57.106.101 / 57.106.101
     libavformat    57. 82.101 / 57. 82.101
     libavdevice    57.  8.101 / 57.  8.101
     libavfilter     6.105.100 /  6.105.100
     libswscale      4.  7.103 /  4.  7.103
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Airdocs Background Video.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp41isom
       creation_time   : 2017-09-08T11:55:11.000000Z
     Duration: 00:00:24.02, start: 0.000000, bitrate: 105 kb/s
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 104 kb/s, 30.30 fps, 30.30 tbr, 30k tbn, 60 tbc (default)
       Metadata:
         creation_time   : 2017-09-08T11:55:11.000000Z
         handler_name    : VideoHandler
         encoder         : AVC Coding
    File 'tmpOut2.mp4' already exists. Overwrite ? [y/N] Not overwriting - exiting
    2017-10-14T02:21:02.392 Function completed (Success, Id=b2ae9b59-8933-42e3-986c-fd26a6886285, Duration=205ms)
    2017-10-14T02:22:10.563 Function completed (Failure, Id=e4ec7d1e-2bcb-4b74-8af2-15124f1576fb, Duration=300047ms)
    2017-10-14T02:22:10.610 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.HttpTestFunction.

    Kudu code (just running the ffmpeg command directly, not the run.csx file) :

    D:\home\site\wwwroot\HttpTestFunction>ffmpeg -i "Airdocs Background Video.mp4" tmpout3.mp4


    ffmpeg version N-87196-g6cadbb1 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. 74.100 / 55. 74.100
     libavcodec     57.105.100 / 57.105.100
     libavformat    57. 81.100 / 57. 81.100
     libavdevice    57.  8.100 / 57.  8.100
     libavfilter     6.101.100 /  6.101.100
     libswscale      4.  7.103 /  4.  7.103
     libswresample   2.  8.100 /  2.  8.100
     libpostproc    54.  6.100 / 54.  6.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Airdocs Background Video.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp41isom
       creation_time   : 2017-09-08T11:55:11.000000Z
     Duration: 00:00:24.02, start: 0.000000, bitrate: 105 kb/s
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 104 kb/s, 30.30 fps, 30.30 tbr, 30k tbn, 60 tbc (default)
       Metadata:
         creation_time   : 2017-09-08T11:55:11.000000Z
         handler_name    : VideoHandler
         encoder         : AVC Coding
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [libx264 @ 00000000005fc5a0] using SAR=1/1
    [libx264 @ 00000000005fc5a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 00000000005fc5a0] profile High, level 3.2
    [libx264 @ 00000000005fc5a0] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'tmpout3.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp41isom
       encoder         : Lavf57.81.100
       Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30.30 fps, 16k tbn, 30.30 tbc (default)
       Metadata:
         creation_time   : 2017-09-08T11:55:11.000000Z
         handler_name    : VideoHandler
         encoder         : Lavc57.105.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    frame=  728 fps= 39 q=29.0 Lsize=      62kB time=00:00:23.92 bitrate=  21.1kbits/s speed=1.28x    
    video:52kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 17.915474%
    [libx264 @ 00000000005fc5a0] frame I:4     Avg QP:12.46  size:  6102
    [libx264 @ 00000000005fc5a0] frame P:184   Avg QP:16.94  size:    45
    [libx264 @ 00000000005fc5a0] frame B:540   Avg QP:20.50  size:    37
    [libx264 @ 00000000005fc5a0] consecutive B-frames:  1.1%  0.0%  0.0% 98.9%
    [libx264 @ 00000000005fc5a0] mb I  I16..4: 66.3% 30.4%  3.3%
    [libx264 @ 00000000005fc5a0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
    [libx264 @ 00000000005fc5a0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%  L0:12.3% L1:87.7% BI: 0.0%
    [libx264 @ 00000000005fc5a0] 8x8 transform intra:30.5% inter:14.3%
    [libx264 @ 00000000005fc5a0] coded y,uvDC,uvAC intra: 2.3% 2.2% 2.1% inter: 0.0% 0.0% 0.0%
    [libx264 @ 00000000005fc5a0] i16 v,h,dc,p: 93%  6%  2%  0%
    [libx264 @ 00000000005fc5a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 41% 31%  0%  0%  0%  0%  0%  0%
    [libx264 @ 00000000005fc5a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 17% 16%  5%  4%  5%  6%  3%  5%
    [libx264 @ 00000000005fc5a0] i8c dc,h,v,p: 93%  6%  1%  0%
    [libx264 @ 00000000005fc5a0] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 00000000005fc5a0] ref B L1: 98.2%  1.8%
    [libx264 @ 00000000005fc5a0] kb/s:17.57



    D:\home\site\wwwroot\HttpTestFunction>

    Output on azure with the -y command

    2017-10-25T04:34:45.519 Compilation succeeded.
    2017-10-25T04:34:46.160 Function started (Id=18880991-c93a-42a3-96b6-7df283e3bdb4)
    2017-10-25T04:34:46.300 C# HTTP trigger function processed a request.
    2017-10-25T04:34:46.300 ffmpeg argument is: -i "Airdocs Background Video.mp4" "tmpOut2.mp4" -y
    2017-10-25T04:34:46.394 process started
    2017-10-25T04:36:46  No new trace in the past 1 min(s).
    2017-10-25T04:37:46  No new trace in the past 2 min(s).
    2017-10-25T04:38:37.947 Function started (Id=c7f7f768-c53b-4074-a0c2-8391848bbd80)
    2017-10-25T04:38:37.963 C# HTTP trigger function processed a request.
    2017-10-25T04:38:37.963 ffmpeg argument is: -i "Airdocs Background Video.mp4" "tmpOut2.mp4" -y
    2017-10-25T04:38:38.025 process started
    2017-10-25T04:39:46  No new trace in the past 1 min(s).
    2017-10-25T04:39:46.258 Function completed (Failure, Id=18880991-c93a-42a3-96b6-7df283e3bdb4, Duration=300079ms)
    2017-10-25T04:39:46.321 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.HttpTestFunction.