senko / python-video-converter

Python Video Converter (ffmpeg wrapper)
468 stars 191 forks source link

Detect audio posters in probe #28

Closed tahajahangir closed 11 years ago

tahajahangir commented 11 years ago

This is related to #25 , when probe incorrectly report video stream for audio files with poster images. (Note that mp3 files with poster image can be converted into a complete video!)

Now, probe functions has a separate argument posters_as_video to change this behavior. With True (default value), the behavior is as has been previously, the poster image is accounted as a video stream, and so info.video may return poster images as well as video steams.

But if we pass False as posters_as_video, info.video will be None, or a audio file with poster(s).

And finally, all poster images all always accessible via info.posters

senko commented 11 years ago

Apart from that test failure, looks good to me. I didn't know you could put posters (or, well, anything) in a video stream in an mp3.

One small nitpick - could you reformat the docstrings to use the RST syntax? Sphinx doesn't understand the @param markup (or at least the config that I'm using doesn't), so this gets messed up. Ideally we'd go through all the docstrings and update them to make them more Sphinx-friendly, but a good start would be to just do it with the newly added stuff.

tahajahangir commented 11 years ago

Thanks for notes.

@param syntax changed to :param and the test is also compatible with 2.6.

senko commented 11 years ago

Great, thanks!