Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MP4 is downloading instead of playing

MP4 files are sometimes downloaded, and other times they play in the browser.

What is the difference between these two links?

1) If you open this URL in Chrome, the video will download:

http://video.video-mall.com/video_mall/400241188377_video.mp4

2) If you open this URL on Chrome, the video will play in the browser:

http://www.simplethoughtproductions.com/wp-content/uploads/SimpleShorts/Morning_Mail/morning_mail.mp4

Why is that?

like image 769
Yan Avatar asked Sep 12 '11 14:09

Yan


People also ask

Why is the video I downloaded not playing?

If the video has already been downloaded, but you can't play it on your Android phone, then it can have the following reasons. The video could not be downloaded properly from its source. The header of the video file could be missing or corrupted. There can be issues with the syncing of its video or audio component.

Why is youtube downloading instead of playing?

Sometimes, JavaScript accidentally gets disabled. This is a quick and easy fix. Just go into your Chrome settings and turn it on to enable video playback.

How do I open a file instead of downloading it?

To make certain file types OPEN on your computer, instead of Chrome Downloading... You have to download the file type once, then right after that download, look at the status bar at the bottom of the browser. Click the arrow next to that file and choose "always open files of this type". DONE.


2 Answers

First link has Content-Type: application/octet-stream header, while the second one Content-Type: video/mp4.

like image 79
serg Avatar answered Oct 29 '22 18:10

serg


With Serg's answer , I would also like to add about Content-Disposition header . If you set the Content-Disposition as inline , then your video/content will play within the browser and if you set Content-Disposition as attachment , then your browser will download it .

More info on this can be found here .

like image 30
Aniket Warey Avatar answered Oct 29 '22 16:10

Aniket Warey