Repository: youtube-dl
Issue: --embed-thumbnail crashes the program if the file has the wrong type
Labels: request,bug

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.08.28**
### Before submitting an _issue_ make sure you have:
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [x] Bug report (encountered problems with youtube-dl)

---
### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_

---
### If the purpose of this _issue_ is a _bug report_, _site support request_ or you are not completely sure provide the full verbose output as follows:

```
[info] Writing video description to: Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.description
[info] Writing video annotations to: Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.annotations.xml
[info] Writing video description metadata as JSON to: Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.info.json
[youtube] WrO9PTpuSSs: Downloading thumbnail ...
[youtube] WrO9PTpuSSs: Writing thumbnail to: Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.jpg
[download] Destination: Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.f247.webm
[download] 100% of 167.34MiB in 11:38
[download] Destination: Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.f251.webm
[download] 100% of 60.15MiB in 04:41
[ffmpeg] Merging formats into "Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.webm"
Deleting original file Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.f247.webm (pass -k to keep)
Deleting original file Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.f251.webm (pass -k to keep)
[ffmpeg] Adding metadata to 'Nujabes - Modal Soul (Full Album)-WrO9PTpuSSs.webm'
[ffmpeg] There aren't any subtitles to embed
ERROR: Only mp3 and m4a/mp4 are supported for thumbnail embedding for now.
```
### Description of your _issue_, suggested solution and other information

The program crashes with `--embed-thumbnails` enabled when the file is not `mp3/m4a/mp4`.
I wanted to backup a long playlist over night, but it crashed after video 9.

Invocation:

```
youtube-dl --yes-playlist --write-description --write-info-json --write-annotations --write-thumbnail --all-subs --add-metadata --embed-subs --embed-thumbnail <playlist>
```

I wrote a small, dirty patch that prevents the crash:

``` diff
diff --git a/youtube_dl/postprocessor/embedthumbnail.py b/youtube_dl/postprocessor/embedthumbnail.py
index 3bad5a2..cfc0e07 100644
--- a/youtube_dl/postprocessor/embedthumbnail.py
+++ b/youtube_dl/postprocessor/embedthumbnail.py
@@ -87,6 +87,8 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
                 os.remove(encodeFilename(filename))
                 os.rename(encodeFilename(temp_filename), encodeFilename(filename))
         else:
-            raise EmbedThumbnailPPError('Only mp3 and m4a/mp4 are supported for thumbnail embedding for now.')
+            # should be correctly caught outside, but the calling system is confusing
+            # raise EmbedThumbnailPPError('Only mp3 and m4a/mp4 are supported for thumbnail embedding for now.')
+            self._downloader.report_warning('Only mp3 and m4a/mp4 are supported for thumbnail embedding for now.')

         return [], info
```

The nice way would be to catch the exception outside of the class and handle it correctly, but I couldn’t find out where it is called.
It should also be clarified how the semantics should be: does `--embed-thumbnail` guarantee that a thumbnail exists in the output? can it embed if there is a thumbnail (then the error should not exist)? does it try its best and skip if it doesn’t work?