[Cannot Reproduce] transcode: ignore input rtmp port
Closed this issue · 4 comments
thegobot commented
XCORE-SRS/6.0.177(Hang)
STABLE
3a390f0
ffmpeg version N-121090-g9e4ff4732c-20250916 Copyright (c) 2000-2025 the FFmpeg developers
Error opening input file rtmp://127.0.0.1:1935/live/xxxxxxx?vhost=__defaultVhost__.
srs-dev.conf
srs_log_tank console;
#srs_log_level warn;
daemon off;
listen 1937;
server_id srs-dev;
pid /run/srs-dev.pid;
transcode {
enabled on;
ffmpeg /usr/local/bin/ffmpeg;
engine ff {
enabled on;
perfile {
re;
}
iformat flv;
vfilter {
vf 'scale=320:-2';
}
vcodec libx264;
vbitrate 300;
vfps 20;
vthreads 12;
vprofile baseline;
vpreset superfast;
vparams {
}
acodec aac;
abitrate 48000;
asample_rate 44100;
achannels 2;
aparams {
}
output rtmp://127.0.0.1:1937/[app]/[stream]?vhost=small;
}
}
duiniuluantanqin commented
What does it mean?
TRANS_BY_GPT4
mpisat commented
It means the user is running SRS on port 1937 for rtmp. But code is ignoring rtmp port for engine ff
duiniuluantanqin commented
@mpisat
The issue could not be reproduced.
The configuration is as follows:
# no-daemon and write log to console config for srs.
# @see full.conf for detail config.
max_connections 1000;
daemon off;
srs_log_tank console;
rtmp {
listen 1937;
}
http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
listen 8080;
}
rtc_server {
enabled on;
listen 8000; # UDP port
# @see https://ossrs.io/lts/en-us/docs/v7/doc/webrtc#config-candidate
candidate $CANDIDATE;
}
rtsp_server {
enabled on;
listen 8554;
}
vhost __defaultVhost__ {
hls {
enabled on;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
rtc {
enabled on;
# @see https://ossrs.io/lts/en-us/docs/v7/doc/webrtc#rtmp-to-rtc
rtmp_to_rtc on;
# @see https://ossrs.io/lts/en-us/docs/v7/doc/webrtc#rtc-to-rtmp
rtc_to_rtmp on;
}
rtsp {
enabled on;
rtmp_to_rtsp on;
}
transcode {
enabled on;
ffmpeg /usr/bin/ffmpeg;
engine ff {
enabled on;
perfile {
re;
}
iformat flv;
vfilter {
vf 'scale=320:-2';
}
vcodec libx264;
vbitrate 300;
vfps 20;
vthreads 12;
vprofile baseline;
vpreset superfast;
vparams {
}
acodec aac;
abitrate 48000;
asample_rate 44100;
achannels 2;
aparams {
}
output rtmp://127.0.0.1:1937/[app]/[stream]?vhost=small;
}
}
}
vhost small {
}
The output is as follows:
[No content provided for the output]
[2025-10-24 16:42:33.648][INFO][3772967][468g14i2] source url=/live/livestream, ip=127.0.0.1, cache=1/2500, is_edge=0, source_id=9793t54a/9793t54a
[2025-10-24 16:42:33.649][INFO][3772967][468g14i2] dispatch cached gop success. count=48, duration=700
[2025-10-24 16:42:33.650][INFO][3772967][468g14i2] create consumer, active=1, queue_size=30000ms, jitter=1
[2025-10-24 16:42:33.650][INFO][3772967][468g14i2] set fd=15, SO_SNDBUF=2626560=>175000, buffer=350ms
[2025-10-24 16:42:33.650][INFO][3772967][468g14i2] start play smi=0ms, mw_sleep=350, mw_msgs=8, realtime=0, tcp_nodelay=0
[2025-10-24 16:42:34.380][INFO][3772967][shd47d7n] RTMP client transport=plaintext, ip=127.0.0.1:52298, fd=16
[2025-10-24 16:42:34.383][INFO][3772967][shd47d7n] complex handshake success
[2025-10-24 16:42:34.427][INFO][3772967][shd47d7n] connect app, tcUrl=rtmp://127.0.0.1:1937/live, pageUrl=, swfUrl=, schema=rtmp, vhost=127.0.0.1, port=1937, app=live, args=null
[2025-10-24 16:42:34.427][INFO][3772967][shd47d7n] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2025-10-24 16:42:34.516][INFO][3772967][shd47d7n] client identified, type=fmle-publish, vhost=small, app=live, stream=livestream, param=?vhost=small, duration=0ms
[2025-10-24 16:42:34.516][INFO][3772967][shd47d7n] connected stream, tcUrl=rtmp://127.0.0.1:1937/live, pageUrl=, swfUrl=, schema=rtmp, vhost=small, port=1937, app=live, stream=livestream, param=?vhost=small, args=null
[2025-10-24 16:42:34.516][INFO][3772967][shd47d7n] stream publish token acquired, type=fmle-publish, url=small/live/livestream
[2025-10-24 16:42:34.516][INFO][3772967][shd47d7n] new live source, stream_url=small/live/livestream
[2025-10-24 16:42:34.517][INFO][3772967][shd47d7n] source url=small/live/livestream, ip=127.0.0.1, cache=1/2500, is_edge=0, source_id=/
[2025-10-24 16:42:34.604][INFO][3772967][shd47d7n] ignore disabled exec for vhost=small
[2025-10-24 16:42:34.604][INFO][3772967][shd47d7n] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2025-10-24 16:42:35.307][INFO][3772967][shd47d7n] got metadata, width=320, height=180, vcodec=7, acodec=10
[2025-10-24 16:42:35.307][INFO][3772967][shd47d7n] 43B video sh, codec(7, profile=Baseline, level=1.3, 320x180, 0kbps, 0.0fps, 0.0s)
[2025-10-24 16:42:35.307][INFO][3772967][shd47d7n] 7B audio sh, codec(10, profile=LC, 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)
[2025-10-24 16:42:36.473][INFO][3772967][x52xhz38] SRS: cpu=5.00%,52MB, cid=9,1, timer=62,0,0, clock=1,38,9,0,0,0,0,0,0, objs=(pkt:74,raw:39,fua:35,msg:114,oth:1,buf:32)
[2025-10-24 16:42:39.279][INFO][3772967][0u39v05g] HTTP #0 172.18.4.69:13049 GET http://172.18.0.6:8080/console/en_index.html, content-length=-1
[2025-10-24 16:42:39.279][INFO][3772967][0u39v05g] http match file=./objs/nginx/html/console/en_index.html, pattern=/, upath=/console/en_index.html
[2025-10-24 16:42:39.286][INFO][3772967][0u39v05g] RTC: before dispose resource(HttpConn)(0x60d000003370), conns=5, zombies=0, ign=0, inz=0, ind=0
TRANS_BY_GPT4
winlinvip commented
I cannot reproduce it over a month, so I need to close it. Please let me know if you know exactly how to reproduce it.