Randomly video uploading fails on Encoding when video reaches above 7 min

We are using Uppy along with Webcam and Transcodeit plugin. Once the video reaches above 7 minute and we try to upload the file. The file gets uploaded but stuck on “Encoding…” and generated error. Unfortunately can’t replicate the exact issue quite often but it’s there and our client has faced similar issue multiple times.

Here’s the code

return new Uppy({
				debug: false,
				autoProceed: this.autoProceed,
				locale: this.locale,
				restrictions: {
					maxFileSize: this.maxFileSize,
					allowedFileTypes: [
						'image/*',
						'video/*',
						'audio/*',
						'application/pdf',
					],
				},
			})
				.use(Webcam, {
					modes: [this.recordMode],
					mirror: false,
					countdown: false,
					showRecordingLength: true,
					showVideoSourceDropdown: true,
				})
				.use(Transloadit, {
					params: {
						auth: { key: process.env.TRANSLOADIT_AUTH_KEY },
						template_id: process.env.TRANSLOADIT_CHAT_TEMPLATE_ID,
					},
					waitForEncoding: this.waitForEncoding,
					waitForMetadata: true,
				})
				.on('transloadit:upload', (file, assembly) => {
					console.log("Upload")
					console.log(file)
					if (this.channel) {
						if (!this.sendToAll) {
							const obj = {
								id: file.original_id,
								channel: this.channel,
							}
							this.$store.set('chat/queue', [...this.queue, obj])
							this.checkAssembly(assembly.assembly_ssl_url)
						}
					}
				})
				.on('transloadit:complete', (assembly) => {
					if (this.channel) {
						if (this.sendToAll) {
							this.attachMedia(assembly.results)
							this.send()
						}
					}

					if (this.isTemplate) {
						this.attachMedia(assembly.results)
						this.emitMessageObj()
					}
				})
				.on('error', (error) => {
					if (error.assembly) {
						this.$sentry.captureException(error.assembly)
						this.$toast.error(
							this.$t(
								'Something went wrong when trying to encode your media files'
							)
						)
					}
				})

Please suggest any reason and possible solution. Also is there any way, We could manually retry uploading or auto retry the upload. Re-capturing the video is quite frustrating on second attempt.

Hi, what is the error you’re getting?

Unfortunately, We were not able to capture the exact error.

@Merlijn Finally got error message on transcodeit

UPLOAD CONNECTION ABORTED.

The upload connection was closed or timed out before receiving all data.

So I was looking for some ways to retry instead of re-recording everything from scratch