
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (110)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 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 (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP 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 (...)
Sur d’autres sites (13865)
-
FFMPEG not working from Python subprocess.Popen but works from command line
21 novembre 2017, par Stuart ClarkeI’m trying to run a
FFMPEG
script from withinpython 3.5.2
. theFFMPEG
command runs fine from the command line but fails within the python script.The function I use to execute the
FFMPEG
command isdef ffmpeg(args):
err = None
command = [
ffmpegcmd, '-y',
'-loglevel', loglevel
] + args
print("\n\n\n")
print(command)
print("\n\n\n")
print(" ".join(command))
ffmpeg = subprocess.Popen(command, stderr=subprocess.PIPE ,stdout=subprocess.PIPE, universal_newlines=True)
while err == None:
out, err = ffmpeg.communicate()
time.sleep(1)
if err and loglevel=='fatal':
print(" ".join(command))
raise Exception(err)
print(err)The value for args is :
['-i', '/var/www/temp/film.mp4', '-vf', 'scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:x=(1920-iw)/2:y=(1080-ih)/2:color=black', '/var/www/temp/videoHD.mp4']
such that the resultant command being passed to
subprocess.Popen
is :['ffmpeg', '-y', '-loglevel', 'verbose', '-i', '/var/www/temp/film.mp4', '-vf', 'scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:x=(1920-iw)/2:y=(1080-ih)/2:color=black', '/var/www/temp/videoHD.mp4']
The value of loglevel is
verbose
only for troubleshooting but is intended to run asfatal
. There are also someprint
commands only in place for troubleshooting.The reason for wanting to increase the resolution is so that it can be combined later with higher resolution videos.
The result when running from within
python
is :ffmpeg version 3.3.4-2~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version='2~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[h264 @ 0x7f741a37a560] Reinit context to 640x368, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/temp/film.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Duration: 00:06:19.80, start: 0.000000, bitrate: 451 kb/s
Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 640x358 (640x368), 313 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x7f741a3bc700] Reinit context to 640x368, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0x7f741a5315e0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[Parsed_scale_0 @ 0x7f741a54e000] w:1920 h:1080 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 0x7f741a54f6a0] w:640 h:358 pixfmt:yuv420p tb:1/15360 fr:30/1 sar:0/1 sws_param:flags=2
[Parsed_scale_0 @ 0x7f741a54e000] w:640 h:358 fmt:yuv420p sar:0/1 -> w:1920 h:1074 fmt:yuv420p sar:0/1 flags:0x4
[Parsed_pad_1 @ 0x7f741a54eac0] w:1920 h:1074 -> w:1920 h:1080 x:0 y:2 color:0x000000FF
[libx264 @ 0x7f741a5509e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7f741a5509e0] profile High, level 4.0
[libx264 @ 0x7f741a5509e0] 264 - core 148 r2795 aaa9aa8 - 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=6 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 '/var/www/temp/videoHD.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Stream #0:0(und): Video: h264 (libx264), 1 reference frame ([33][0][0][0] / 0x0021), yuv420p(left), 1920x1080, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.89.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, delay 1024, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.89.100 aacThis results in a file with no content.
When I run the command from the command line I need to add single quotes around the
-vf
video filtersscale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:x=(1920-iw)/2:y=(1080-ih)/2:color=black
so the whole command becomes :ffmpeg -y -loglevel verbose -i /var/www/temp/film.mp4 -vf 'scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:x=(1920-iw)/2:y=(1080-ih)/2:color=black' /var/www/temp/videoHD.mp4
Running this command gives the required result.
ffmpeg version 3.3.4-2~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version='2~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[h264 @ 0x7f3a55c17560] Reinit context to 640x368, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/temp/film.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Duration: 00:06:19.80, start: 0.000000, bitrate: 451 kb/s
Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 640x358 (640x368), 313 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x7f3a55c59700] Reinit context to 640x368, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0x7f3a55dce5e0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[Parsed_scale_0 @ 0x7f3a55deb000] w:1920 h:1080 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 0x7f3a55dec6a0] w:640 h:358 pixfmt:yuv420p tb:1/15360 fr:30/1 sar:0/1 sws_param:flags=2
[Parsed_scale_0 @ 0x7f3a55deb000] w:640 h:358 fmt:yuv420p sar:0/1 -> w:1920 h:1074 fmt:yuv420p sar:0/1 flags:0x4
[Parsed_pad_1 @ 0x7f3a55debac0] w:1920 h:1074 -> w:1920 h:1080 x:0 y:2 color:0x000000FF
[libx264 @ 0x7f3a55ded9e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7f3a55ded9e0] profile High, level 4.0
[libx264 @ 0x7f3a55ded9e0] 264 - core 148 r2795 aaa9aa8 - 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=6 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 '/var/www/temp/videoHD.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Stream #0:0(und): Video: h264 (libx264), 1 reference frame ([33][0][0][0] / 0x0021), yuv420p(left), 1920x1080, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.89.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, delay 1024, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.89.100 aac
frame= 46 fps=0.0 q=0.0 size= 0kB time=00:00:01.62 bitrate= 0.0kbits/s
frame= 59 fps= 47 q=29.0 size= 116kB time=00:00:02.04 bitrate= 464.8kbits/
frame= 74 fps= 41 q=29.0 size= 223kB time=00:00:02.56 bitrate= 714.8kbits/
frame= 87 fps= 35 q=29.0 size= 344kB time=00:00:02.98 bitrate= 942.4kbits/
frame= 98 fps= 33 q=29.0 size= 427kB time=00:00:03.34 bitrate=1043.4kbits/
blah
blah
blah
frame=11347 fps= 21 q=29.0 size= 97550kB time=00:06:18.32 bitrate=2112.3kbits/
frame=11363 fps= 21 q=29.0 size= 97713kB time=00:06:18.85 bitrate=2112.8kbits/
frame=11380 fps= 21 q=29.0 size= 97795kB time=00:06:19.41 bitrate=2111.5kbits/
No more output streams to write to, finishing.
frame=11392 fps= 21 q=-1.0 Lsize= 98519kB time=00:06:19.77 bitrate=2125.1kbits/s speed=0.69x
video:92124kB audio:5986kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.416313%
Input file #0 (/var/www/temp/film.mp4):
Input stream #0:0 (video): 11392 packets read (14892948 bytes); 11392 frames decoded;
Input stream #0:1 (audio): 17803 packets read (6112540 bytes); 17802 frames decoded (18229248 samples);
Total: 29195 packets (21005488 bytes) demuxed
Output file #0 (/var/www/temp/videoHD.mp4):
Output stream #0:0 (video): 11392 frames encoded; 11392 packets muxed (94334785 bytes);
Output stream #0:1 (audio): 17802 frames encoded (18229248 samples); 17803 packets muxed (6129981 bytes);
Total: 29195 packets (100464766 bytes) muxed
[libx264 @ 0x7f3a55ded9e0] frame I:74 Avg QP:19.08 size: 51540
[libx264 @ 0x7f3a55ded9e0] frame P:3506 Avg QP:21.34 size: 19348
[libx264 @ 0x7f3a55ded9e0] frame B:7812 Avg QP:24.07 size: 2904
[libx264 @ 0x7f3a55ded9e0] consecutive B-frames: 1.3% 20.2% 4.6% 73.9%
[libx264 @ 0x7f3a55ded9e0] mb I I16..4: 19.7% 73.6% 6.7%
[libx264 @ 0x7f3a55ded9e0] mb P I16..4: 3.2% 6.4% 0.1% P16..4: 52.5% 7.6% 2.6% 0.0% 0.0% skip:27.6%
[libx264 @ 0x7f3a55ded9e0] mb B I16..4: 0.2% 0.2% 0.0% B16..8: 23.2% 0.4% 0.0% direct: 0.5% skip:75.5% L0:51.8% L1:46.6% BI: 1.6%
[libx264 @ 0x7f3a55ded9e0] 8x8 transform intra:66.4% inter:94.0%
[libx264 @ 0x7f3a55ded9e0] coded y,uvDC,uvAC intra: 33.6% 53.4% 7.3% inter: 5.3% 14.2% 0.0%
[libx264 @ 0x7f3a55ded9e0] i16 v,h,dc,p: 22% 27% 5% 46%
[libx264 @ 0x7f3a55ded9e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 19% 20% 4% 7% 7% 7% 5% 4%
[libx264 @ 0x7f3a55ded9e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 28% 11% 3% 9% 7% 6% 3% 2%
[libx264 @ 0x7f3a55ded9e0] i8c dc,h,v,p: 49% 21% 20% 10%
[libx264 @ 0x7f3a55ded9e0] Weighted P-Frames: Y:0.5% UV:0.1%
[libx264 @ 0x7f3a55ded9e0] ref P L0: 63.4% 8.9% 21.4% 6.3% 0.0%
[libx264 @ 0x7f3a55ded9e0] ref B L0: 89.3% 9.1% 1.6%
[libx264 @ 0x7f3a55ded9e0] ref B L1: 98.1% 1.9%
[libx264 @ 0x7f3a55ded9e0] kb/s:1987.38
[aac @ 0x7f3a55deee80] Qavg: 1160.814and the resulting video is fine.
Any ideas ?
Cheers,
Stu
Edit
It was suggested that I use a new function to do much the same thing. So I added the following function and used it for the command that I’m having trouble with :
def ffmpegPro(args):
err = None
for i, arg in enumerate(args):
if(" " in arg or "(" in arg or "[" in arg):
args[i] = "\"" + arg + "\""
command = [
ffmpegcmd, '-y',
'-loglevel', loglevel
] + args
commandStr = " ".join(command)
print("\n\n\n")
print(command)
print("\n\n\n")
print(commandStr)
ffmpeg = subprocess.Popen(commandStr, stderr=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True, shell=True)
while err == None:
out, err = ffmpeg.communicate()
time.sleep(1)
if ffmpeg.returncode == 0 and all([os.path.exists(f) for f in (videoStorage['data_small'], videoStorage['data_big'])]):
print("Job done.")
else:
print("ERROR")
print(err)The resulting command can now be used in
python
or at the command line without needing to be changed at all. The command is :ffmpeg -y -loglevel verbose -i /var/www/temp/film.mp4 -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:x=(1920-iw)/2:y=(1080-ih)/2:color=black" /var/www/temp/videoHD.mp4
The result when executed in
python
isffmpeg version 3.3.4-2~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version='2~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[h264 @ 0x7fb75053d560] Reinit context to 640x368, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/temp/film.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Duration: 00:06:19.80, start: 0.000000, bitrate: 451 kb/s
Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 640x358 (640x368), 313 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x7fb75057f700] Reinit context to 640x368, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0x7fb7506f45e0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[Parsed_scale_0 @ 0x7fb750711000] w:1920 h:1080 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 0x7fb7507126a0] w:640 h:358 pixfmt:yuv420p tb:1/15360 fr:30/1 sar:0/1 sws_param:flags=2
[Parsed_scale_0 @ 0x7fb750711000] w:640 h:358 fmt:yuv420p sar:0/1 -> w:1920 h:1074 fmt:yuv420p sar:0/1 flags:0x4
[Parsed_pad_1 @ 0x7fb750711ac0] w:1920 h:1074 -> w:1920 h:1080 x:0 y:2 color:0x000000FF
[libx264 @ 0x7fb7507139e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fb7507139e0] profile High, level 4.0
[libx264 @ 0x7fb7507139e0] 264 - core 148 r2795 aaa9aa8 - 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=6 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 '/var/www/temp/videoHD.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Stream #0:0(und): Video: h264 (libx264), 1 reference frame ([33][0][0][0] / 0x0021), yuv420p(left), 1920x1080, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.89.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, delay 1024, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.89.100 aac
KilledNote the
Killed
at the end. Is this significant and why is it only happening when executed in the script ?Here is the output from the command line which results in a successful video file.
ffmpeg version 3.3.4-2~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version='2~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[h264 @ 0x7fb52cfb3560] Reinit context to 640x368, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/temp/film.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Duration: 00:06:19.80, start: 0.000000, bitrate: 451 kb/s
Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 640x358 (640x368), 313 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x7fb52cff5700] Reinit context to 640x368, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0x7fb52d16a5e0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[Parsed_scale_0 @ 0x7fb52d187000] w:1920 h:1080 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 0x7fb52d1886a0] w:640 h:358 pixfmt:yuv420p tb:1/15360 fr:30/1 sar:0/1 sws_param:flags=2
[Parsed_scale_0 @ 0x7fb52d187000] w:640 h:358 fmt:yuv420p sar:0/1 -> w:1920 h:1074 fmt:yuv420p sar:0/1 flags:0x4
[Parsed_pad_1 @ 0x7fb52d187ac0] w:1920 h:1074 -> w:1920 h:1080 x:0 y:2 color:0x000000FF
[libx264 @ 0x7fb52d1899e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fb52d1899e0] profile High, level 4.0
[libx264 @ 0x7fb52d1899e0] 264 - core 148 r2795 aaa9aa8 - 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=6 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 '/var/www/temp/videoHD.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Stream #0:0(und): Video: h264 (libx264), 1 reference frame ([33][0][0][0] / 0x0021), yuv420p(left), 1920x1080, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.89.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, delay 1024, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.89.100 aac
frame= 47 fps=0.0 q=0.0 size= 0kB time=00:00:01.66 bitrate= 0.0kbits/s
frame= 59 fps= 41 q=29.0 size= 116kB time=00:00:02.04 bitrate= 464.8kbits/
frame= 71 fps= 35 q=29.0 size= 201kB time=00:00:02.45 bitrate= 671.3kbits/
frame= 80 fps= 31 q=29.0 size= 276kB time=00:00:02.75 bitrate= 822.0kbits/
Blah
Blah
Blah
frame=11337 fps= 21 q=29.0 size= 97503kB time=00:06:17.98 bitrate=2113.2kbits/
frame=11351 fps= 21 q=26.0 size= 97572kB time=00:06:18.45 bitrate=2112.1kbits/
frame=11371 fps= 21 q=29.0 size= 97745kB time=00:06:19.11 bitrate=2112.1kbits/
frame=11390 fps= 21 q=29.0 size= 97852kB time=00:06:19.73 bitrate=2111.0kbits/
No more output streams to write to, finishing.
frame=11392 fps= 21 q=-1.0 Lsize= 98519kB time=00:06:19.77 bitrate=2125.1kbits/s speed=0.688x
video:92124kB audio:5986kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.416313%
Input file #0 (/var/www/temp/film.mp4):
Input stream #0:0 (video): 11392 packets read (14892948 bytes); 11392 frames decoded;
Input stream #0:1 (audio): 17803 packets read (6112540 bytes); 17802 frames decoded (18229248 samples);
Total: 29195 packets (21005488 bytes) demuxed
Output file #0 (/var/www/temp/videoHD.mp4):
Output stream #0:0 (video): 11392 frames encoded; 11392 packets muxed (94334785 bytes);
Output stream #0:1 (audio): 17802 frames encoded (18229248 samples); 17803 packets muxed (6129981 bytes);
Total: 29195 packets (100464766 bytes) muxed
[libx264 @ 0x7fb52d1899e0] frame I:74 Avg QP:19.08 size: 51540
[libx264 @ 0x7fb52d1899e0] frame P:3506 Avg QP:21.34 size: 19348
[libx264 @ 0x7fb52d1899e0] frame B:7812 Avg QP:24.07 size: 2904
[libx264 @ 0x7fb52d1899e0] consecutive B-frames: 1.3% 20.2% 4.6% 73.9%
[libx264 @ 0x7fb52d1899e0] mb I I16..4: 19.7% 73.6% 6.7%
[libx264 @ 0x7fb52d1899e0] mb P I16..4: 3.2% 6.4% 0.1% P16..4: 52.5% 7.6% 2.6% 0.0% 0.0% skip:27.6%
[libx264 @ 0x7fb52d1899e0] mb B I16..4: 0.2% 0.2% 0.0% B16..8: 23.2% 0.4% 0.0% direct: 0.5% skip:75.5% L0:51.8% L1:46.6% BI: 1.6%
[libx264 @ 0x7fb52d1899e0] 8x8 transform intra:66.4% inter:94.0%
[libx264 @ 0x7fb52d1899e0] coded y,uvDC,uvAC intra: 33.6% 53.4% 7.3% inter: 5.3% 14.2% 0.0%
[libx264 @ 0x7fb52d1899e0] i16 v,h,dc,p: 22% 27% 5% 46%
[libx264 @ 0x7fb52d1899e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 19% 20% 4% 7% 7% 7% 5% 4%
[libx264 @ 0x7fb52d1899e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 28% 11% 3% 9% 7% 6% 3% 2%
[libx264 @ 0x7fb52d1899e0] i8c dc,h,v,p: 49% 21% 20% 10%
[libx264 @ 0x7fb52d1899e0] Weighted P-Frames: Y:0.5% UV:0.1%
[libx264 @ 0x7fb52d1899e0] ref P L0: 63.4% 8.9% 21.4% 6.3% 0.0%
[libx264 @ 0x7fb52d1899e0] ref B L0: 89.3% 9.1% 1.6%
[libx264 @ 0x7fb52d1899e0] ref B L1: 98.1% 1.9%
[libx264 @ 0x7fb52d1899e0] kb/s:1987.38
[aac @ 0x7fb52d18ae80] Qavg: 1160.814Any more ideas why this is being handled differently in
python
as opposed to the command line ?I’m believe this is a version issue and that is why the below answer did not work for me, things were fine before I upgraded but since then a lot of things have been playing up. I upgraded both
ffmpeg
andpython
versions and don’t really want to go back if it can be avoided.Thanks,
Stu
-
Evolution #2250 : Un bouton pour envoyer les identifiants
9 novembre 2017, par RastaPopoulos ♥Une ressource (je stocke ça là) :
https://www.smashingmagazine.com/2017/11/safe-password-resets-with-json-web-tokens/ -
An FFMpeg function on azure is not handling simultaneous calls (more than 5)
9 novembre 2017, par The LemonI created a c# httptrigger function on azure which uses FFMpeg to add subtitles to a video, and then just output the video locally (nothing fancy, all the files are in the local resources for the function, and the output is there as well). The process runs perfectly fine when I test it, I made a C# app to call the function and when I test the app it works fine as well. The only problem is when I tell the app to call the function several times at once it will only work for three or four simultaneous calls, any more than that will cause all of the calls to fail.
Below is included the function code, the C# app code, and the partial output for successful calls and for failed calls. Any help or advice would be greatly appreciated as always. Regards Cuannote - the ffmpeg output from the azure function is largely omitted, as it produces output every few frames. I’ve included the start and the end of the output
This is the C# method which is being run multiple times at once.
public static async void callHTTP(string url, int num)
{
using (var client = new HttpClient())
{
client.Timeout = TimeSpan.FromMinutes(10);
var content = new StringContent(JsonConvert.SerializeObject(" {\"name\": \"Azure\"}"), Encoding.UTF8, "application/json");
System.TimeSpan tmp = DateTime.Now - time1;
Console.WriteLine("Process {0} has started after time {1}", num + 1, tmp.ToString());
var response = await client.PostAsync(url, content);
tmp = DateTime.Now - time1;
Console.WriteLine("Process {0} has finished after time {1}", num + 1, tmp.ToString());
if (response.IsSuccessStatusCode)
{
Console.WriteLine("this is a reply");
finished += 1;
tmp = DateTime.Now - time1;
Console.WriteLine("Runningtime for process {0} was {1}", num + 1, tmp.ToString());
}
}
}This is the function being called
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.");
//Basic Parameters
string ffmpegFile = @"D:\home\site\wwwroot\CommonResources\ffmpeg.exe";
string outputpath = @"D:\home\site\wwwroot\ffmpeg_generic_webhook\output\";
string reloutputpath = "output/";
string relinputpath = "input/";
string outputfile = "video2.mp4";
string dir = @"D:\home\site\wwwroot\ffmpeg_generic_webhook\";
//Special Parameters
string videoFile = "1 minute basic.mp4";
string sub = "1 minute sub.ass";
//guid tmp files
string f1 = videoFile;
string f2 = sub;
//guid output
Guid g3 = Guid.NewGuid();
string outputGuid = g3+".mp4";
//argument
string tmp = subArg(f1, f2, outputGuid );
//String.Format("-i \"" + @"input/tmp.mp4" + "\" -vf \"ass = '" + sub + "'\" \"" + reloutputpath +outputfile + "\" ");
log.Info("ffmpeg argument is: "+tmp);
//startprocess parameters
Process process = new Process();
process.StartInfo.FileName = ffmpegFile;
process.StartInfo.Arguments = tmp;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.WorkingDirectory = dir;
//output handler
process.OutputDataReceived += new DataReceivedEventHandler(
(s, e) =>
{
log.Info("O: "+e.Data);
}
);
process.ErrorDataReceived += new DataReceivedEventHandler(
(s, e) =>
{
log.Info("E: "+e.Data);
}
);
//start process
process.Start();
log.Info("process started");
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.WaitForExit();
log.Info("process has finished, deleting any tmp files and replying");
return req.CreateResponse(HttpStatusCode.OK, outputGuid);
}
</httpresponsemessage>The output for the failed set of calls (they all run together, so the output is a bit jumbled)
2017-11-08T05:49:48.821 Function started (Id=1b2cc785-086d-495a-a994-3ee9b86bb926)
2017-11-08T05:49:48.834 Function started (Id=f0b9b383-b86b-4006-9e13-59861e2c0c35)
2017-11-08T05:49:48.834 Function started (Id=80c2a433-728e-42d3-804d-87461e369bd8)
2017-11-08T05:49:49.287 C# HTTP trigger function processed a request.
2017-11-08T05:49:49.287 ffmpeg argument is: -i "input/1 minute basic.mp4" -vf "ass = 'input/1 minute sub.ass'" "output/8ab2a4fd-39df-4da9-b0c5-5b33e95d6403.mp4"
2017-11-08T05:49:49.305 C# HTTP trigger function processed a request.
2017-11-08T05:49:49.305 ffmpeg argument is: -i "input/1 minute basic.mp4" -vf "ass = 'input/1 minute sub.ass'" "output/5805f054-db13-4154-8fe8-545161d2eb83.mp4"
2017-11-08T05:49:49.305 C# HTTP trigger function processed a request.
2017-11-08T05:49:49.305 ffmpeg argument is: -i "input/1 minute basic.mp4" -vf "ass = 'input/1 minute sub.ass'" "output/4275f98d-7a31-484c-960b-1e133056e895.mp4"
2017-11-08T05:49:49.381 process started
2017-11-08T05:49:49.428 process started
2017-11-08T05:49:49.491 E: ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
2017-11-08T05:49:49.491 E: built with gcc 7.1.0 (GCC)
2017-11-08T05:49:49.491 E: 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
2017-11-08T05:49:49.491 E: libavutil 55. 58.100 / 55. 58.100
2017-11-08T05:49:49.491 E: libavcodec 57. 89.100 / 57. 89.100
2017-11-08T05:49:49.491 E: libavformat 57. 71.100 / 57. 71.100
2017-11-08T05:49:49.491 E: libavdevice 57. 6.100 / 57. 6.100
2017-11-08T05:49:49.491 E: libavfilter 6. 82.100 / 6. 82.100
2017-11-08T05:49:49.491 E: libswscale 4. 6.100 / 4. 6.100
2017-11-08T05:49:49.491 E: libswresample 2. 7.100 / 2. 7.100
2017-11-08T05:49:49.491 E: libpostproc 54. 5.100 / 54. 5.100
2017-11-08T05:49:49.522 process started
2017-11-08T05:49:49.570 E: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input/1 minute basic.mp4':
2017-11-08T05:49:49.570 E: Metadata:
2017-11-08T05:49:49.570 E: major_brand : mp42
2017-11-08T05:49:49.570 E: minor_version : 0
2017-11-08T05:49:49.570 E: compatible_brands: mp41isom
2017-11-08T05:49:49.570 E: creation_time : 2017-11-03T23:42:35.000000Z
2017-11-08T05:49:49.570 E: Duration: 00:01:00.03, start: 0.000000, bitrate: 824 kb/s
2017-11-08T05:49:49.570 E: Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 823 kb/s, 30.30 fps, 30.30 tbr, 30k tbn, 60 tbc (default)
2017-11-08T05:49:49.570 E: Metadata:
2017-11-08T05:49:49.570 E: creation_time : 2017-11-03T23:42:35.000000Z
2017-11-08T05:49:49.570 E: handler_name : VideoHandler
2017-11-08T05:49:49.570 E: encoder : AVC Coding
2017-11-08T05:49:49.584 E: Stream mapping:
2017-11-08T05:49:49.584 E: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
2017-11-08T05:49:49.584 E: Press [q] to stop, [?] for help
2017-11-08T05:49:49.615 E: [Parsed_ass_0 @ 000000000117ee60] Shaper: FriBidi 0.19.6 (SIMPLE)
2017-11-08T05:49:49.631 process started
2017-11-08T05:49:49.929 process started
2017-11-08T05:49:50.069 process started
2017-11-08T05:49:50.115 process started
2017-11-08T05:49:54.990 E: [Parsed_ass_0 @ 000000000117ee60] Using font provider directwrite
2017-11-08T05:49:54.990 E: [Parsed_ass_0 @ 000000000117ee60] Added subtitle file: 'input/1 minute sub.ass' (5 styles, 6 events)
2017-11-08T05:49:55.006 E: [Parsed_ass_0 @ 000000000117ee60] fontselect: (Arial, 700, 0) -> Arial-BoldMT, 0, Arial-BoldMT
2017-11-08T05:49:55.006 E: [libx264 @ 00000000004dd860] using SAR=1/1
2017-11-08T05:49:55.006 E: [libx264 @ 00000000004dd860] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
2017-11-08T05:49:55.022 E: [libx264 @ 00000000004dd860] profile High, level 3.2
2017-11-08T05:49:55.022 E: [libx264 @ 00000000004dd860] 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
2017-11-08T05:49:55.022 E: Output #0, mp4, to 'output/8ab2a4fd-39df-4da9-b0c5-5b33e95d6403.mp4':
2017-11-08T05:49:55.022 E: Metadata:
2017-11-08T05:49:55.022 E: major_brand : mp42
2017-11-08T05:49:55.022 E: minor_version : 0
2017-11-08T05:49:55.022 E: compatible_brands: mp41isom
2017-11-08T05:49:55.022 E: encoder : Lavf57.71.100
2017-11-08T05:49:55.022 E: Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30.30 fps, 16k tbn, 30.30 tbc (default)
2017-11-08T05:49:55.022 E: Metadata:
2017-11-08T05:49:55.022 E: creation_time : 2017-11-03T23:42:35.000000Z
2017-11-08T05:49:55.022 E: handler_name : VideoHandler
2017-11-08T05:49:55.022 E: encoder : Lavc57.89.100 libx264
2017-11-08T05:49:55.022 E: Side data:
2017-11-08T05:49:55.022 E: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
2017-11-08T05:49:56.787 E: frame= 2 fps=0.4 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
2017-11-08T05:49:56.851 E: frame= 4 fps=0.6 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0xlots of code omitted here, only showing one of the many calls failing due to character limit.
2017-11-08T05:50:27.695 E: x264 [error]: malloc of size 3233984 failed
2017-11-08T05:50:27.695 E: Video encoding failed
2017-11-08T05:50:27.932 E: frame= 112 fps=3.0 q=29.0 size= 92kB time=00:00:02.24 bitrate= 335.9kbits/s speed=0.0598x
2017-11-08T05:50:28.132 E: Conversion failed!
2017-11-08T05:50:28.274 E: frame= 164 fps=4.3 q=29.0 size= 97kB time=00:00:03.96 bitrate= 201.0kbits/s speed=0.104x
2017-11-08T05:50:28.304 E: Conversion failed!
2017-11-08T05:50:28.304 E: Conversion failed!
2017-11-08T05:50:28.336 E: frame= 253 fps=6.6 q=29.0 size= 159kB time=00:00:06.89 bitrate= 189.0kbits/s speed=0.179x
2017-11-08T05:50:30.163 E: frame= 27 fps=0.7 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
2017-11-08T05:50:30.227 E: frame= 28 fps=0.7 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
2017-11-08T05:50:30.276 E:
2017-11-08T05:50:30.305 O:
2017-11-08T05:50:30.727 E: frame= 40 fps=1.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
2017-11-08T05:50:30.867 E: frame= 129 fps=3.2 q=29.0 size= 93kB time=00:00:02.80 bitrate= 272.3kbits/s speed=0.0693x
2017-11-08T05:50:30.929 E:
2017-11-08T05:50:30.929 O:
2017-11-08T05:50:30.929 E:
2017-11-08T05:50:30.948 O:
2017-11-08T05:50:31.290 E: frame= 178 fps=4.3 q=29.0 size= 116kB time=00:00:04.42 bitrate= 214.8kbits/s speed=0.108x
2017-11-08T05:50:31.822 E: frame= 133 fps=3.2 q=29.0 size= 94kB time=00:00:02.93 bitrate= 261.0kbits/s speed=0.0715xworking example (only one call)
2017-11-08T07:07:08.633 Function started (Id=5416410c-a185-44bd-8c9c-fc24efb80780)
2017-11-08T07:07:09.180 C# HTTP trigger function processed a request.
2017-11-08T07:07:09.180 ffmpeg argument is: -i "input/1 minute basic.mp4" -vf "ass = 'input/1 minute sub.ass'" "output/9a7af992-7202-45c6-a275-f71a184fc89b.mp4"
2017-11-08T07:07:09.508 process started
2017-11-08T07:07:10.992 E: ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
2017-11-08T07:07:10.992 E: built with gcc 7.1.0 (GCC)
2017-11-08T07:07:10.992 E: 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
2017-11-08T07:07:11.367 E: libavutil 55. 58.100 / 55. 58.100
2017-11-08T07:07:11.367 E: libavcodec 57. 89.100 / 57. 89.100
2017-11-08T07:07:11.367 E: libavformat 57. 71.100 / 57. 71.100
2017-11-08T07:07:11.367 E: libavdevice 57. 6.100 / 57. 6.100
2017-11-08T07:07:11.367 E: libavfilter 6. 82.100 / 6. 82.100
2017-11-08T07:07:11.367 E: libswscale 4. 6.100 / 4. 6.100
2017-11-08T07:07:11.367 E: libswresample 2. 7.100 / 2. 7.100
2017-11-08T07:07:11.367 E: libpostproc 54. 5.100 / 54. 5.100
2017-11-08T07:07:12.977 E: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input/1 minute basic.mp4':
2017-11-08T07:07:12.977 E: Metadata:
2017-11-08T07:07:12.977 E: major_brand : mp42
2017-11-08T07:07:12.977 E: minor_version : 0
2017-11-08T07:07:12.977 E: compatible_brands: mp41isom
2017-11-08T07:07:12.977 E: creation_time : 2017-11-03T23:42:35.000000Z
2017-11-08T07:07:12.977 E: Duration: 00:01:00.03, start: 0.000000, bitrate: 824 kb/s
2017-11-08T07:07:12.977 E: Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 823 kb/s, 30.30 fps, 30.30 tbr, 30k tbn, 60 tbc (default)
2017-11-08T07:07:12.977 E: Metadata:
2017-11-08T07:07:12.977 E: creation_time : 2017-11-03T23:42:35.000000Z
2017-11-08T07:07:12.977 E: handler_name : VideoHandler
2017-11-08T07:07:12.977 E: encoder : AVC Coding
2017-11-08T07:07:12.992 E: Stream mapping:
2017-11-08T07:07:13.008 E: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
2017-11-08T07:07:13.008 E: Press [q] to stop, [?] for help
2017-11-08T07:07:13.320 E: [Parsed_ass_0 @ 000000000107ee60] Shaper: FriBidi 0.19.6 (SIMPLE)
2017-11-08T07:07:14.987 E: [Parsed_ass_0 @ 000000000107ee60] Using font provider directwrite
2017-11-08T07:07:15.143 E: [Parsed_ass_0 @ 000000000107ee60] Added subtitle file: 'input/1 minute sub.ass' (5 styles, 6 events)
2017-11-08T07:07:15.455 E: [Parsed_ass_0 @ 000000000107ee60] fontselect: (Arial, 700, 0) -> Arial-BoldMT, 0, Arial-BoldMT
2017-11-08T07:07:15.833 E: [libx264 @ 00000000004fd860] using SAR=1/1
2017-11-08T07:07:15.911 E: [libx264 @ 00000000004fd860] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
2017-11-08T07:07:15.973 E: [libx264 @ 00000000004fd860] profile High, level 3.2
2017-11-08T07:07:15.973 E: [libx264 @ 00000000004fd860] 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
2017-11-08T07:07:15.973 E: Output #0, mp4, to 'output/9a7af992-7202-45c6-a275-f71a184fc89b.mp4':
2017-11-08T07:07:15.973 E: Metadata:
2017-11-08T07:07:15.973 E: major_brand : mp42
2017-11-08T07:07:15.973 E: minor_version : 0
2017-11-08T07:07:15.973 E: compatible_brands: mp41isom
2017-11-08T07:07:15.973 E: encoder : Lavf57.71.100
2017-11-08T07:07:15.973 E: Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30.30 fps, 16k tbn, 30.30 tbc (default)
2017-11-08T07:07:15.973 E: Metadata:
2017-11-08T07:07:15.973 E: creation_time : 2017-11-03T23:42:35.000000Z
2017-11-08T07:07:15.973 E: handler_name : VideoHandler
2017-11-08T07:07:15.973 E: encoder : Lavc57.89.100 libx264
2017-11-08T07:07:15.973 E: Side data:
2017-11-08T07:07:15.973 E: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
2017-11-08T07:07:16.137 E: frame= 2 fps=0.7 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
2017-11-08T07:07:16.528 E: frame= 21 fps=6.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
2017-11-08T07:07:17.622 E: frame= 43 fps=9.5 q=29.0 size= 34kB time=-00:00:00.03 bitrate=N/A speed=N/A
2017-11-08T07:07:18.122 E: frame= 46 fps=9.1 q=29.0 size= 35kB time=00:00:00.06 bitrate=4372.6kbits/s speed=0.013xomitted
2017-11-08T07:07:30.809 E: [Parsed_ass_0 @ 000000000107ee60] fontselect: (Arial, 400, 0) -> ArialMT, 0, ArialMT
2017-11-08T07:08:43.186 E: frame= 1819 fps= 20 q=29.0 Lsize= 992kB time=00:00:59.92 bitrate= 135.6kbits/s speed=0.665x
2017-11-08T07:08:43.186 E: video:971kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.171792%
2017-11-08T07:08:43.217 E: [libx264 @ 00000000004fd860] frame I:8 Avg QP:12.19 size: 44849
2017-11-08T07:08:43.217 E: [libx264 @ 00000000004fd860] frame P:532 Avg QP:16.00 size: 923
2017-11-08T07:08:43.217 E: [libx264 @ 00000000004fd860] frame B:1279 Avg QP:20.61 size: 112
2017-11-08T07:08:43.217 E: [libx264 @ 00000000004fd860] consecutive B-frames: 4.7% 0.8% 11.4% 83.1%
2017-11-08T07:08:43.217 E: [libx264 @ 00000000004fd860] mb I I16..4: 49.2% 24.2% 26.7%
2017-11-08T07:08:43.217 E: [libx264 @ 00000000004fd860] mb P I16..4: 0.2% 0.3% 0.1% P16..4: 2.6% 0.3% 0.4% 0.0% 0.0% skip:96.2%
2017-11-08T07:08:43.217 E: [libx264 @ 00000000004fd860] mb B I16..4: 0.0% 0.1% 0.0% B16..8: 2.1% 0.0% 0.0% direct: 0.0% skip:97.7% L0:40.0% L1:59.7% BI: 0.3%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] 8x8 transform intra:39.3% inter:39.5%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] coded y,uvDC,uvAC intra: 16.3% 15.7% 8.8% inter: 0.5% 0.0% 0.0%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] i16 v,h,dc,p: 56% 31% 4% 9%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 9% 65% 1% 0% 0% 0% 0% 0%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 21% 15% 6% 6% 6% 4% 6% 4%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] i8c dc,h,v,p: 71% 16% 11% 1%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] Weighted P-Frames: Y:0.0% UV:0.0%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] ref P L0: 71.3% 12.7% 14.6% 1.4%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] ref B L0: 69.3% 29.3% 1.4%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] ref B L1: 97.0% 3.0%
2017-11-08T07:08:43.233 E: [libx264 @ 00000000004fd860] kb/s:132.38
2017-11-08T07:08:43.295 O:
2017-11-08T07:08:43.295 E:
2017-11-08T07:08:43.342 Function completed (Success, Id=5416410c-a185-44bd-8c9c-fc24efb80780, Duration=94698ms)