Skip to content

Support FFmpeg timecode, fix AMF0 parsing failed. #3803

@winlinvip

Description

@winlinvip

See Error submitting a packet to the muxer: Broken pipe, Error muxing a packet

Test using the file timecode.mp4.zip or below:

timecode.mp4

Use this FFmpeg command:

ffmpeg -re -i timecode.mp4 -map 0 -c copy -f flv rtmp://localhost/live/livestream

SRS will fail with this error:

[2023-09-18 11:25:37.576][ERROR][79462][910ul5n0][4] serve error code=2003(Amf0Decode)(Decode AMF0 message failed) : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp: consume message : rtmp: decode message : decode message : decode command name : String invalid marker=0
thread [79462][910ul5n0]: do_cycle() [./src/app/srs_app_rtmp_conn.cpp:263][errno=4]
thread [79462][910ul5n0]: service_cycle() [./src/app/srs_app_rtmp_conn.cpp:457][errno=4]
thread [79462][910ul5n0]: do_publishing() [./src/app/srs_app_rtmp_conn.cpp:1030][errno=35]
thread [79462][910ul5n0]: consume() [./src/app/srs_app_recv_thread.cpp:380][errno=35]
thread [79462][910ul5n0]: handle_publish_message() [./src/app/srs_app_rtmp_conn.cpp:1185][errno=35]
thread [79462][910ul5n0]: process_publish_message() [./src/app/srs_app_rtmp_conn.cpp:1230][errno=35]
thread [79462][910ul5n0]: decode_message() [./src/protocol/srs_protocol_rtmp_stack.cpp:384][errno=35]
thread [79462][910ul5n0]: do_decode_message() [./src/protocol/srs_protocol_rtmp_stack.cpp:607][errno=35]
thread [79462][910ul5n0]: srs_amf0_read_string() [./src/protocol/srs_protocol_amf0.cpp:1513][errno=35](Interrupted system call)

Here's the pcap file:

rtmp-amf0-invalid.pcapng.zip

Metadata

Metadata

Assignees

Labels

EnglishNativeThis issue is conveyed exclusively in English.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions