Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoPlayback: Support for RTMP/streams? #8

Open
akechi-haruka opened this issue Dec 7, 2023 · 0 comments
Open

VideoPlayback: Support for RTMP/streams? #8

akechi-haruka opened this issue Dec 7, 2023 · 0 comments

Comments

@akechi-haruka
Copy link

Hi, your VideoPlayer library seems to be exactly the thing I need, however I can't seem to get it to work with RTMP, calling VideoHelper.LoadFromUrl(@"rtmp://*****").

I had to make a couple adjustments to the code around detecting playback end (since streams have no defined length, so the status is mistakenly set to MediaState.Stopped in some cases), however I am still unable to get any frames displayed, as it seems to permanently block at DecodeContext.cs:1097 ffmpeg.av_read_frame(FormatContext, packet.RawPacket);
If I enable FFMPEG log output, I can however see that frames are being received. The RTMP stream also works, since I can get working playback by running ffplay rtmp://***** -x 1024 -y 600 -max_delay 0 -max_probe_packets 1 -analyzeduration 0 -flags +low_delay -fflags +nobuffer.

Any idea?

Log output:

Using FFmpeg version n5.1.2-4-gf5455889fd-20221020
[FFMPEG][NULL @ 000001dfeca76580] [debug] Opening 'rtmp://****' for reading

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] No default whitelist set

[FFMPEG][tcp @ 000001dfeca79dc0] [debug] No default whitelist set

[FFMPEG][tcp @ 000001dfeca79dc0] [debug] Original list of addresses:

[FFMPEG][tcp @ 000001dfeca79dc0] [debug] Address *** port 1935

[FFMPEG][tcp @ 000001dfeca79dc0] [debug] Interleaved list of addresses:

[FFMPEG][tcp @ 000001dfeca79dc0] [debug] Address *** port 1935

[FFMPEG][tcp @ 000001dfeca79dc0] [verbose] Starting connection attempt to *** port 1935

[FFMPEG][tcp @ 000001dfeca79dc0] [verbose] Successfully connected to *** port 1935

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] Handshaking...

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] Type answer 3

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] Server version 13.14.10.13

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] Proto = rtmp, path = ***, app = ***, fname = ***

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] Window acknowledgement size = 5000000

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] Max sent, unacked = 5000000

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] New incoming chunk size = 4096

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] Creating stream...

[FFMPEG][rtmp @ 000001dfeca79cc0] [debug] Sending play command for '****'

[FFMPEG][trace] Probing flv score:100 size:2048

[FFMPEG][flv @ 000001dfeca76580] [debug] Format flv probed with size=2048 and score=100

[FFMPEG][flv @ 000001dfeca76580] [debug] Before avformat_find_stream_info() pos: 13 bytes read:2063 seeks:0 nb_streams:0

[FFMPEG][flv @ 000001dfeca76580] [trace] type:18, size:24, last:-1, dts:0 pos:21

[FFMPEG][flv @ 000001dfeca76580] [trace] type:18, size:387, last:-1, dts:0 pos:60

[FFMPEG][flv @ 000001dfeca76580] [trace] type:8, size:7, last:-1, dts:4845899 pos:462

[FFMPEG][flv @ 000001dfeca76580] [trace] 1 AF 0 

[FFMPEG][flv @ 000001dfeca76580] [trace] type:8, size:8, last:-1, dts:4845921 pos:484

[FFMPEG][flv @ 000001dfeca76580] [trace] 1 AF 0 

[FFMPEG][flv @ 000001dfeca76580] [trace] type:8, size:8, last:-1, dts:4845942 pos:507

[FFMPEG][flv @ 000001dfeca76580] [trace] 1 AF 0 

[FFMPEG][flv @ 000001dfeca76580] [trace] type:8, size:8, last:-1, dts:4845963 pos:530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant