littletom1201 / lavfilters

Automatically exported from code.google.com/p/lavfilters
GNU General Public License v2.0
0 stars 0 forks source link

UDP Multicast MPEG2-TS videos distortion on stream start. #353

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Describe the issue you're having:
When using LAV Splitter Source, Video and Audio decoder to watch an UDP 
Muticast MPEG2-TS stream the video gets distorted after a few seconds of stream 
start. This didnt happend with VLC 2.0.6.
Ill think its an issue with correct seeking in the stream.
This happens with many streams from various astra channels.

How can the issue be reproduced? Sample File?
Here:

http://www45.zippyshare.com/v/19036763/file.html

i have uploaded an tool + stream sample file which sends out an multicast on 
udp://239.200.199.125:20000. Also an graph file is in the archive, which can be 
loaded with grapstudionext or graphedit.

To reproduce do the following:

* Start TVStreamAnalyzer.exe an click "Start multicast"
* Load the Graph File in graphstudionext or graphedit and start the playback.
* The stream should be played.
* Now click "Stop multicast" and wait until video stops in graphstudio
* now press "Start multicast" again -> issue happens

If you do this with VLC 2.0.6 this doesnt happen. Playback doesnt start 
immidiatly, but after about a second the stream runs smoothly.

What version of the product are you using?
0.56.2 (also tried older versions with the same result)

In which Player?
own DSHOW player

Can you please look into this?
thank you

Original issue reported on code.google.com by Tobias.D...@gmail.com on 3 May 2013 at 1:45

GoogleCodeExporter commented 8 years ago
I cannot reproduce this problem. There is a brief moment after i click "Start" 
where playback is not smooth, but shortly after everything plays perfectly.

Its certainly possible something was improved in recent versions of the 
decoders, so maybe re-test with 0.58 once its available.

Original comment by h.lepp...@gmail.com on 23 Jun 2013 at 6:42

GoogleCodeExporter commented 8 years ago
Thanks for trying to reproduce.
With v0.58 the problem is still here.

Ill think there is problem with the streaming application i have supplied.
Now i have a better way to reproduce the issue.
With the use of VLC, which streams out an MPEG2/TS i could reproduce the issue 
every time.

Here you could download the sample & batchfile incl. VLC 2.0.6: 
http://www23.zippyshare.com/v/47895257/file.html

Steps to setup the test stream:

 1. Extract ZIP
 2. Start "play-multicast-with-vlc.bat" -> VLC should open and streams out an multicast to udp 224.1.1.1

Steps to reproduce the issue:
 1. Open graphedit
 2. Press New Button in toolbar
 3. Load the supplied "graph.grf" Graph File
 4. !! immediately !! press the play button after the graph is loaded
 5. After about 5 seconds the issue happens. Short stutter and sometimes an audio pop/click/crackle.

(to reproduce it again just start from step 2. (Press New....))

This stutter doesnt happen with VLC (as player) or also it doesnt happen with 
ffplay.
ffplay command line: ffplay -v 9 -loglevel 99 -i udp://224.1.1.1:20000

It would be nice if you now could reproduce/fix the issue.

Thank you
Tobias

Original comment by Tobias.D...@gmail.com on 24 Jun 2013 at 12:00

GoogleCodeExporter commented 8 years ago
I had an idea earlier, can you try with this version?

http://files.1f0.de/lavf/LAVFilters-0.58-pthreads.zip

Original comment by h.lepp...@gmail.com on 24 Jun 2013 at 2:59

GoogleCodeExporter commented 8 years ago
This works (on my dev machine) :-)
Tomorrow ill gonna try it on another client and report back.

If this works also on the other clients,
could ill excpect a release with these changes?

thank you
Tobias

PS: Attached an LAVSplitter.txt log file. On about ~22sec you could see the 
problem. The debug-filters i have compiled today from source (should be v58).

Original comment by Tobias.D...@gmail.com on 24 Jun 2013 at 3:09

Attachments:

GoogleCodeExporter commented 8 years ago
It'll be in the next release, considering the last was just yesterday, it'll be 
a short while, its not really worth doing a whole new release for.

Original comment by h.lepp...@gmail.com on 24 Jun 2013 at 3:30

GoogleCodeExporter commented 8 years ago
It seems much better with this test version as in v58-release version.

On my dev machine (fast core i7) ALL my multicast channels works perfectly!
But on my client (intel atom Z510) there are two mutlicast channels/streams 
which shows up an little stutter after about 2secs after stream/picture starts.

Do you have changed some thread priorities in the version 
"LAVFilters-0.58-pthreads.zip" (because the zip name: ..pthreads.zip)?

Maybe the problem still persits on my client because its slower?
Maybe another change of thread priorities also fixes those channels which has 
this stutter after stream start?

Is it possible that you give me an debug version of your dev version 
"LAVFilters-0.58-pthreads".
So i could make an log file?

Ill have another request, see here: 
http://forum.doom9.org/showpost.php?p=1625617&postcount=15015
Should ill open a new issue or could we discuss this in here?

thx
Tobias

Original comment by Tobias.D...@gmail.com on 25 Jun 2013 at 9:52

GoogleCodeExporter commented 8 years ago
The change has nothing to do with thread priorities, it simply uses the pthread 
library instead of native win32 threads, because some parts of the UDP protocol 
implementation require it to properly handle multicast live streams.

The changes are in the repository, you can build a debug versions yourself.

What i could do is increase the UDP buffer size to allow it to try to 
compensate for slow processing, but i don't know if that would help.

Please open a new issue for the other question.

Original comment by h.lepp...@gmail.com on 25 Jun 2013 at 10:05

GoogleCodeExporter commented 8 years ago
ok, ill understand.

Have build an debug build and now found my problem on the client side.
My application has set the thread priority of itself to high, so the directshow 
(system process) hasnt get enougth CPU time. After changing this and with the 
pthread compilation all works as it should, without any stutter on stream start!

On development machine there wasnt any stutter with pthread version because i 
have used graphedit, and not my application. Also like i mentioned before my 
dev machine is more powerfull.

So ill think we could go with the pthread version :-)

i will open another issue for the other problem.

thx
Tobias

Original comment by Tobias.D...@gmail.com on 25 Jun 2013 at 12:33

GoogleCodeExporter commented 8 years ago
Good that it works now.

Original comment by h.lepp...@gmail.com on 25 Jun 2013 at 12:35