From b1466c88834c51d1ed982cb3af40e0aee7fb84ae Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 30 Nov 2013 16:45:47 +0800 Subject: [PATCH] fix build ffmpeg bug, add -ldl compile option --- trunk/auto/build_ffmpeg.sh | 2 +- trunk/conf/srs.conf | 35 +++++++++++++++++++++++------------ 2 files changed, 24 insertions(+), 13 deletions(-) mode change 100644 => 100755 trunk/auto/build_ffmpeg.sh diff --git a/trunk/auto/build_ffmpeg.sh b/trunk/auto/build_ffmpeg.sh old mode 100644 new mode 100755 index 222fbbe59..1c1350393 --- a/trunk/auto/build_ffmpeg.sh +++ b/trunk/auto/build_ffmpeg.sh @@ -81,7 +81,7 @@ else --prefix=${ff_release_dir} --cc= \ --enable-static --disable-shared --disable-debug \ --extra-cflags='-I${ffmpeg_exported_release_dir}/include' \ - --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm' \ + --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \ --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \ --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \ --enable-libx264 --enable-libmp3lame --enable-libaacplus \ diff --git a/trunk/conf/srs.conf b/trunk/conf/srs.conf index 5aa39bdab..af5369792 100755 --- a/trunk/conf/srs.conf +++ b/trunk/conf/srs.conf @@ -17,7 +17,8 @@ vhost __defaultVhost__ { hls_window 30; #forward 127.0.0.1:1936; transcode { - ffmpeg ./objs/ffmpeg/bin/ffmpeg; + enabled on; + ffmpeg ./objs/ffmpeg/bin/ffmpeg; engine fd{ vcodec libx264; vbitrate 300; @@ -33,13 +34,17 @@ vhost __defaultVhost__ { asample_rate 22050; achannels 2; aparams {} - output rtmp://[vhost]:[port]/[app]/[stream]_fast; + output rtmp://[vhost]:[port]/[app]/[stream]_fast; } } } # transcode all app and stream of vhost vhost all.transcode.vhost.com { + # the streaming transcode configs. transcode { + # whether the transcode enabled. + # if off, donot transcode. + enabled on; # the ffmpeg ffmpeg ./objs/ffmpeg/bin/ffmpeg; # all matched stream will transcoded to the following stream. @@ -84,7 +89,7 @@ vhost all.transcode.vhost.com { # [port] the intput stream port. # [app] the input stream app. # [stream] the input stream name. - output rtmp://[vhost]:[port]/[app]/[stream]_super; + output rtmp://[vhost]:[port]/[app]/[stream]_super; } engine hd{ vcodec libx264; @@ -95,13 +100,15 @@ vhost all.transcode.vhost.com { vthreads 6; vprofile main; vpreset medium; - vparams {} + vparams { + } acodec libaacplus; abitrate 70; asample_rate 44100; achannels 2; - aparams {} - output rtmp://[vhost]:[port]/[app]/[stream]_hd; + aparams { + } + output rtmp://[vhost]:[port]/[app]/[stream]_hd; } engine sd{ vcodec libx264; @@ -112,13 +119,15 @@ vhost all.transcode.vhost.com { vthreads 4; vprofile main; vpreset fast; - vparams {} + vparams { + } acodec libaacplus; abitrate 60; asample_rate 44100; achannels 2; - aparams {} - output rtmp://[vhost]:[port]/[app]/[stream]_sd; + aparams { + } + output rtmp://[vhost]:[port]/[app]/[stream]_sd; } engine fast{ vcodec libx264; @@ -129,13 +138,15 @@ vhost all.transcode.vhost.com { vthreads 2; vprofile baseline; vpreset superfast; - vparams {} + vparams { + } acodec libaacplus; abitrate 30; asample_rate 22050; achannels 2; - aparams {} - output rtmp://[vhost]:[port]/[app]/[stream]_fast; + aparams { + } + output rtmp://[vhost]:[port]/[app]/[stream]_fast; } } }