Video stream error on trying to open udp://127.0.0.1:54000

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Video stream error on trying to open udp://127.0.0.1:54000

Post by Sergey Tkachenko »

I can see video artifacts in ffplay when displaying local udp stream.
Periodically, video becomes distorted.
udp-stream.jpg
udp-stream.jpg (54.19 KiB) Viewed 27778 times
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Video stream error on trying to open udp://127.0.0.1:54000

Post by ya_vanka »

Well, may be periodically smth is distorted.
But in my case picture becomes corrupted in 30 seconds from start and then never restores.

Watch please this: https://yadi.sk/i/vNDmBlwFdEB8Mg and this: https://yadi.sk/d/VmxWkiIt0JuwXA
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Video stream error on trying to open udp://127.0.0.1:54000

Post by ya_vanka »

In order to set additional params (-framedrop -sync video -fflags nobuffer -probesize 64) I've written the following procedure:

Code: Select all

function SetDictSpeedUpOptions(var AOptionsDict : PAVDictionary): Boolean;
var
  v: PAnsiChar;
begin
  Result := (av_dict_set(AOptionsDict, 'framedrop', nil, 0) = 0);

  v := PAnsiChar(AnsiString('video'));
  Result := Result and (av_dict_set(AOptionsDict, 'sync', v, 0) = 0);
  v := PAnsiChar(AnsiString('nobuffer'));
  Result := Result and (av_dict_set(AOptionsDict, 'fflags', v, 0) = 0);
  {v := PAnsiChar(AnsiString(IntToStr(64)));
  Result := Result and (av_dict_set(AOptionsDict, 'probesize', v, 0) = 0);}
end;
It works, but only if the last call to av_dict_set is commented (Result := Result and (av_dict_set(AOptionsDict, 'probesize', v, 0) = 0);)
In ffplay there is no problem with "-probesize 64" parameter, but RVMedia doesn't show video if I uncomment this:

Code: Select all

  v := PAnsiChar(AnsiString(IntToStr(64)));
  Result := Result and (av_dict_set(AOptionsDict, 'probesize', v, 0) = 0)
What is the reason? Do I do smth wrong?
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Video stream error on trying to open udp://127.0.0.1:54000

Post by ya_vanka »

And the problem is that "-probesize 64" affects greately on video latency.
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Video stream error on trying to open udp://127.0.0.1:54000

Post by Sergey Tkachenko »

Some changes are needed in RVMedia code to allow working with a small probesize.
This change will be included in the next update. I'll send changed files to your tomorrow.
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Video stream error on trying to open udp://127.0.0.1:54000

Post by ya_vanka »

Great!

Waiting for this update.
ya_vanka
Posts: 65
Joined: Tue Oct 22, 2019 6:24 pm

Re: Video stream error on trying to open udp://127.0.0.1:54000

Post by ya_vanka »

Tested update, but I still have a big delay and video frame corruption.

I found out that my video source sends data in tiny blocks (188 bytes).
Can this be the reason of the delay and corruption?
Post Reply