winlin

fix build ffmpeg bug, add -ldl compile option

@@ -81,7 +81,7 @@ else @@ -81,7 +81,7 @@ else
81 --prefix=${ff_release_dir} --cc= \ 81 --prefix=${ff_release_dir} --cc= \
82 --enable-static --disable-shared --disable-debug \ 82 --enable-static --disable-shared --disable-debug \
83 --extra-cflags='-I${ffmpeg_exported_release_dir}/include' \ 83 --extra-cflags='-I${ffmpeg_exported_release_dir}/include' \
84 - --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm' \ 84 + --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \
85 --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \ 85 --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \
86 --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \ 86 --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \
87 --enable-libx264 --enable-libmp3lame --enable-libaacplus \ 87 --enable-libx264 --enable-libmp3lame --enable-libaacplus \
@@ -17,7 +17,8 @@ vhost __defaultVhost__ { @@ -17,7 +17,8 @@ vhost __defaultVhost__ {
17 hls_window 30; 17 hls_window 30;
18 #forward 127.0.0.1:1936; 18 #forward 127.0.0.1:1936;
19 transcode { 19 transcode {
20 - ffmpeg ./objs/ffmpeg/bin/ffmpeg; 20 + enabled on;
  21 + ffmpeg ./objs/ffmpeg/bin/ffmpeg;
21 engine fd{ 22 engine fd{
22 vcodec libx264; 23 vcodec libx264;
23 vbitrate 300; 24 vbitrate 300;
@@ -33,13 +34,17 @@ vhost __defaultVhost__ { @@ -33,13 +34,17 @@ vhost __defaultVhost__ {
33 asample_rate 22050; 34 asample_rate 22050;
34 achannels 2; 35 achannels 2;
35 aparams {} 36 aparams {}
36 - output rtmp://[vhost]:[port]/[app]/[stream]_fast; 37 + output rtmp://[vhost]:[port]/[app]/[stream]_fast;
37 } 38 }
38 } 39 }
39 } 40 }
40 # transcode all app and stream of vhost 41 # transcode all app and stream of vhost
41 vhost all.transcode.vhost.com { 42 vhost all.transcode.vhost.com {
  43 + # the streaming transcode configs.
42 transcode { 44 transcode {
  45 + # whether the transcode enabled.
  46 + # if off, donot transcode.
  47 + enabled on;
43 # the ffmpeg 48 # the ffmpeg
44 ffmpeg ./objs/ffmpeg/bin/ffmpeg; 49 ffmpeg ./objs/ffmpeg/bin/ffmpeg;
45 # all matched stream will transcoded to the following stream. 50 # all matched stream will transcoded to the following stream.
@@ -84,7 +89,7 @@ vhost all.transcode.vhost.com { @@ -84,7 +89,7 @@ vhost all.transcode.vhost.com {
84 # [port] the intput stream port. 89 # [port] the intput stream port.
85 # [app] the input stream app. 90 # [app] the input stream app.
86 # [stream] the input stream name. 91 # [stream] the input stream name.
87 - output rtmp://[vhost]:[port]/[app]/[stream]_super; 92 + output rtmp://[vhost]:[port]/[app]/[stream]_super;
88 } 93 }
89 engine hd{ 94 engine hd{
90 vcodec libx264; 95 vcodec libx264;
@@ -95,13 +100,15 @@ vhost all.transcode.vhost.com { @@ -95,13 +100,15 @@ vhost all.transcode.vhost.com {
95 vthreads 6; 100 vthreads 6;
96 vprofile main; 101 vprofile main;
97 vpreset medium; 102 vpreset medium;
98 - vparams {} 103 + vparams {
  104 + }
99 acodec libaacplus; 105 acodec libaacplus;
100 abitrate 70; 106 abitrate 70;
101 asample_rate 44100; 107 asample_rate 44100;
102 achannels 2; 108 achannels 2;
103 - aparams {}  
104 - output rtmp://[vhost]:[port]/[app]/[stream]_hd; 109 + aparams {
  110 + }
  111 + output rtmp://[vhost]:[port]/[app]/[stream]_hd;
105 } 112 }
106 engine sd{ 113 engine sd{
107 vcodec libx264; 114 vcodec libx264;
@@ -112,13 +119,15 @@ vhost all.transcode.vhost.com { @@ -112,13 +119,15 @@ vhost all.transcode.vhost.com {
112 vthreads 4; 119 vthreads 4;
113 vprofile main; 120 vprofile main;
114 vpreset fast; 121 vpreset fast;
115 - vparams {} 122 + vparams {
  123 + }
116 acodec libaacplus; 124 acodec libaacplus;
117 abitrate 60; 125 abitrate 60;
118 asample_rate 44100; 126 asample_rate 44100;
119 achannels 2; 127 achannels 2;
120 - aparams {}  
121 - output rtmp://[vhost]:[port]/[app]/[stream]_sd; 128 + aparams {
  129 + }
  130 + output rtmp://[vhost]:[port]/[app]/[stream]_sd;
122 } 131 }
123 engine fast{ 132 engine fast{
124 vcodec libx264; 133 vcodec libx264;
@@ -129,13 +138,15 @@ vhost all.transcode.vhost.com { @@ -129,13 +138,15 @@ vhost all.transcode.vhost.com {
129 vthreads 2; 138 vthreads 2;
130 vprofile baseline; 139 vprofile baseline;
131 vpreset superfast; 140 vpreset superfast;
132 - vparams {} 141 + vparams {
  142 + }
133 acodec libaacplus; 143 acodec libaacplus;
134 abitrate 30; 144 abitrate 30;
135 asample_rate 22050; 145 asample_rate 22050;
136 achannels 2; 146 achannels 2;
137 - aparams {}  
138 - output rtmp://[vhost]:[port]/[app]/[stream]_fast; 147 + aparams {
  148 + }
  149 + output rtmp://[vhost]:[port]/[app]/[stream]_fast;
139 } 150 }
140 } 151 }
141 } 152 }