Intermittent upload Issues

Archived from the Transloadit support forum. Originally posted on February 26, 2014; details may be outdated, see our docs for current behavior. Original thread

I keep having intermittent upload issues with video.
What happens intermittently is 1. slow upload time, most of the time ending in no upload at all after 20 mins
2. after something finally uploads, the actual video when replayed cuts off way before the finish time. That is, it shows the full length of the video on the timeline on the bottom of the video, but, the video cuts off way before it reaches the end of the timeline.

Can you please attach some assembly ids where this happened?

Kind regards,

Tim Koschuetzki
Co-Founder Transloadit
@tim_kos

so, what actually happens for every video is that, after it renders, only some of it can play. my client is getting confusing because she says the video cannot play after a while, but, what in fact happens is that the full video has not rendered yet. we still need to wait a bit in order for it to play whole, but, there is no notification to the user explaining that they have to wait. i’ll see if my client is fine with this. i think it would be better to show the grainy image on the video tag until the full video has rendered and is ready to play. can you guys detect that?

Hey Aleksandra,

can you please post your integration code, for example using the jQuery plugin? I think there is something very wrong there. Once we are finished encoding a video it will be able to play fine.

Also please read up on assembly notifications here https://transloadit.com/docs#notifications in order to be notified when we have finished processing your files.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Here’s the code

<form id=“upload-form” action=“” enctype=“multipart/form-data”
method=“POST”>

<input type="file" name="my_file" multiple="multiple" />
</form>
<div>[Maximum video length is 90 seconds!]</div>
<script type="text/javascript">
$(function() {
$('#upload-form').transloadit({
wait: true,
triggerUploadOnFileSelection: true,
autoSubmit: false,
params: {
auth: {key: "REDACTED"},
template_id: "REDACTED"
},
onSuccess: function(assembly)
{
if(assembly.uploads[0].meta.duration > 90)
alert('WARNING! Your video cannot be over 90 seconds.');
else
{
Salon_SaveVideo(assembly.results["encode_video"][0]["ssl_url"], <?php
if(isset($_SESSION["Salon"]["VideoSource"]))echo
'"'.$_SESSION["Salon"]["VideoSource"].'"'; else echo "null"; ?>);
}
}
});
});
</script>

Tim,

Any progress on this? We cannot launch our application because of this.

Thanks for all your help.

Best,

By the way, when I set wait to ‘false’ nothing different happens. it’s still waits for a while at ‘100%’

i’ve switched the code to using notifications, etc. i do need to clear my session after the upload, so, i still have to have an onUpload function. this is what i changed it to be and it’s uploading way faster. Thanks for your help!

 <script type="text/javascript">
$(function() {
$('#upload-form').transloadit({
wait: false,
triggerUploadOnFileSelection: true,
autoSubmit: false,
params: {
auth: {key: "REDACTED"},
template_id: "REDACTED",
notify_url: "[http://salonmatchmakers.com/transloadit_notifications.php?id=&lt;?php](http://salonmatchmakers.com/transloadit%5Fnotifications.php?id=<?php)
echo $_SESSION["Salon"]["ID"]; ?>&file=<?php echo
urlencode($_SESSION["Salon"]["VideoSource"]); ?>"
},
onUpload: function(assembly)
{
clearVideo();
}
});
});
</script>

Yep that’s exactly what I meant. Glad you figured it out!

What does clearVideo() do? Can you post that function please?

Also, do you need more help here?

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Tim,

clearVideo() is just specific to what I’m doing. I just need to clear the session to say that the new video has been submitted for review.
No more help needed. Thank you for everything.

Have a great weekend!

Tim,

last question, does the notify_url only get called once? or does it keep getting called multiple times for some reason. my notify_url sends out one email when the transformation happens, but, I’ve seen multiple emails come out.

Hey Aleksandra,

the notify mechanism is considered faulty if you do not reply with a 200 (success) header and it will then be retried. Please make sure the POST request receives that header, then the notification will only be sent once.

I’ll update the docs to make this more clear!

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos