1. Field
Embodiments of the invention relate to the field of media playback; and more specifically, to selective media download and playback.
2. Background
Computing devices (e.g., workstations, laptops, palmtops, mobile phones, smartphones, multimedia phones, tablets, portable media players, GPS units, gaming systems, etc.) commonly are capable of playing media files (e.g., video and/or audio files) downloaded and streamed from a network (e.g., the Internet). For example, computing devices may include a network application (e.g., a web browser) which allows users to download and/or stream media files embedded on a web page.
Media files are created in a variety of formats. Some media files may not be playable by a particular computing device because of limitations of that device (e.g., that device may not have the appropriate media codec installed, etc.).
Some computing devices have a limited viewing area (e.g., certain mobile phones, smartphones, etc.) in which to view the playback of a media file. Because of this limitation, when an embedded media file on a web page is selected for playback, it is common for the computing device to force the media file to be played in full-screen mode rather than inline mode.
A method and apparatus for selective media download and playback is described. In one embodiment, a computing device (e.g., workstation, laptop, palmtop, mobile phone, smartphone, multimedia phone, tablet, portable media player, GPS unit, gaming system, etc.) is capable of playing media embedded in a network application page (e.g., a page displayed by a web browser, etc.) in inline mode. The computing device performs a playable validation procedure for the embedded media objects, which have a media source remote from the computing device, to determine whether those embedded media objects have media files that are playable on the computing device. A playable indicator is displayed for those embedded media objects that are playable.
In one embodiment, the playable validation procedure performed on the embedded media items is not substantially interrupted when one of those embedded media items is selected and is playing in inline mode. As used herein, inline mode refers to the capability of playing a media file corresponding with an embedded media object within the area defined for that embedded media object and without opening a separate application (e.g., a separate media player). For example, in a web browser application, the area for the embedded media object is typically defined through HTML code of a web page and the media file plays within the embedded media object. Thus the playable validation procedure continues for each of the embedded media objects regardless of whether one or more of the embedded media objects is playing media in inline mode.
In one embodiment, a preview loading procedure is performed for one or more of the embedded media objects when it would not substantially affect the playback of a media file playing in inline mode. Periods when performance of the preview loading procedure would not substantially affect the playback of a currently playing embedded media file are referred to herein as preview loading procedure opportune moments (“opportune moments”). The preview loading procedure will load and display one or more frames of the embedded media file to act as a preview for that embedded media file (e.g., a poster frame associated with the embedded media object). In one embodiment, if the embedded media object is associated with one or more preview frames (e.g., a poster frame has been defined and associated with the embedded media object), those preview frames are downloaded and displayed as the preview frames. If the embedded media object is not associated with a preview frame (e.g., a poster frame has not been defined for that embedded media object), one or more preview frames are dynamically generated based on a portion of the embedded media file. In one embodiment, the preview loading procedure prioritizes those embedded media objects that are currently viewable on the display as compared to those embedded media objects that are not currently viewable on the display.
The invention may best be understood by referring to the following description and accompanying drawings that are used to illustrate embodiments of the invention. In the drawings:
In the following description, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In other instances, well-known circuits, structures and techniques have not been shown in detail in order not to obscure the understanding of this description. Those of ordinary skill in the art, with the included descriptions, will be able to implement appropriate functionality without undue experimentation.
References in the specification to “one embodiment,” “an embodiment,” “an example embodiment,” etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to effect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
In the following description and claims, the terms “coupled” and “connected,” along with their derivatives, may be used. It should be understood that these terms are not intended as synonyms for each other. “Coupled” is used to indicate that two or more elements, which may or may not be in direct physical or electrical contact with each other, co-operate or interact with each other. “Connected” is used to indicate the establishment of communication between two or more elements that are coupled with each other.
As illustrated in
A playable validation procedure has been performed on the embedded media object 220, which has been validated as playable. As a result, the playable indicator 255 is displayed. The playable indicator 255 may be located within the area defined for the embedded media object 220 or located in an area substantially close to the area defined for the embedded media object 220. A preview frame loading procedure has also been performed on the embedded media object 220. As a result, one or more preview frames 260 are displayed for the embedded media object 220 to provide the user of the computing device 110 a visual preview of the content of the embedded media object 220. In some embodiments, if there are multiple preview frames, they are periodically cycled which may create the appearance of a preview animation.
Similarly to the embedded media object 220, the playable validation procedure has been performed on the embedded media object 230, which has been validated as playable. As a result, the playable indicator 265 is displayed. A preview frame loading procedure has not yet been performed on the embedded media object 220.
The playable validation procedure has also been performed on the embedded media object 240. However, unlike the embedded media objects 220 and 230, the embedded media object 240 has been determined as not playable on the computing device 110. For example, the content of the embedded media object 240 may be of a file format that cannot be played on the computing device 110 (e.g., the computing device 110 does not have the appropriate codec installed to playback the media item). As a result, the not-playable indicator 270 is displayed. The not-playable indicator 270 may be located within the area defined for the embedded media object 240 or located in an area substantially close to the area defined for the embedded media object 240.
Referring to
Flow then moves to block 315, where a playable validation procedure is initiated for each of the embedded media objects. With reference to
It should be understood that some of the embedded media objects 210, 220, 230, and 240 may be validated prior to other ones of the embedded media objects. For purposes of explanation, the embedded media object 210 is the first object to complete the playable validation procedure.
For each embedded media object, the playable validation procedure will be complete when it is determined whether that object is playable on the computing device 110. A playable indicator is displayed for those embedded media objects which have been verified as playable, and in some embodiments, a not-playable indicator is displayed for those embedded media objects which have been determined to not be playable on the computing device 110. In some embodiments, the not-playable indicator includes information regarding how to make the corresponding embedded media object playable (e.g., a link to install a missing codec, etc.).
Flow moves from block 315 to block 320, where it is determined whether a user has selected one of the embedded media objects for playback. If the computing device has received a selection from a user of one of the embedded media objects for playback, then flow moves to block 325; otherwise flow moves to block 355. For example, with reference to
At block 355 (the computing device has not received a selection to play one of the embedded media objects), where a determination is made whether there are other embedded media object(s) for which the playable validation procedure has not yet completed. If there are, then flow moves to block 360 where the playable validation procedure is continued; otherwise flow moves to block 365.
At block 365, a preview frame loading procedure is initiated for at least one of the playable embedded media objects on the network application page 205. It should be understood that the preview frame loading procedure for an embedded media object includes downloading at least one frame (and possibly more frames) of the corresponding media file. In one embodiment the preview frame loading procedure is not performed on embedded media objects that are embedded audio files. In other embodiments, for audio media items, the preview frame loading procedure may include downloading album artwork or other images associated with that audio media item. The preview frame loading procedure will be described in greater detail with respect to
With reference to
Flow moves from block 365 to block 370, where it is again determined whether the computing device as received a selection to play one of the embedded media objects. If the computing device does receive a selection, then flow moves to back to block 325, otherwise flow moves to block 375. At block 375, the computing device determines if there are any other playable embedded media objects for which the preview frame loading procedure has not been performed. If there is, then flow moves back to block 365, otherwise flow moves to block 380 where alternative action is taken (e.g., the process ends until a selection of an embedded media item for playback).
An embedded media object may be selected for playback prior to the playable validation procedure and/or the preview frame loading procedure completing for the other embedded media objects on the network application page. In one embodiment, the playable validation procedure is allowed to complete for those other embedded media objects (that is, the playable validation procedure is not substantially interrupted when one of the embedded media objects plays media in inline mode), whereas the preview frame loading procedure is allowed to complete the procedure for only those preview frame loading tasks that are currently executing. As will be described in greater detail later herein, the preview frame loading procedure may be performed for the other embedded media objects during a period when its performance would not substantially affect the playback of a currently playing embedded media item (an opportune moment).
With reference to
At block 340, a determination is made whether there are other embedded media object(s) for which the playable validation procedure has not yet completed. If there are, then flow moves to block 345 where the playable validation procedure is completed for those embedded media object(s), otherwise flow moves to block 350. Flow also moves from block 345 to block 350.
At block 350, a preview frame loading procedure is performed on one or more of the embedded media objects of the network application page 205 without compromising the playback of the selected embedded media object 210. For example, the preview frame loading procedure is initiated, during an opportune moment, for one or more of those embedded media objects that have not had the procedure performed.
In one embodiment, the preview frame loading module 460 performs the preview frame loading procedure only during an opportune moment (a period when performing the preview frame loading procedure will not substantially affect the playback of a media item playing in an embedded media object). With reference to
The embedded media object manager 410 determines opportune moments based on messages from the embedded media objects. For example, a user-initiated pause may occur when a pause button control is selected on an embedded media object. For example, with reference to
If the embedded media object manager 410 determines an opportune moment exists, then flow moves to block 515, otherwise the flow moves to block 520 where alternative action is taken (e.g., flow remains at block 510, or the embedded media object manager 410 instructs the preview frame loading module 460 to cease processing any new tasks from the preview frame loading queue 450 (the task(s) currently being processed may be completed)).
In some embodiments, an opportune moment ceases to exist responsive to a user selecting an embedded media object to play in full-screen mode, as this is a likely indication that the user wants to view that playing media item more than viewing previews from the other embedded media objects on the network application page. Thus the bandwidth and processing resources necessary for the preview frame loading procedure are available for the playing media file. When the full-screen playback is exited, the preview frame loading procedure process may resume (e.g., determining whether there is an opportune moment, etc.). Of course it should be understood that an opportune moment may cease in other circumstances (e.g., the playback buffer drops below a certain threshold, etc.).
At block 515 (there is an opportune moment), the embedded media object manager 410 initiates the preview frame loading procedure for one or more of the embedded media objects (one or more of the corresponding tasks on the preview frame loading queue 450). For example, the embedded media object manager 410 instructs the preview frame loading module 460 to begin processing one or more tasks on the preview frame loading queue 450. It should be understood that once an opportune moment ceases, the embedded media object manager 410 instructs the preview frame loading module 460 to not process any new tasks from the preview frame loading queue 450 (the task(s) currently being processed may be completed).
In some embodiments, the embedded media object manager 410 prioritizes embedded media objects for the preview loading frame procedure and/or the playable validation procedure based on their current position on the viewable area of the network application page. For example, embedded media objects which are not currently viewable (e.g., currently obstructed by other windows or applications, not viewable until the page is scrolled, etc.) will have a lower priority than embedded media objects currently viewable. Priority of the embedded media objects may affect the position in the preview frame loading queue 450 and/or the playable validation queue 430 in one embodiment.
Flow moves from block 515 to block 525. The operations described in blocks 525 to 540 are performed for each preview frame loading task being processed. It should be understood that these tasks may be processed concurrently or sequentially. At block 525, for the preview frame loading task being processed, the preview frame loading module 460 determines whether the corresponding embedded media object is associated with one or more preview frames. For example, some embedded media objects are defined with a set of one or more preview frames (e.g., a poster frame). If the corresponding embedded media object is associated with one or more preview frames, then flow moves to block 530 where those frames are downloaded from the corresponding embedded media object content provider and displayed as preview frame(s) for the embedded media file.
If the corresponding embedded media object is not associated with a preview frame, then flow moves to block 535 where the preview frame loading module 460 dynamically generates one or more preview frames from a portion of the file corresponding to the embedded media object. Exemplary operations for dynamically generating preview frames will be described in
At block 610, the header of the embedded media file is downloaded. In some embodiments the header of the embedded media file may have previously been downloaded (e.g., when determining whether the embedded media object is playable) and need not be downloaded again. Flow moves from block 610 to block 620.
At block 620, the header is analyzed to determine the specific portion(s) of the media file that need to be downloaded such that the desired preview frame(s) may be displayed. It should be understood that multiple frames may need to be downloaded in order to properly construct the desired frames (even if there is only a single desired frame). Flow moves from block 620 to block 630, where the determined portion(s) of the media file are downloaded from the embedded media object source content provider. Flow moves from block 630 to block 640 where the desired preview frame(s) are generated based on the received portion(s) of the media file.
At block 710, a portion of the media file is downloaded from its embedded media object content provider. For example, a certain number of seconds of the embedded media file may downloaded. Flow moves from block 710 to block 720, where the downloaded portion is analyzed to determine a set of one or more candidate preview frames. Flow then moves to block 730, where the set of candidate preview frames are analyzed to determine which frame(s) may be interesting to the user. For example, an uninteresting frame may be a frame that is blank, has the same color, etc. Flow then moves to block 740 where one or more of the interesting candidate frames are selected and displayed as a preview for the embedded media object.
The flow diagram in
In block 802, a network application (e.g., a web browser) detects that a network application page (e.g., a web page), contains an embedded reference to a media file. This may be done by examining the file extension of the file specified in an HREF attribute or EMBED element, or by examining the TYPE attribute of and EMBED or OBJECT element.
Upon detection of an embedded media file, the network application in block 804 sends a request to the embedded media object content provider for the media file's MIME type. A MIME type is a two-part identifier for file formats. Examples of MIME types include “audio/mp3” (indicates that the file is an audio file in an MPEG-1 Audio Layer 3) and “video/mp4” (indicates that the file is a video file in the MPEG4 format). In block 806, the embedded media object content provider returns the media file's MIME type to the network application.
Next, in block 808, the network application compares the media file's MIME type with a list of known MIME types. The list of known MIME types is specific to each computing device on which the network application operates because whether a media file is playable by a computing device depends on what applications have been installed on the specific computing device. In block 810, the network application determines if there is a match between the media file's MIME type and a MIME type listed in the list of known MIME types. If there is a match, then the media file may be playable by the computing device. Further steps are performed to determine if the media file is indeed playable by the device.
In block 812, the media file's MIME type is compared with a second list of MIME types which is a subset of the list of known MIME types. The second list consists of “immediately playable” MIME types. In block 814, if the network application determines that that there is a match between the media file's MIME type and a MIME type in the list of “immediately playable” MIME types, then block 816 is reached and the network application determines that the media file is playable by the device. In other words, the list of “immediately playable” MIME types contains all MIME types which are known to be definitely playable by the device. For example, in one embodiment, the MIME type “audio/mp3”, which denotes an audio file in the MPEG3 format, is known to be playable by a computing device. Therefore, if a media file's MIME type is “audio/mp3”, then the network application determines that this media file is playable without further investigation.
On the other hand, if there is no match between the media file's MIME type and the list of “immediately playable” MIME types in block 814, then the network application may need to perform further steps to determine whether the media file is playable on the computing device. These further steps commence with block 824 and are described in detail below with respect to
Going back to block 810, if there is no match between the media file's MIME type and the list of known MIME types, block 818 is performed. In block 818, the network application compares the media file's file extension with a list of known file extensions. The file extension may be obtained from the path to the media file. Similar to the list of known MIME types, the list of known file extensions is specific to each computing device. The list of known file extensions contains all file extensions which may be played by a computing device. In block 820, if there is no match between the media file's file extension and a file extension in the list of known file extensions, then block 822 is reached and the network application determines that this media file is not playable. On the other hand, if there is a match between the media file's extension and a file extension in the list of known file extensions, then the network application may need to perform further steps to determine whether the media file is playable on the computing device. These further steps commence with block 824 and are described in detail below with respect to
As discussed above, if the network application cannot determine whether a media file is playable by a computing device based on a media file's MIME type and file extension alone, then the network application may request additional data from the server (embedded media object content provider) to perform further analysis. The flow diagram in
In block 824, the network application makes an initial determination, based on the media file's MIME type and file extension, regarding what kind of format is in the media file. For example, if the media file has a file extension of “.MP4”, then the network application determines that the media file is likely in a format in the MPEG4 family of formats. In another example, if the media file has an extension of “.MOV”, then the web browser determines that the media file is likely in a format in the QuickTime family of formats. Based on this initial determination, the network application requests the first eight bytes of the media file from the server in block 826.
When a media file is in the MPEG4 or QuickTime family of formats, the first eight bytes of the media file is the “header” of the first “atom” of the media file.
One type of atom is the “moov” (movie) atom. The contents of a “moov” atom contains information about how the movie is encoded and a table of contents for the media file. Another type of atom is an “mdat” (movie data) atom. An “mdat” atom contains the video and/or audio data in the media file. A third type of atom is an “ftyp” (file type) atom. The “ftyp” atom identifies the format of the media file within the MPEG4 or QuickTime family. Significantly, atoms in a MPEG4 or QuickTime media file can be arranged in any order. That is, although a “moov” atom contains the table of contents for the media file, it may actually follow the “mdat” atom(s) of the media file. One exception is the “ftyp” atom. If a media file contains an “ftyp” atom, the “ftyp” atom is always the first atom located in the media file.
In block 828, the network application receives the first eight bytes of the media file. As discussed above, these eight bytes constitute the header of the first atom of the media file. The network application analyzes the header, specifically the type cell of the header, and determines whether the header is the header of an “ftyp” atom. In block 130, if the header does not indicate an “ftyp” atom, then the network application downloads a “moov” atom from the server in block 842 in order to gather additional data about the media file. Block 842 is discussed in more detail below. If the header indicates an “ftyp” atom, then in block 832, the web browser requests the server for the entirety of the “ftyp” atom in order to perform analysis on the contents of the “ftyp” atom.
The content of a media file's “ftyp” item contains a series of “profiles” from which the network application can derive information about the format of the media file. Specifically, each profile contains information about what codec (coding and decoding) formats and bit rates are compatible with the audio and video data in the media file. An “ftyp” atom may contain more than one profile because the audio and video data in a media may be compatible with multiple coding formats and bit rates.
In block 834, the network application parses through profiles in an “ftyp” atom one at a time to extract format information. In block 836, the network application compares the extracted format information to information about what formats are supported, or playable, by a computing device. Information about what formats are supported by a computing device may be derived from what types of applications are installed on that device. Once again, this information is specific to each computing device. If the network application determines that the profile is supported in that it indicates that a format compatible with the media file is supported, or playable, by the computing device, then the network application determines in block 138 that the media file is playable by the computing device. In block 836, if the web browser determines that the profile is not supported, then further examination of the “ftyp” atom is performed.
In block 840, if the network application detects that there are more profiles in the “ftyp” atom which have not been analyzed, block 834 is repeated. In block 834, the next profile is parsed and the format information contained in the profile is extracted. However, if the end of the “ftyp” atom has been reached and there are no more profiles to parse, then additional information is gathered by requesting and receiving data until the “moov” atom is received in block 842.
As
In block 844, the network application receives the “moov” atom from the server and analyzes the “moov” atom for information about the media file's format. Sometimes, a “moov” atom may also be large and may contain several megabytes of data. Therefore, downloading an entire “moov” atom may also incur unwanted time and cost. A “moov” atom's content, however, is itself divided into “sub-atoms”, where the header of each “subatom” indicates the length and type of “sub-atom”. Consequently, in block 844, the network application downloads only the headers of the “moov” atom's sub-atoms, skipping over irrelevant content until it detects a sub-atom which contains information about the media file's format. For example, the “moov” atom may contain sub-atoms which contain information about the media file's audio track and the media file's video track.
The network application may extract information from the audio track and video track sub-atoms, and compares them to formats that are supported, or playable, by a device. For example, the video track sub-atom may indicate that the media file's video data has been compressed using “B-frames” (bi-directional frames), while the device does not have any applications which can play video data compressed into “B-frames”. In this example, in block 846, the network application determines that the video track is not supported by the device, and determines in block 848 that the media file is not playable by the device. In another example, the video track sub-atom may indicate that the media file's video data has been compressed using “I-frames” (intra frames), and the device does contain at least one application that can play video data compressed into “I-frames”. In this example, if the audio track is similarly supported, in the block 846, the network application determines that the audio and video tracks are playable and determines in block 838 that the media file is playable by the device.
Although an embodiment of the invention is described above in processes 800A and 800B (and
In addition to the details described in reference to
As illustrated in
According to one embodiment of the invention, the exemplary architecture of the data processing system 1100 may be included in the computing device 110. The data processing system 1100 includes the processing system 1120, which may include one or more microprocessors and/or a system on an integrated circuit. The processing system 1120 is coupled with a memory 1110, a power supply 1125 (which includes one or more batteries) an audio input/output 1140, a display controller and display device 1160, optional input/output 1150, input device(s) 1170, and wireless transceiver(s) 1130. It will be appreciated that additional components, not shown in
The memory 1110 may store data and/or programs for execution by the data processing system 1100. The audio input/output 1140 may include a microphone and/or a speaker to, for example, play music and/or provide telephony functionality through the speaker and microphone. The display controller and display device 1160 may include a graphical user interface (GUI). The wireless (e.g., RF) transceivers 1130 (e.g., a WiFi transceiver, an infrared transceiver, a Bluetooth transceiver, a wireless cellular telephony transceiver, etc.) may be used to communicate with other data processing systems. The one or more input devices 1170 allow a user to provide input to the system. These input devices may be a keypad, keyboard, touch panel, multi touch panel, etc. The optional other input/output 1150 may be a connector for a dock.
The techniques shown in the figures can be implemented using code and data stored and executed on one or more electronic devices (e.g., a computing device, a server, etc.). Such electronic devices store and communicate (internally and/or with other electronic devices over a network) code and data using machine-readable media, such as machine-readable storage media (e.g., magnetic disks; optical disks; random access memory; read only memory; flash memory devices; phase-change memory) and machine-readable communication media (e.g., electrical, optical, acoustical or other form of propagated signals—such as carrier waves, infrared signals, digital signals, etc.). In addition, such electronic devices typically include a set of one or more processors coupled to one or more other components, such as one or more storage devices, user input/output devices (e.g., a keyboard, a touchscreen, and/or a display), and network connections. The coupling of the set of processors and other components is typically through one or more busses and bridges (also termed as bus controllers). The storage device and signals carrying the network traffic respectively represent one or more machine-readable storage media and machine-readable communication media. Thus, the storage device of a given electronic device typically stores code and/or data for execution on the set of one or more processors of that electronic device. Of course, one or more parts of an embodiment of the invention may be implemented using different combinations of software, firmware, and/or hardware.
While embodiments have described that the playable validation procedure is performed on each embedded media object before performing the poster frame loading procedure, other embodiments allow for the playable validation procedure for one or more embedded media objects to be performed concurrently with the poster frame loading procedure for one or more embedded media objects (which may be the same embedded media objects or different embedded media objects).
While the flow diagrams in the figures show a particular order of operations performed by certain embodiments of the invention, it should be understood that such order is exemplary (e.g., alternative embodiments may perform the operations in a different order, combine certain operations, overlap certain operations, etc.).
While the invention has been described in terms of several embodiments, those skilled in the art will recognize that the invention is not limited to the embodiments described, can be practiced with modification and alteration within the spirit and scope of the appended claims. The description is thus to be regarded as illustrative instead of limiting.
This application claims the benefit of U.S. Provisional Application No. 61/298,527, filed Jan. 26, 2010, and U.S. Provisional Application No. 61/292,839, filed Jan. 6, 2010, which are both hereby incorporated by reference.
Number | Date | Country | |
---|---|---|---|
61292839 | Jan 2010 | US | |
61298527 | Jan 2010 | US |