libvlc sout to file from hdhomerun udp stream

This forum is about all development around libVLC.
sgraves66
Blank Cone
Blank Cone
Posts: 11
Joined: 13 Nov 2007 01:17

libvlc sout to file from hdhomerun udp stream

Postby sgraves66 » 21 Mar 2011 02:26

I've been trying to implement a TV scheduling application using libvlc 1.1.7 on Windows 7. Currently, I'm using HDHomeRun ATSC network tuners. I create a UPD stream from the tune device to an instance of VLC and save the result in MPEG-PS format. After a few seconds of saving to the file, I create a VOD instance through libvlc VLM using the file as input. Clients then connect via RTSP to play on demand.

The technique works, with a few minor issues that I'm trying to resolve. First, sout to MPEG-PS file results in choppy playback, whether viewed through RTSP or playing the output file directly. Choppy playback occurs at the same location within the file, indicating some type of frame loss. To dump the UDP stream to file, I use the following options:

:sout=#file{mux=ps,dst=test.mpg} :ttl=1 :sout-keep :sout-all :no-sout-display

Second, VLC clients playing the VOD stream pause for ~1 second after 1-2 seconds of playback. This pause occurs only once directly after the RTSP location is opened. When creating the VOD instance via libvlc_vlm_add_vod(), I specify no options, just the input path and stream name. Clients use the following options to configure VLC for playback. Video window is set to child HWND. The same VLC instance is used for media file playback within the application, so some options do not specifically apply to this scenario:

-I dummy --plugin-path={VLCPath} --ignore-config --no-osd --ffmpeg-hw --network-caching=1000 --sub-autodetect-fuzzy=0 --no-sub-autodetect-file --input-timeshift-path=./Temp --video-filter=deinterlace --deinterlace=-1 --deinterlace-mode=linear

Are there any additional options that I can specify to alleviate these issues?

sgraves66
Blank Cone
Blank Cone
Posts: 11
Joined: 13 Nov 2007 01:17

Re: libvlc sout to file from hdhomerun udp stream

Postby sgraves66 » 08 Jul 2011 01:00

After further research, it appears to be an issue with MPEG2 when configuring libvlc to use a Win32 window handle. The same thing occurs when playing DVD's, unfortunately.
The larger the window, the more choppy playback becomes and I see a dramatic increase in "late frame dropped" in the logger interface.
Currently testing with VLC 1.1.10 on Windows XP (DirectX) and Windows 7 (D3D).


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests