1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix build ffmpeg bug, add -ldl compile option

This commit is contained in:
winlin 2013-11-30 16:45:47 +08:00
parent 129244aafa
commit b1466c8883
2 changed files with 24 additions and 13 deletions

2
trunk/auto/build_ffmpeg.sh Normal file → Executable file
View file

@ -81,7 +81,7 @@ else
--prefix=${ff_release_dir} --cc= \ --prefix=${ff_release_dir} --cc= \
--enable-static --disable-shared --disable-debug \ --enable-static --disable-shared --disable-debug \
--extra-cflags='-I${ffmpeg_exported_release_dir}/include' \ --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 \ --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \
--enable-postproc --enable-bzlib --enable-zlib --enable-parsers \ --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \
--enable-libx264 --enable-libmp3lame --enable-libaacplus \ --enable-libx264 --enable-libmp3lame --enable-libaacplus \

View file

@ -17,7 +17,8 @@ vhost __defaultVhost__ {
hls_window 30; hls_window 30;
#forward 127.0.0.1:1936; #forward 127.0.0.1:1936;
transcode { transcode {
ffmpeg ./objs/ffmpeg/bin/ffmpeg; enabled on;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine fd{ engine fd{
vcodec libx264; vcodec libx264;
vbitrate 300; vbitrate 300;
@ -33,13 +34,17 @@ vhost __defaultVhost__ {
asample_rate 22050; asample_rate 22050;
achannels 2; achannels 2;
aparams {} aparams {}
output rtmp://[vhost]:[port]/[app]/[stream]_fast; output rtmp://[vhost]:[port]/[app]/[stream]_fast;
} }
} }
} }
# transcode all app and stream of vhost # transcode all app and stream of vhost
vhost all.transcode.vhost.com { vhost all.transcode.vhost.com {
# the streaming transcode configs.
transcode { transcode {
# whether the transcode enabled.
# if off, donot transcode.
enabled on;
# the ffmpeg # the ffmpeg
ffmpeg ./objs/ffmpeg/bin/ffmpeg; ffmpeg ./objs/ffmpeg/bin/ffmpeg;
# all matched stream will transcoded to the following stream. # all matched stream will transcoded to the following stream.
@ -84,7 +89,7 @@ vhost all.transcode.vhost.com {
# [port] the intput stream port. # [port] the intput stream port.
# [app] the input stream app. # [app] the input stream app.
# [stream] the input stream name. # [stream] the input stream name.
output rtmp://[vhost]:[port]/[app]/[stream]_super; output rtmp://[vhost]:[port]/[app]/[stream]_super;
} }
engine hd{ engine hd{
vcodec libx264; vcodec libx264;
@ -95,13 +100,15 @@ vhost all.transcode.vhost.com {
vthreads 6; vthreads 6;
vprofile main; vprofile main;
vpreset medium; vpreset medium;
vparams {} vparams {
}
acodec libaacplus; acodec libaacplus;
abitrate 70; abitrate 70;
asample_rate 44100; asample_rate 44100;
achannels 2; achannels 2;
aparams {} aparams {
output rtmp://[vhost]:[port]/[app]/[stream]_hd; }
output rtmp://[vhost]:[port]/[app]/[stream]_hd;
} }
engine sd{ engine sd{
vcodec libx264; vcodec libx264;
@ -112,13 +119,15 @@ vhost all.transcode.vhost.com {
vthreads 4; vthreads 4;
vprofile main; vprofile main;
vpreset fast; vpreset fast;
vparams {} vparams {
}
acodec libaacplus; acodec libaacplus;
abitrate 60; abitrate 60;
asample_rate 44100; asample_rate 44100;
achannels 2; achannels 2;
aparams {} aparams {
output rtmp://[vhost]:[port]/[app]/[stream]_sd; }
output rtmp://[vhost]:[port]/[app]/[stream]_sd;
} }
engine fast{ engine fast{
vcodec libx264; vcodec libx264;
@ -129,13 +138,15 @@ vhost all.transcode.vhost.com {
vthreads 2; vthreads 2;
vprofile baseline; vprofile baseline;
vpreset superfast; vpreset superfast;
vparams {} vparams {
}
acodec libaacplus; acodec libaacplus;
abitrate 30; abitrate 30;
asample_rate 22050; asample_rate 22050;
achannels 2; achannels 2;
aparams {} aparams {
output rtmp://[vhost]:[port]/[app]/[stream]_fast; }
output rtmp://[vhost]:[port]/[app]/[stream]_fast;
} }
} }
} }