bsf:表示binary steam fiter
a:表示audio
找到srs对应的配置文件,在配置文件里面添加aparams,在aparams里面添加aac_adtstoasc。
一个配置例子如下:
listen 1935;
max_connections 1000;
pid objs/edge.pid;
srs_log_file ./objs/edge.log;
#vhost __defaultVhost__ {
# mode remote;
## origin 127.0.0.1:19350;
# origin 103.242.147.227:1935;
#}
vhost __defaultVhost__ {
# mode remote;
# origin 58.218.152.98:1935;
ingest livestream {
enabled on;
input {
# file: ingest file specifies by url.
# stream: ingest stream specifeis by url.
# device: not support yet.
# default: file
type stream;
# the url of file/stream.
url http://live.hkstv.hk.lxdns.com/live/hks/playlist.m3u8;
}
# the ffmpeg
ffmpeg /tmp/ffmpeg;
# the transcode engine, @see all.transcode.srs.com
# @remark, the output is specified following.
engine {
enabled on;
vcodec copy;
acodec copy;
aparams
{
profile:a aac_low;
bsf:a aac_adtstoasc;
}
output rtmp://127.0.0.1:1935/live/livestream;
}
}
hls {
enabled on;
hls_fragment 10;
hls_window 60;
hls_path ./objs/nginx/html;
hls_m3u8_file [app]/[stream].m3u8;
hls_ts_file [app]/[stream]-[seq].ts;
}
}
http_server {
enabled on;
listen 8088;
dir ./objs/nginx/html;
}
srs指定这个文件ffmpeg就可以带参数-bsf:a aac_adtstoasc 转码
本文转自biao007h51CTO博客,原文链接: http://blog.51cto.com/linzb/1763074,如需转载请自行联系原作者