Opened 8 years ago

Closed 8 years ago

#7416 closed enhancement (fixed)

MediaPlayer's "Extra Media Binding Feature"

Reported by: shinta Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/MediaPlayer Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

It's useful that when MediaPlayer plays only audio or video media file, MediaPlayer also play another video or audio from same filename's (but different extension) media file.

For example, MediaPlayer plays foo.mp3 (of course mp3 has only audio) with foo.avi's video.

This feature is useful for example:

  • Playing high sound quality foo.wav with PV foo.mpg --- PV has audio but it is lossy compression.
  • You often save audio parts and video parts separated when you create movie.

Haiku: hrev41022
SHINTA (enhancement No.7)

Attachments (2)

mediaplayer.diff (7.8 KB) - added by shinta 8 years ago.
This is the patch to add Extra Media Binding Feature to MediaPlayer
mediaplayer2.diff (21.2 KB) - added by shinta 8 years ago.

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by shinta

Attachment: mediaplayer.diff added

This is the patch to add Extra Media Binding Feature to MediaPlayer

comment:1 Changed 8 years ago by shinta

Has a Patch: set

comment:2 Changed 8 years ago by anevilyak

Component: - GeneralApplications/MediaPlayer
Owner: changed from nobody to stippi
Version: R1/alpha2R1/Development

comment:3 Changed 8 years ago by stippi

Thanks for the patch, the feature is definitely cool, I really like it.

However, the implementation could be a lot more powerful. First of all, I don't like that this happens in the Controller. When you add for example all files in a directory to the playlist, the combined file will play twice. Also, it does not cover all use cases that could be covered: I have one movie with both audio and video, and then one extra audio file with a different language for the same movie. These tracks would not bind with your implementation. In a similar use case, I have two files of the same movie, one is a low quality English version, the other is a high quality german version. I would love to be able to watch the high quality German video with the audio track from the English movie file. Again a situation that is not supported. A similar situation would be one movie file and many separate audio files for each language of the movie.

I think what should happen is that binding takes place at the playlist level. This would take care of the first issue. Then MediaFileTrackSupplier could be changed to combine the tracks of an arbitrary number of BMediaFiles. The binding should also not only take the file name into account, but also the duration as an additional indication whether binding is possible at all. Remember that the same movie might be stored with different frame rates and the audio could not be matched in this case.

Last but not least, the patch contains a few coding style violations with regards to spacing around parenthesis. Would be nice to have those addressed, in case you want to keep working on the patch. Thanks in any case!

comment:4 Changed 8 years ago by axeld

FWIW, I find such an automatism pretty much useless. I agree that the feature itself might have its uses (even though they should be pretty rare in the real world; in most examples, the audio/video tracks won't be synchronous), I don't really think it should be done automatically at all. Ideally, you should use some software to correctly glue those files together into a single stream, anyway.

However, how about an "Attach tracks" menu instead (that could even collect some items from the directory of the current file to choose from in a menu)?

comment:5 Changed 8 years ago by shinta

Thank you for comments.

It is tiresome to merge audio/video manualy. On the other hand, there may be few people who has trouble by binding automatically. So, it's better to implement automatic binding mechanism.

I think it is a good idea to change playlist and to let MediaFileTrackSupplier have multi BMediaFiles. I'll try to change playlist.

I don't know that duration mechanism is good or bad. There may be same movie with different frame rates. But, in many case, PV's duration and wave from CD's duration is different.

comment:6 in reply to:  5 Changed 8 years ago by axeld

Replying to shinta:

It is tiresome to merge audio/video manualy. On the other hand, there may be few people who has trouble by binding automatically. So, it's better to implement automatic binding mechanism.

But that's not an argument to put this feature into the MediaPlayer - that's an argument to improve or create tools that assist you with this task. It's a feature that 99% of the users won't even notice, but that really is an argument to not put it in there in the first place. Due to asynchronous playback issues that cannot be solved within MediaPlayer without great effort, it is just a misplaced feature IMO.

Changed 8 years ago by shinta

Attachment: mediaplayer2.diff added

comment:7 Changed 8 years ago by shinta

OK.

I wrote a patch, in which playlist manages extra media. But, I look on needs for extra media calmly.

comment:8 Changed 8 years ago by phoudoin

Since hrev41271, the #7430 enchancement adds de-facto such support too, if I've correctly understand the code. Maybe we should restrict it only to cover artwork, and add a attach track menu for others cases?

comment:9 Changed 8 years ago by stippi

I thought the same thing when reading the artwork patch. Personally, I don't mind that this feature is now implemented in this form. Especially since I don't see how it could come back and bite the user. There are in fact use-cases where it is very common to have the audio and video separated in different files, like when generating output for DVD authoring software in some tools. I think if the files are named the same, it's a good assumption that the content belongs to the same media. It could even improve/simplify the subtitle support which already exists.

To be able to bind other media explicitely would be cool as well of course.

comment:10 Changed 8 years ago by shinta

Extra media feature is a basement of artwork. Artwork is one of usage of extra media.

Because artwork is committed, it is good to close this trac.

comment:11 Changed 8 years ago by nielx

Resolution: fixed
Status: newclosed

See comment:10.

Note: See TracTickets for help on using tickets.