After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745292 - gst-play: load local subtitles
gst-play: load local subtitles
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-27 16:36 UTC by Víctor Manuel Jáquez Leal
Modified: 2018-11-03 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-play: load local subtitles (2.20 KB, patch)
2015-02-27 16:36 UTC, Víctor Manuel Jáquez Leal
none Details | Review
gst-play: load local subtitles (2.31 KB, patch)
2015-03-03 12:31 UTC, Víctor Manuel Jáquez Leal
none Details | Review

Description Víctor Manuel Jáquez Leal 2015-02-27 16:36:07 UTC
I don't want to bloat gst-play, but, at same time, I think this little snippet 
might be useful as implementation reference.

Basically it mimics mplayer's functionality, loading the subtitle file if it 
is present in the same path of the media file with 'srt' extension.
Comment 1 Víctor Manuel Jáquez Leal 2015-02-27 16:36:11 UTC
Created attachment 298101 [details] [review]
gst-play: load local subtitles

When a new uri is loaded, the new function play_suburi() will look
for a subtitle file, the uri is local and the subtitle file has the
same name of the media file but with extension 'srt'.
Comment 2 Víctor Manuel Jáquez Leal 2015-03-03 12:31:29 UTC
Created attachment 298421 [details] [review]
gst-play: load local subtitles

When a new uri is loaded, the new function play_suburi() will look
for a subtitle file, the uri is local and the subtitle file has the
same name of the media file but with extension 'srt'.

v2: fix pathological cases of filenames with an ending '.' or no
dot at all
Comment 3 Reynaldo H. Verdejo Pinochet 2015-06-01 13:17:42 UTC
Good idea. Maybe do the same for .sub files (or for
that matter, any known text subtitle file extension)
and add documentation on how the subtitle file is
choosen if more than one is found?
Comment 4 Tim-Philipp Müller 2015-06-01 13:28:20 UTC
I'm not sure how keen I am on having this in gst-play, which should imho demonstrate functionality as it exists. I think a command line argument for the subtitle file would be more appropriate, even if less convenient.
Comment 5 Reynaldo H. Verdejo Pinochet 2015-06-08 20:57:32 UTC
uhm. I have no strong opinion about it but if gst-play is already
automating some choices like what audiotrack to play if more than
one available or similar, then I think this idea makes sense on the
same grounds. Maybe we can add a flag to make the autodetection
conditional? I like Tim's idea too but maybe we can still have both
without adding a lot of code, and IMHO, it will be useful for some.
Comment 6 Tim-Philipp Müller 2015-06-08 21:43:25 UTC
It is not gst-play that automates the choice which audio track is played, but playbin.
Comment 7 Reynaldo H. Verdejo Pinochet 2015-06-08 22:36:04 UTC
I understand but would you rather add logic to playbin for
subtitle auto-loading / selection than having this done
in gst-player? or you just dislike the idea all together?
Comment 8 Tim-Philipp Müller 2015-06-08 22:41:12 UTC
I like the idea in principle, I just think that it's something that playbin (or elements inside the pipeline) should figure out and then everything will just pick up the subs automagically. That's a bit more hassle to implement than adding it to gst-play of course, not least because of API bikeshedding, but it's where it should be done IMHO.
Comment 9 Reynaldo H. Verdejo Pinochet 2015-06-08 22:52:04 UTC
Cool, think I got it now. Will keep it in mind and see whether
I can throw some time at it. Shall we close this one as a wontfix
or keep around till a better solution is implemented?
Comment 10 Tim-Philipp Müller 2015-06-10 10:31:30 UTC
That would be my preference at least.
Comment 11 Sebastian Dröge (slomo) 2015-06-10 11:11:44 UTC
For reference, this "fork" of gst-play has suburi support already:
https://github.com/sdroege/gst-player/tree/master/gst-play
Comment 12 Sebastian Dröge (slomo) 2015-06-10 11:27:39 UTC
(In reply to Sebastian Dröge (slomo) from comment #11)
> For reference, this "fork" of gst-play has suburi support already:
> https://github.com/sdroege/gst-player/tree/master/gst-play

Nevermind, the GTK UI has, not the commandline player :) Sorry for the confusion
Comment 13 GStreamer system administrator 2018-11-03 11:35:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/166.