Patent attributes
A media service application responsive to a media retrieval request received from a user of client computer to retrieve a video designated by the retrieval request. The media service retrieves relevant advertisements as a function of metadata included in the video file and/or stored personal preference data of the user. If the retrieval request is an online viewing request the media service application integrates the retrieved advertisements into the retrieved video and transfers an integrated video/advertisement file to the client If the retrieval request is a download request the media service application transfers the retrieved ad and retrieved video to the client as separate files for integration by the client during playback of the video.