[vlc-devel] Adding a default video for audio-only sources

Rémi Denis-Courmont remi at remlab.net
Fri Sep 17 03:10:35 CEST 2010


   Hello,

On Thursday 16 September 2010, Rick Ramstetter wrote:
> Assume I have two types of files, audio-and-video and audio-only files. The
> encoding of each does not matter; the only distinction drawn is whether or
> not the file contains video information. I would like to modify VLC such
> that, given a playlist containing both audio-only and audio-and-video
> files, VLC will play a "default" video if the current file is an
> audio-only file. Obviously, I'd like that "default" video to pause/suspend
> when an audio-and-video file is chosen from the playlist. Likewise, when
> an audio-only file is loaded, the default video should resume where it
> last left off.

If you know a priori which files contain a video track, and which don't, then 
it should be a simple matter of adding a "slave" input to the audio-only file 
items.

> As an example, let's say I have a three file playlist playing in non-random
> order, starting at songA.mp3:
>  songA.mp3 [audio only]
>  songB.avi  [audio+video]
>  songC.avi [audio only]
> I additionally have a file "defaultVideo.avi" (whose audio contents, if
> any, are ignored)
> 
> My goal is for VLC to:
> 1) show the video from defaultVideo.avi during the playback of songA.mp3
> 2) at the end of songA.mp3, the position in defaultVideo.avi should be
> saved, and songB.avi should play (both audio and video)
> 3) at the end of songB.avi, defaultVideo.avi should resume from the saved
> position, and songC.mp3 should play.

That would be quite complicated. You would need quite a bunch of changes to 
the input and synchronization code. That sits in src/input/*.


Best regards,

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list