TrueWriter / get-flash-videos

Automatically exported from code.google.com/p/get-flash-videos
0 stars 0 forks source link

looks like SVT is trying to put a stop to it #393

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

* try to get url <http://www.svtplay.se/video/107384/flamingosjoar>

What do you see instead?

,----
| $ get_flash_videos --debug http://www.svtplay.se/video/107384/flamingosjoar
| 2 plugins installed:
| - Svtplay.pm
| - Urplay.pm
| Trying to open plugin ~/.get_flash_videos/plugins/Www.pm
| Trying to open plugin ~/.get_flash_videos/plugins/Svtplay.pm
| Using method 'svtplay' for http://www.svtplay.se/video/107384/flamingosjoar
| Downloading http://www.svtplay.se/video/107384/flamingosjoar
| -> GET http://www.svtplay.se/video/107384/flamingosjoar
| <- 200 text/html; charset=utf-8 (31553): UTF8 on, non-ASCII, 31553 characters 
31769 bytes
| *** data ''
| Error: *** no data at /loader/0xa7d3adc/FlashVideo/Site/Svtplay.pm line 23.
| 
| Couldn't extract Flash movie URL. This site may need specific support adding,
| or fixing.
| 
| Please confirm the site is using Flash video and if you have Flash available
| check that the URL really works(!).
| 
| Check for updates by running: /usr/bin/get_flash_videos --update
| 
| If the latest version does not support this please open a bug (or
| contribute a patch!) at http://code.google.com/p/get-flash-videos/
| make sure you include the output with --debug enabled.
| Couldn't download any videos.
`----

  I added some more debug marked '***'.

  my $data = ($browser->content =~ /dynamicStreams=(.*?)&/)[0];

  No 'dynamicStreams' found, yields empty '$data'.  '$data' should be tested before going further?

What version of the product are you using?

  Debian packaged Version: 1.25~git2012.03.01-1.

On what operating system?

  Debian GNU/Linux.

Please provide any additional information below.

Looks like the real thing is hidden at another url, pointed to by 
'data-popout-href="/video/105435?type=embed"' in 
<http://www.svtplay.se/video/107384/flamingosjoar>.  Downloading 
<http://www.svtplay.se/video/105435?type=embed> reveals things like:

rtmpe://fl11.c90909.cdn.qbrick.com/90909/_definst_/wp3/1219796/WILD_WONDERS-002A
-mp4-e-v1-703cf1ab8cd82da72cb91fab6c4222fa99c1e3b9.mp4
bitrate&quot;:2400 (and also other bitrates)

http://media.svt.se/download/mcc/wp3/undertexter-wsrt/1219796/EPISOD-1219796-002
A-wsrt-703cf1ab8cd82da72cb91fab6c4222fa99c1e3b9.wsrt

Downloading the above urls and renaming the files makes a video with subtitles 
;)

Cheers,

-- 
Cristian

Original issue reported on code.google.com by Cristian...@gmail.com on 5 Jun 2012 at 7:39

GoogleCodeExporter commented 8 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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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