SHOW:
|
|
- or go back to the newest paste.
1 | Dont have to use Vulcan to build ffmpeg libs on heroku hardware. The precompiled linux-64 binary from the download page will work. Just get it and include in ./vendor/bin of your project. | |
2 | ||
3 | - | http://ffmpeg.org/download.html - download the ffmpeg binary and run as shown in logs below: |
3 | + | download the static binary for linux-64 from ffmpeg/downloads page and include in heroku project |
4 | insert following bash script into heroku project | |
5 | - | heroku logs... |
5 | + | push to heroku |
6 | alter heroku PATH to include the new binaries ( script, ffmpeg ) | |
7 | - | 3 posts below - ffmpeg pass1, ffmpeg pass2, download mp4 created by pass2 |
7 | + | |
8 | - | |
8 | + | run the script |
9 | - | [ffmpeg, -y, -i, me760935400.jpg, -i, 20121216113810.wav, -r, 1/2, -pass, 1, -vcodec, libx264, -b:v, 200k, -bt, 50k, -threads, 0, -an, -f, mp4, -strict, -2, -passlogfile, mydummy, /dev/null] |
9 | + | |
10 | - | |
10 | + | #!/bin/bash |
11 | - | [ffmpeg, -y, -i, me760935400.jpg, -i, 20121216113810.wav, -r, 1/2, -pass, 2, -ar, 44100, -vcodec, libx264, -b:v, 200k, -bt, 50k, -threads, 0, -an, -f, mp4, -strict, -2, -passlogfile, mydummy, dummy.mp4] |
11 | + | # get 2 input files ( jpg , wav ) and use them in 2pass ffmpeg to create an .mp4 output file |
12 | - | |
12 | + | shopt -s globstar |
13 | - | method=GET path=/blob/dummy.mp4 |
13 | + | uri=$1 |
14 | - | |
14 | + | filnam="${uri##*/}" |
15 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Starting process [ffmpeg, -y, -i, me760935400.jpg, -i, 20121216113810.wav, -r, 1/2, -pass, 1, -vcodec, libx264, -b:v, 200k, -bt, 50k, -threads, 0, -an, -f, mp4, -strict, -2, -passlogfile, mydummy, /dev/null] |
15 | + | uri2=$2 |
16 | - | |
16 | + | filnam2="${uri2##*/}" |
17 | - | 2012-12-22T19:53:01+00:00 app[web.1]: ffmpeg version N-47810-geee8c94 Copyright (c) 2000-2012 the FFmpeg developers |
17 | + | curl -#LO $uri |
18 | - | 2012-12-22T19:53:01+00:00 app[web.1]: built on Dec 13 2012 09:06:31 with gcc 4.7 (Debian 4.7.2-4) |
18 | + | curl -#LO $uri2 |
19 | - | 2012-12-22T19:53:01+00:00 app[web.1]: configuration: --extra-cflags=-I../static/include --extra-ldflags='-L../static/lib -static' --enable-gpl --enable-version3 --enable-static --disable-shared --disable-debug --enable-runtime-cpudetect --disable-x11grab --enable-libmp3lame --enable-libx264 --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --disable-ffserver |
19 | + | ffmpeg -y -i "$filnam" -i "$filnam2" -r 1/2 -pass 1 -vcodec libx264 -b:v 200k -bt 50k -an -f mp4 -strict -2 -passlogfile mydummy /dev/null |
20 | - | 2012-12-22T19:53:01+00:00 app[web.1]: libavutil 52. 12.100 / 52. 12.100 |
20 | + | ffmpeg -y -i "$filnam" -i "$filnam2" -r 1/2 -pass 2 -vcodec libx264 -b:v 200k -bt 50k -f mp4 -strict -2 -passlogfile mydummy -ar 44100 filot.mp4 |
21 | - | 2012-12-22T19:53:01+00:00 app[web.1]: libavcodec 54. 79.102 / 54. 79.102 |
21 | + | |
22 | - | 2012-12-22T19:53:01+00:00 app[web.1]: libavformat 54. 49.101 / 54. 49.101 |
22 | + | $ vendor/bin/pars_submit http://files.parse.com/1315e4d8-f302-4337-adbe-d8650ab5c312/c74489cb-c962-4678-b762-f7e990cb397b-me760935400.jpg http://files.parse.com/1315e4d8-f302-4337-adbe-d8650ab5c312/f780cfa6-d569-40c6-9b23-8632db887d5c-20121216113810.wav |
23 | - | 2012-12-22T19:53:01+00:00 app[web.1]: libavdevice 54. 3.102 / 54. 3.102 |
23 | + | http://files.parse.com/1315e4d8-f302-4337-adbe-d8650ab5c312/c74489cb-c962-4678-b762-f7e990cb397b-me760935400.jpg |
24 | - | 2012-12-22T19:53:01+00:00 app[web.1]: libavfilter 3. 27.101 / 3. 27.101 |
24 | + | c74489cb-c962-4678-b762-f7e990cb397b-me760935400.jpg |
25 | - | 2012-12-22T19:53:01+00:00 app[web.1]: libswscale 2. 1.103 / 2. 1.103 |
25 | + | |
26 | - | 2012-12-22T19:53:01+00:00 app[web.1]: libswresample 0. 17.102 / 0. 17.102 |
26 | + | ############################################################################################################################# 100.0% |
27 | - | 2012-12-22T19:53:01+00:00 app[web.1]: libpostproc 52. 2.100 / 52. 2.100 |
27 | + | ############################################################################################################################# 100.0% |
28 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Input #0, image2, from 'me760935400.jpg': |
28 | + | ffmpeg version N-47810-geee8c94 Copyright (c) 2000-2012 the FFmpeg developers |
29 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Duration: 00:00:00.04, start: 0.000000, bitrate: N/A |
29 | + | built on Dec 13 2012 09:06:31 with gcc 4.7 (Debian 4.7.2-4) |
30 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Stream #0:0: Video: mjpeg, yuvj420p, 1296x972 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc |
30 | + | configuration: --extra-cflags=-I../static/include --extra-ldflags='-L../static/lib -static' --enable-gpl --enable-version3 --enable-static --disable-shared --disable-debug --enable-runtime-cpudetect --disable-x11grab --enable-libmp3lame --enable-libx264 --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --disable-ffserver |
31 | - | 2012-12-22T19:53:01+00:00 app[web.1]: [wav @ 0x255bd60] max_analyze_duration 5000000 reached at 5120000 |
31 | + | libavutil 52. 12.100 / 52. 12.100 |
32 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Guessed Channel Layout for Input Stream #1.0 : mono |
32 | + | libavcodec 54. 79.102 / 54. 79.102 |
33 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Input #1, wav, from '20121216113810.wav': |
33 | + | libavformat 54. 49.101 / 54. 49.101 |
34 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Duration: 00:00:21.27, bitrate: 256 kb/s |
34 | + | libavdevice 54. 3.102 / 54. 3.102 |
35 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s |
35 | + | libavfilter 3. 27.101 / 3. 27.101 |
36 | - | 2012-12-22T19:53:01+00:00 app[web.1]: [libx264 @ 0x255a2e0] using SAR=1/1 |
36 | + | libswscale 2. 1.103 / 2. 1.103 |
37 | - | 2012-12-22T19:53:01+00:00 app[web.1]: [libx264 @ 0x255a2e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 |
37 | + | libswresample 0. 17.102 / 0. 17.102 |
38 | - | 2012-12-22T19:53:01+00:00 app[web.1]: [libx264 @ 0x255a2e0] profile Main, level 3.2 |
38 | + | libpostproc 52. 2.100 / 52. 2.100 |
39 | - | 2012-12-22T19:53:01+00:00 app[web.1]: [libx264 @ 0x255a2e0] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 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=1 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=200 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 |
39 | + | Input #0, image2, from 'c74489cb-c962-4678-b762-f7e990cb397b-me760935400.jpg': |
40 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Output #0, mp4, to '/dev/null': |
40 | + | Duration: 00:00:00.04, start: 0.000000, bitrate: N/A |
41 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Metadata: |
41 | + | Stream #0:0: Video: mjpeg, yuvj420p, 1296x972 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc |
42 | - | 2012-12-22T19:53:01+00:00 app[web.1]: encoder : Lavf54.49.101 |
42 | + | [wav @ 0x2984700] max_analyze_duration 5000000 reached at 5120000 |
43 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 1296x972 [SAR 1:1 DAR 4:3], q=-1--1, pass 1, 200 kb/s, 16384 tbn, 0.50 tbc |
43 | + | Guessed Channel Layout for Input Stream #1.0 : mono |
44 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Stream mapping: |
44 | + | Input #1, wav, from 'f780cfa6-d569-40c6-9b23-8632db887d5c-20121216113810.wav': |
45 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Stream #0:0 -> #0:0 (mjpeg -> libx264) |
45 | + | Duration: 00:00:21.27, bitrate: 256 kb/s |
46 | - | 2012-12-22T19:53:01+00:00 app[web.1]: Press [q] to stop, [?] for help |
46 | + | Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s |
47 | - | 2012-12-22T19:53:02+00:00 app[web.1]: frame= 1 fps=0.0 q=4.0 Lsize= 848kB time=00:00:02.00 bitrate=3472.1kbits/s |
47 | + | File '/dev/null' already exists. Overwrite ? [y/N] y |
48 | - | 2012-12-22T19:53:02+00:00 app[web.1]: video:847kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.087747% |
48 | + | using SAR=1/1 |
49 | - | 2012-12-22T19:53:02+00:00 app[web.1]: [libx264 @ 0x255a2e0] frame I:1 Avg QP: 5.49 size:866529 |
49 | + | [libx264 @ 0x298b000] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 |
50 | - | 2012-12-22T19:53:02+00:00 app[web.1]: [libx264 @ 0x255a2e0] mb I I16..4: 7.4% 0.0% 92.6% |
50 | + | [libx264 @ 0x298b000] profile Main, level 3.2 |
51 | - | 2012-12-22T19:53:02+00:00 app[web.1]: [libx264 @ 0x255a2e0] final ratefactor: 28.98 |
51 | + | [libx264 @ 0x298b000] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 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=1 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=200 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 |
52 | - | 2012-12-22T19:53:02+00:00 app[web.1]: [libx264 @ 0x255a2e0] coded y,uvDC,uvAC intra: 99.8% 99.8% 99.7% |
52 | + | Output #0, mp4, to '/dev/null': |
53 | - | 2012-12-22T19:53:02+00:00 app[web.1]: [libx264 @ 0x255a2e0] i16 v,h,dc,p: 10% 5% 70% 15% |
53 | + | Metadata: |
54 | - | 2012-12-22T19:53:02+00:00 app[web.1]: [libx264 @ 0x255a2e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 14% 12% 6% 6% 7% 14% 8% 13% |
54 | + | encoder : Lavf54.49.101 |
55 | - | 2012-12-22T19:53:02+00:00 app[web.1]: [libx264 @ 0x255a2e0] i8c dc,h,v,p: 45% 19% 22% 14% |
55 | + | Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 1296x972 [SAR 1:1 DAR 4:3], q=-1--1, pass 1, 200 kb/s, 16384 tbn, 0.50 tbc |
56 | - | 2012-12-22T19:53:02+00:00 app[web.1]: [libx264 @ 0x255a2e0] kb/s:3466.12 |
56 | + | Stream mapping: |
57 | - | 2012-12-22T19:53:02+00:00 heroku[router]: at=info method=GET path=/ffmpeg?infil1=me760935400.jpg&infil2=20121216113810.wav&outfil=pass1 host=nameless-sands-7303.herokuapp.com fwd=108.192.16.200 dyno=web.1 queue=0 wait=0ms connect=14ms service=1536ms status=200 bytes=19 |
57 | + | Stream #0:0 -> #0:0 (mjpeg -> libx264) |
58 | - | ==ENDOF response 1 |
58 | + | Press [q] to stop, [?] for help |
59 | - | |
59 | + | frame= 1 fps=0.0 q=4.0 Lsize= 848kB time=00:00:02.00 bitrate=3472.1kbits/s |
60 | - | 2012-12-22T19:53:38+00:00 app[web.1]: Starting process [ffmpeg, -y, -i, me760935400.jpg, -i, 20121216113810.wav, -r, 1/2, -pass, 2, -ar, 44100, -vcodec, libx264, -b:v, 200k, -bt, 50k, -threads, 0, -an, -f, mp4, -strict, -2, -passlogfile, mydummy, dummy.mp4] |
60 | + | video:847kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.087747% |
61 | - | |
61 | + | [libx264 @ 0x298b000] frame I:1 Avg QP: 5.49 size:866529 |
62 | - | 2012-12-22T19:53:38+00:00 app[web.1]: ffmpeg version N-47810-geee8c94 Copyright (c) 2000-2012 the FFmpeg developers |
62 | + | [libx264 @ 0x298b000] mb I I16..4: 7.4% 0.0% 92.6% |
63 | - | 2012-12-22T19:53:38+00:00 app[web.1]: built on Dec 13 2012 09:06:31 with gcc 4.7 (Debian 4.7.2-4) |
63 | + | [libx264 @ 0x298b000] final ratefactor: 28.98 |
64 | - | 2012-12-22T19:53:38+00:00 app[web.1]: configuration: --extra-cflags=-I../static/include --extra-ldflags='-L../static/lib -static' --enable-gpl --enable-version3 --enable-static --disable-shared --disable-debug --enable-runtime-cpudetect --disable-x11grab --enable-libmp3lame --enable-libx264 --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --disable-ffserver |
64 | + | [libx264 @ 0x298b000] coded y,uvDC,uvAC intra: 99.8% 99.8% 99.7% |
65 | - | 2012-12-22T19:53:38+00:00 app[web.1]: libavutil 52. 12.100 / 52. 12.100 |
65 | + | [libx264 @ 0x298b000] i16 v,h,dc,p: 10% 5% 70% 15% |
66 | - | 2012-12-22T19:53:38+00:00 app[web.1]: libavcodec 54. 79.102 / 54. 79.102 |
66 | + | [libx264 @ 0x298b000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 14% 12% 6% 6% 7% 14% 8% 13% |
67 | - | 2012-12-22T19:53:38+00:00 app[web.1]: libavformat 54. 49.101 / 54. 49.101 |
67 | + | [libx264 @ 0x298b000] i8c dc,h,v,p: 45% 19% 22% 14% |
68 | - | 2012-12-22T19:53:38+00:00 app[web.1]: libavdevice 54. 3.102 / 54. 3.102 |
68 | + | [libx264 @ 0x298b000] kb/s:3466.12 |