Open GoogleCodeExporter opened 9 years ago
Fix from karjonas applied, and further changes and fixes applied. Let me know
if it works.
Original comment by zakflash...@gmail.com
on 6 Jun 2012 at 7:11
Yes, that seems to work nicely, thanks.
Noticed one thing, though. Certain downloaded .wsrt files are empty and the
subtitles are glued inside the video. In my own hacked version I just 'stat'
the file and unlink it if empty, as there's no point cluttering the file system
with useless stuff.
Cheers,
--
Cristian
Original comment by Cristian...@gmail.com
on 11 Jun 2012 at 11:12
Glad it works. Does the subtitle support work properly at all for any videos?
By "glued inside" subtitles I assume you mean burned in, i.e. part of the video
stream? Does it look like this because it's an old programme or because SVT has
"burned in" the subtitles on demand?
Original comment by zakflash...@gmail.com
on 12 Jun 2012 at 7:01
Yes, burned in, i.e. part of the video stream. Looks like SVT has "burned in"
the subtitles. I see the subtitles when I watch the video, though the
downloaded subtitle file is zero size and Svtplay.pm should detect that and
skip printing the file, possibly something similar to:
$browser->get($subtitles_url);
if (!$browser->success) {
info "Couldn't download subtitles: " . $browser->status_line;
}
+ if ($browser->content) {
my $srt_filename = title_to_filename($name, "srt");
open my $srt_fh, '>', $srt_filename
or die "Can't open subtitles file $srt_filename: $!";
binmode $srt_fh, ':utf8';
print $srt_fh $browser->content;
close $srt_fh;
+ }
would be more efficient then (earlier suggested) print-ing, stat-ing,
unlink-ing.
Cheers,
--
Cristian
Original comment by Cristian...@gmail.com
on 12 Jun 2012 at 8:17
Ok, but I'd ideally like to find out how to remove the burned in subtitles and
have subtitles in a separate file. Burned in subtitles are a bad solution.
Original comment by zakflash...@gmail.com
on 12 Jun 2012 at 8:19
True, but sorry, my skils are unfortunately limited.
OT: utf-8 file names. I'd love to see an option (as in ~/.get_flash_videosrc)
that converts that to some other, less cumbersome encoding.
Cheers,
--
Cristian
Original comment by Cristian...@gmail.com
on 12 Jun 2012 at 9:36
You don't use UTF-8 in your terminal? Sure, gfv could use latin1 for the
filenames (which is probably what you meant) but I'm not convinced this is wise.
Original comment by zakflash...@gmail.com
on 13 Jun 2012 at 6:35
[deleted comment]
No, I don't use utf-8 in my terminal. I use 'LC_ALL=', and that's all I really
need, most of the time. Nevertheless, the point I'm trying to make is that it
would be great if file names encoding would be configurable. One size (utf-8)
doesn't fit all, at least not myself. I don't read Chinese, Japanese nor
Arabic, Greek, Thai or Hindu (I wish I did, but I don't). I try to keep things
simple. That's the reason for wishing a configurable option.
Cheers,
--
Cristian
Original comment by Cristian...@gmail.com
on 13 Jun 2012 at 10:02
Having a configuration option is simpler than using an encoding which can
handle Swedish and pretty much every other language and writing system in the
world, and is supported fine on every major OS?
I will think about the best way of resolving this. At the minute I'm more
concerned about the burned in subtitles.
Original comment by zakflash...@gmail.com
on 20 Jun 2012 at 8:01
Original issue reported on code.google.com by
Cristian...@gmail.com
on 5 Jun 2012 at 7:39