SYSTEMS AND METHODS FOR TRANSMITTING A MEDIA FILE IN MULTIPLE PORTIONS
Systems, methods, and non-transitory computer-readable media can receive an initial request to upload a media file. A first portion size for the media file can be determined based on information included in the initial request. A first data start position and a first data end position for the media file can be transmitted based on the first portion size. A first portion of the media file can be received. In some instances, the first portion can be acquired from the media file based on the first data start position and the first data end position.
1 . A computer-implemented method comprising:
receiving, by a computing system, an initial request to upload a media file;
determining, by the computing system, a first portion size for the media file based on information included in the initial request;
transmitting, by the computing system, a first data start position and a first data end position for the media file based on the first portion size; and
receiving, by the computing system, a first portion of the media file, the first portion being acquired from the media file based on the first data start position and the first data end position.
2 . The computer-implemented method of claim 1 , wherein the information included in the initial request comprises at least one of a file size of the media file, a network condition, historical usage data, or a property associated with a source requesting to upload the media file.
3 . The computer-implemented method of claim 2 , wherein the network condition indicates bandwidth, wherein the first portion size for the media file is increased when the bandwidth increases, and wherein the first portion size for the media file is decreased when the bandwidth decreases.
4 . The computer-implemented method of claim 2 , wherein the first portion size is determined based on historical usage data including information about a portion size during a previous file upload.
5 . The computer-implemented method of claim 2 , wherein the property associated with the source includes at least one of a property about an operating system of the source or a property about an application running on the source.
6 . The computer-implemented method of claim 1 , further comprising:
determining a second portion size for the media file;
transmitting a second data start position and a second data end position for the media file based on the second portion size, the second data start position corresponding to a data position in the media file equal or subsequent to the first data end position; and
receiving a second portion of the media file, the second portion being acquired from the media file based on the second data start position and the second data end position.
7 . The computer-implemented method of claim 6 , further comprising:
performing one or more validation processes for at least one of the initial request, the first portion of the media file, or the second portion of the media file.
8 . The computer-implemented method of claim 7 , wherein the one or more validation processes are performed at a source requesting to upload the media file.
9 . The computer-implemented method of claim 7 , wherein the one or more validation processes utilize at least one of a feature associated with FFmpeg or a MOOV atom of the media file.
10 . The computer-implemented method of claim 6 , further comprising:
determining that the media file has been received entirely;
transmitting a message indicating that the media file has been received entirely; and
receiving a request to post the media file.
11 . The computer-implemented method of claim 10 , further comprising:
encoding the media file; and
posting the media file at a social networking system under an account associated with a source requesting to upload the media file.
12 . The computer-implemented method of claim 1 , further comprising:
determining a second portion size for the media file;
transmitting a second data start position and a second data end position for the media file based on the second portion size, the second data start position corresponding to a data position in the media file equal or subsequent to the first data end position; and
detecting an error associated with a transmission of the second portion of the media file.
13 . The computer-implemented method of claim 12 , further comprising:
determining that a sub-portion of the second portion of the media file has been received;
storing the sub-portion of the second portion of the media file;
transmitting a third data start position equal or subsequent to a data end position of the sub-portion; and
receiving a remainder portion of the second portion of the media file, wherein the sub-portion and the remainder portion are combinable to produce to the second portion of the media file.
14 . The computer-implemented method of claim 12 , wherein the error is associated with at least one of an error code, an error sub-code, an error message, an error title, a transient error flag, or a permanent error flag.
15 . The computer-implemented method of claim 12 , further comprising:
determining that the error associated with the transmission of the second portion is permanent; and
transmitting a message indicating that the transmission of the second portion has incurred a permanent error.
16 . The computer-implemented method of claim 12 , further comprising:
determining that the error associated with the transmission of the second portion is transient;
receiving a resume request to continue uploading the media file;
transmitting the second data start position and the second data end position; and
receiving the second portion of the media file.
17 . The computer-implemented method of claim 16 , wherein the resume request is received based on an exponential back-off algorithm.
18 . The computer-implemented method of claim 1 , wherein the media file includes at least one of a video file, an image file, an audio file, or a media software file.
19 . A system comprising:
at least one processor; and
a memory storing instructions that, when executed by the at least one processor, cause the system to perform:
receiving an initial request to upload a media file;
determining a first portion size for the media file based on information included in the initial request;
transmitting a first data start position and a first data end position for the media file based on the first portion size; and
receiving a first portion of the media file, the first portion being acquired from the media file based on the first data start position and the first data end position.
20 . A non-transitory computer-readable storage medium including instructions that, when executed by at least one processor of a computing system, cause the computing system to perform:
receiving an initial request to upload a media file;
determining a first portion size for the media file based on information included in the initial request;
transmitting a first data start position and a first data end position for the media file based on the first portion size; and
receiving a first portion of the media file, the first portion being acquired from the media file based on the first data start position and the first data end position.