Opened 6 years ago
Last modified 6 years ago
#8800 new defect
Sending video over SRT
| Reported by: | andrew andrew | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | undetermined |
| Version: | git-master | Keywords: | srt |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Trying to send a video over srt - one produced by ffmpeg. I'm using [procompiled](https://ffmpeg.zeranoe.com/builds/) and my own builds to do this.
On sender side I have ./ffmpeg -i "<video>.mkv" -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f mpegts udp://127.0.0.1:23001
Then I use srt-live-transmit to forward the data over rendezvous mode.
On receiver end's wireshark, I can see these packets - [here is an attached .zip with the wireshark capture data inside](https://github.com/Haivision/srt/files/4939282/ffmpegSRT.zip). Preview:

Reading it back using ffplay/ffprobe I get Invalid data found when processing input or:
`
ffplay version N-98438-gc6cdfdf9c3 Copyright (c) 2003-2020 the FFmpeg developers
built with gcc 10.1.0 (Rev3, Built by MSYS2 project)
configuration: --cc='ccache gcc' --cxx='ccache g++' --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-schannel --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-gmp --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libaom --disable-debug --enable-libsrt --extra-libs=-liconv --enable-version3
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 94.100 / 58. 94.100
libavformat 58. 48.100 / 58. 48.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Initialized direct3d renderer.
[mpegts @ 000002130b5eae00] Unable to seek back to the startf=0/0
....
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20791500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20794500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20800500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.=0/0
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20805000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20809500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20812500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 2 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20820000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20824500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.=0/0
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20829000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20838000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20842500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20847000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20853000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20857500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.=0/0
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20862000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20866500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20871000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20875500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20880000).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] Packet corrupt (stream = 0, dts = 20884500).
[mpeg2video @ 000002130b612300] Invalid frame dimensions 0x0.
Last message repeated 1 times
[mpegts @ 000002130b5eae00] changing packet size to 204 0B f=0/0
[mpegts @ 000002130b5eae00] changing packet size to 188
[mpegts @ 000002130b5eae00] changing packet size to 204 0B f=0/0
[mpegts @ 000002130b5eae00] changing packet size to 188 0B f=0/0
[mpegts @ 000002130b5eae00] changing packet size to 204 0B f=0/0
[mpegts @ 000002130b5eae00] changing packet size to 188 0B f=0/0
`
But not visual/audio data that I can see. So by all rights, it is there but I can't play it back. Any idea what I'm doing wrong?
For those who got it working directly through ffmpeg (i.e. libsrt) - how did you do it? Can you share your CLI? I'd like to use srt in rendezvous mode but get
`
[srt @ 000001f287570c40] Connection to srt://<ip>:<port> failed: I/O error
srt://<ip>:<port>: I/O error
`
If it helps anyone, the compiled ffmpeg with SRT is: [ffmpegSRT.zip](https://github.com/Haivision/srt/files/4939322/ffmpegSRT.zip)
Change History (4)
follow-up: 3 comment:2 by , 6 years ago
I'd start with producing proper udp mpegts first, e.g. specifying ?pkt_size=1316 and -flush_packets 0.
comment:3 by , 6 years ago
Replying to cus:
I'd start with producing proper udp mpegts first, e.g. specifying ?pkt_size=1316 and -flush_packets 0.
Although working locally, when sending dshow over SRT I get: https://pastebin.com/embed_iframe/enLR2yGv
All I see is a white screen on receiver end from ffplay.
For .mkv I did get a video playing without a whitescreen, and less errors in general: https://pastebin.com/embed_iframe/FSD8nHFB
comment:4 by , 6 years ago
You probaly missing some UDP packets. You should use ?bitrate and -muxrate as well to produce a CBR stream. Make it work first with simple mpegts, and if that is OK, then try srt.



Trying to send a video over srt - one produced by ffmpeg. I'm using [procompiled](https://ffmpeg.zeranoe.com/builds/) and my own builds to do this.
On sender side I have
./ffmpeg -i "<video>.mkv" -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f mpegts udp://127.0.0.1:23001Then I use srt-live-transmit to forward the data over rendezvous mode.
On receiver end's wireshark, I can see these packets - [here is an attached .zip with the wireshark capture data inside](https://github.com/Haivision/srt/files/4939282/ffmpegSRT.zip).
Preview:
https://user-images.githubusercontent.com/66640706/87815207-34074380-c833-11ea-933f-ae202fcca251.png
Reading it back using
ffplay/ffprobeI get Invalid data found when processing input or:Or from
dshow:[mpeg2video @ 000001cfc8bd3b00] Invalid frame dimensions 0x0. [mpegts @ 000001cfc8b53e00] Packet corrupt (stream = 0, dts = 6210982). [mpeg2video @ 000001cfc8bd3b00] Invalid frame dimensions 0x0. [mpegts @ 000001cfc8b53e00] Packet corrupt (stream = 0, dts = 6216982). [mpeg2video @ 000001cfc8bd3b00] Invalid frame dimensions 0x0. [mpegts @ 000001cfc8b53e00] Packet corrupt (stream = 0, dts = 6225982). [mpeg2video @ 000001cfc8bd3b00] Invalid frame dimensions 0x0. [mpegts @ 000001cfc8b53e00] Packet corrupt (stream = 0, dts = 6234982). [mpegts @ 000001cfc8b53e00] decoding for stream 0 failed [mpegts @ 000001cfc8b53e00] Could not find codec parameters for stream 0 (Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, progressive)): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [mpegts @ 000001cfc8b53e00] Could not find codec parameters for stream 1 (Audio: mp3 (mp3float) ([3][0][0][0] / 0x0003), 0 channels, fltp): unspecified frame size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mpegts, from 'udp://127.0.0.1:23001': Duration: N/A, start: 62.044244, bitrate: N/A Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, progressive), 30 tbr, 90k tbn, 90k tbc Stream #0:1[0x101]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, fltp [mpeg2video @ 000001cfc8bd5280] Invalid frame dimensions 0x0. Last message repeated 13 times [mpeg2video @ 000001cfc8bd5280] Invalid frame dimensions 0x0.=0/0 Last message repeated 23 times [mpeg2video @ 000001cfc8bd5280] Invalid frame dimensions 0x0.=0/0 Last message repeated 22 times [mpeg2video @ 000001cfc8bd5280] Invalid frame dimensions 0x0.=0/0 Last message repeated 3 times [mpegts @ 000001cfc8b53e00] Packet corrupt (stream = 0, dts = 6243982). [mpeg2video @ 000001cfc8bd5280] Invalid frame dimensions 0x0. [mpegts @ 000001cfc8b53e00] Packet corrupt (stream = 0, dts = 6258982). [mpeg2video @ 000001cfc8bd5280] Invalid frame dimensions 0x0. [mpegts @ 000001cfc8b53e00] Packet corrupt (stream = 0, dts = 6282982). [mpeg2video @ 000001cfc8bd5280] Invalid frame dimensions 0x0.But not visual/audio data that I can see. So by all rights, it is there but I can't play it back. Any idea what I'm doing wrong?
For those who got it working directly through ffmpeg (i.e. libsrt) - how did you do it? Can you share your CLI? I'd like to use srt in rendezvous mode but get
If it helps anyone, the compiled ffmpeg with SRT is: [ffmpegSRT.zip](https://github.com/Haivision/srt/files/4939322/ffmpegSRT.zip)