Media Youtube/Vimeo is being saved (or rendered) incorrectly as application/octet-stream In Drupal 7, I am using panels/panelizer, media &amp; media_youtube.

I have correctly set up my view mode for the Video file type, and have selected that view mode using 'Rendered entity' in my pane settings.

The video is rendering as a link to sites/default/files/[file youtube title].

The above problem is arising with a file field on a node, that is being rendered with panelizer.  When I add a video using a fieldable panel pane, it renders correctly (using the same view mode).

Any help you could provide would be much appreciated.

&lt;div class="field-video"&gt;
    &lt;span class="file"&gt;
      &lt;img class="file-icon" alt="" title="application/octet-stream" src="/modules/file/icons/application-octet-stream.png"&gt; 
      &lt;a href="http://sl-header.site.io/sites/default/files/F%2016%20Fighter%20Pilots%20over.F%2016%20Fighter%20Pilots%20over" type="application/octet-stream; length=0"&gt;F 16 Fighter Pilots.F 16 Fighter Pilots over&lt;/a&gt;
    &lt;/span&gt;
&lt;/div&gt;
I was having the same problem. The YouTube video was added correctly using the Media browser, the thumbnail was generated and it was even saved in the database correctly prior to saving the node.

After the node was saved, the entry in the database changed to application/octet-stream with a filename of the description twice, as well as a URI of public://

Something was altering the file details when the node was being saved. There weren't many options I could think of, and a quick review of the field settings revealed filefield_paths was enabled for the field, which was altering the filename.

I disabled fielfield_paths for the field and saved the node again, which resulted in the video displaying properly.

If you have filefield_paths installed, try disabling it for the YouTube field only.

Update: This is resolved in the latest version of filefield_paths. See: https://www.drupal.org/node/2576547