player problems when stream parameters change

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
scgroup
Blank Cone
Blank Cone
Posts: 13
Joined: 23 Sep 2004 22:23

player problems when stream parameters change

Postby scgroup » 20 Aug 2007 23:43

I am trying to broadcast an oversubscribed lecture to two additional classrooms, using UDP multicast over a LAN. There are three video sources. Sometimes, when the source is changed, one or both of the players does not render the new video stream properly, or just a blank screen appears; the audio is fine. The problem appears to be on the player side; if the player is restarted then correct video appears.

Some stream server details: VLC 0.8.6c running under Windows XP SP2. I'll call the sources CAM, TV, and VGA, all interfaced via DirectShow. CAM is a Sony HDR-HC7 camcorder, used as a camera. Video output is 1440 x 1080, with non-square pixels resulting in 16:9 aspect ratio. Video is HDV format, sent via 1394 interface, Microsoft AV/C Tape Device driver. TV is a conventional capture card (fed from DVD/VCR/document camera) using a Conexant 23881 chip. Video size is set to 640x480. VGA is an Epiphan Systems VGA2USB device, fed from 1024x768 sources (lecture hall computer or guest's laptop), using Epiphan's DirectShow driver with default settings. The server transcodes any of these sources to mp4v at 3 Mbps with MPEG TS encapsulation.

Some player details: VLC 0.8.6c running under Windows XP SP2. Video card, set to 1024x768, feeds projector. VLC is started with a simple vlc -f udp:/@224.x.x.x command. The server does not resize the video sources (quality was poor when I tried that), so the player is upscaling TV, downscaling CAM, and passing VGA through unscaled.

The professor has a switch at his lectern to select the desired source. I have a simple perl script that reads the switch and tells VLC what to do. Originally, when the switch was changed, I terminated VLC and started another with the new parameters. Unfortunately, no matter how I ended the CAM streaming, even by sending VLC a ctrl-X with SendKeys, the 1394 interface would sometimes be left in a hung state. There was no way to revive it, short of a reboot or replugging the FireWire cable. So, the server now runs three instances of VLC, one for each source. When the switch is thrown, a stop command is sent to the active one. After a short delay, a "play" command is then sent to the desired new instance.

Most of the time, this all works. But sometimes the new video won't show properly in one room, even though it's fine in the other, and sometimes both rooms will be bad. A typical failure, when switching from TV to CAM, is a "zoomed" image from the camera. Testing with a laptop with 1920x1200 screen, and the -f option removed, the 640x480 TV picture gets replaced with an 852x480 picture showing the upper left hand corner of the camera image, instead of the expected 1920x1080 full image. Verbose mode produced nothing meaningful to me. There are warnings about "first packet for PID", "TS discontinuity", "waiting for VOL", "late picture skipped", and various audio related messages, but they seem to be the same in both working and failing cases.

I tried to work around the problem with a script on the player machine, which looks for an interruption in network traffic and restarts the player. Unfortunately, that doesn't seem to work properly, unless the restart is done after the new stream has started to come in. Although the final display is correct, it takes a long time to set up, and there is a great deal of distracting flashing.

What might be going wrong? Is there any known fix or clean workaround? Is there a better way to switch video sources upon external command?

Thanks for taking the time to read this long post,

Stewart

Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 20 guests