HTTP Streaming with 1.0.*

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
carath63
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Sep 2006 17:17

HTTP Streaming with 1.0.*

Postby carath63 » 31 Jul 2009 20:39

We have a project consisting of a large number of video files, (some are MPEG-2, some are H.264, some are MP4, etc.). These are served from a web service running under tomcat using the HTTP streaming protocol. Prior to version 1.0, we were able to successfully stream these files to the VLC client, either the standalone application or the Mozilla plug-in running in a web page. The performance was generally pretty good. The web service correctly handles partial download requests, so seeking worked well, and when videos were simply played without fast-forwarding, there were very few connections made between the VLC player and the web service.

With the release of 1.0.0, and now 1.0.1 as well, the performance is so bad the videos are not viewable. On the player side, the symptoms we see are that the first few seconds of video/audio play, (probably just the buffered portion), and then frames start arriving late and the video either stutters or stops playing completely.

Looking at the logs generated by the HTTP streaming server, it is apparent that VLC is constantly disconnecting and reconnecting to the server to seek a short distance forward and then read a small buffer of bytes. I tried to compare the code for the 0.9.9 and 1.0.0 http access module and didn't see anything too significantly different. I did notice in the streaming input module that the minimum read size is quite a bit smaller in the 1.0.0 code than in 0.9.9, but I do not know the internals well enough to see if this is causing the problems or not.

In any case, we have had to revert back to the 0.9 player to make things work. Any idea what would have changed to make the performance under http so bad?
Christopher A. Rath

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: HTTP Streaming with 1.0.*

Postby Jean-Baptiste Kempf » 04 Aug 2009 20:09

Fill a bug.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

carath63
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Sep 2006 17:17

Re: HTTP Streaming with 1.0.*

Postby carath63 » 05 Aug 2009 15:29

I am registered for the Videolan VLC trac and have verified my email address, but it is not currently giving me the option to create new tickets.
Do I just need to be patient and wait for someone to review my registration or is there another step?
Christopher A. Rath

carath63
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Sep 2006 17:17

Re: HTTP Streaming with 1.0.*

Postby carath63 » 27 Aug 2009 20:45

I think I found the problem.

I added some more debugging messages to src/input/stream.c in AStreamSeekStream to try and figure out why it thought it was necessary to do some many seeks for the HTTP access module. In looking at the log messages before this I had noticed that it was choosing to seek, even though the distance between the requested position and the end of the current track was smaller than the threshold computed as 3 times the read size. I added an additional message to dump the threshold and found it was always 128, which is the default threshold for access modules that can fast seek.

I then looked more closely at how b_afastseek was computed and saw that the code says:

Code: Select all

access_Control( p_access, ACCESS_CAN_SEEK, &b_afastseek);
I believe this should really be:

Code: Select all

access_Control( p_access, ACCESS_CAN_FASTSEEK, &b_afastseek);
Since the HTTP access module does not support FASTSEEK, it should be using the higher threshold, and thus fewer seeks should be done.

I have hacked my local copy of src/input/stream.c to fix this.

With this fix in place I am able to use http streaming from a server at my office over a VPN link to my macbook at home. I see no hiccups in the video, and monitoring the http log on the remote server, the only disconnect/connect attempts were the initial setup and the one time I manually did a seek in the content.

I do not have the ability to commit the code through git, and would prefer one of the VLC developers check this out before committing it to the source tree.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: HTTP Streaming with 1.0.*

Postby Jean-Baptiste Kempf » 27 Aug 2009 22:05

Please share on the mailing list: vlc-devel
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

carath63
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Sep 2006 17:17

Re: HTTP Streaming with 1.0.*

Postby carath63 » 28 Aug 2009 21:12

Can someone tell me which branch and/or tag I should check out to get the same source code as was used for the released version of the Mozilla plug-in for MacOSX? I have built the plug-in using the master branch including the fix I made earlier in src/input/stream.c but it has very odd behavior that I do not see with the released version:
  • The video window floats above the browser and is independent of the browser. (i.e. I can minimize the browser or move it, but the video window stays where it was).
    The video window ignores the size parameters I give in the embed tag.
    Firefox crashes as soon as you leave the page containing the embedded player.
I would like to test out the http streaming fix in the plug-in as that is our normal mode of delivering video.
Christopher A. Rath

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: HTTP Streaming with 1.0.*

Postby Jean-Baptiste Kempf » 29 Aug 2009 20:02

1.0-bugfix is the current releases branches.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

carath63
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Sep 2006 17:17

Re: HTTP Streaming with 1.0.*

Postby carath63 » 30 Aug 2009 05:26

Thanks. I'll try building in there, although I think I have found the source of the plug-in problems in the main branch, and it appears code is just incomplete at the moment.

By the way, I did post a patch for the stream.c typo to vlc-devel after joining the mailing list, but it doesn't appear to have made it anywhere. I get the digests and have seen several of them since my posting but none of them contain the patch. I used the git-email command to create and email the patch. The CC to my email address worked, so I know the message was sent.
Christopher A. Rath

Rémi Denis-Courmont
Developer
Developer
Posts: 15065
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: HTTP Streaming with 1.0.*

Postby Rémi Denis-Courmont » 25 Sep 2009 20:06

The patch was merged and is included in released version 1.0.2.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 7 guests