Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewster: uncomplete video file #6057

Closed
remitamine opened this issue Jun 23, 2015 · 14 comments
Closed

Viewster: uncomplete video file #6057

remitamine opened this issue Jun 23, 2015 · 14 comments
Labels
f4m

Comments

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jun 23, 2015

when i download videos from the viewster the last part of the video is missing.
in the video player it show the right duration but when i reach to about the last 10-20% of the video the player fail and get closed.
i'm not sure but i think the problem is reletad to the f4m downloader may be it doesn't get the right number of segments to download.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 23, 2015

Which URL are you trying to download?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 23, 2015

Both videos give "Oops, this content is not available in your country :(". Do you have a non-georestricted example?

Or, what's your location? I may try to find a proxy.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 23, 2015

@yan12125 for me it works via tor through US exit node.

@remitamine
Copy link
Collaborator Author

@remitamine remitamine commented Jun 23, 2015

yes i download the videos with US IP.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 24, 2015

Well, for me the downloaded file can be played in VLC to the last second. What player are you using? Did you get any error messages either in downloading or from the player?

My file is 571426074 bytes with MD5 b8321050ac8307bc58e15800d579e125. If you have an identical file, it could be the problem from your player rather than youtube-dl.

@remitamine
Copy link
Collaborator Author

@remitamine remitamine commented Jun 24, 2015

i'm using mpv.
i forget to say i stop the download and continue multiple times.
as i remember youtube-dl finished without an error but in the video player i didn't see what the terminal output in the last section.
i start thinking that the problem happen from youtube-dl beacause it happen 2 times.
i already removed the files but i will redownload it again and post the exact file size and md5 checksum.

@remitamine
Copy link
Collaborator Author

@remitamine remitamine commented Jun 24, 2015

i download the two files again.
for the first episode it stops playing after 2 seconds i think because of an error at the beginning of the download:
[download] 0.0% of ~630.72MiB at 932.60B/s ETA --:--:--ERROR: content too short (expected 1503094 bytes and served 135808)
but when i complete the download it continue like there is no error before.
for the second episode no error happened in the download process i stop the download multiple times(31.7% , 60.7% , 71.6%) and after it complete i play the video and it stops at 71%.
i put the output where the error happen in multiple players.
the output of mpv:
AV: 00:31:37 / 00:44:08 (71%) A-V: 0.000

Exiting... (End of file)

the output of ffplay after seeking to the last section:
Seek to 93% ( 0:41:04) of total duration ( 0:44:08) B f=0/0
Merlin—Season Two - The Once and Future - Episode 2-1244-16928-002-the-once-and-future.flv: error while seeking

output of cvlc:
Truncating packet of size 8933020 to 5888

Merlin—Season Two - The Curse of Corneli - Episode 1-1244-16928-001-the-curse-of-corneli.flv:
MD5:9e5eeba3b6e71bad455ff88ceb9dc40f
size:569,211,838 bytes

Merlin—Season Two - The Once and Future - Episode 2-1244-16928-002-the-once-and-future.flv
MD5:87ce83644ce7db416ccfa3b50996af55
size:571,426,074 bytes

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 24, 2015

Thanks confirmed. Stopping and restarting a F4M downloading causes errors in both VLC and mpv.

@yan12125 yan12125 added the f4m label Jun 24, 2015
@remitamine
Copy link
Collaborator Author

@remitamine remitamine commented Jun 25, 2015

i think the problem happen because when i stop the download the last downloaded segment isn't complete and when i continue the download the f4m downloader suppose that it's complete than it continue from the next segment.
i try to download again and stop multiple times and every time i stop i remove the last part and it works when the download is finished the video is playing untill the last second.
to solve the problem the current downloading segment should stay in memory untill it's complete than write it to the disk or detect the progress of the last part and complete it before moving to the next part.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 29, 2015

From my tests, setting continuedl to False may solve the issue although I can't always reproduce the problem.

@remitamine
Copy link
Collaborator Author

@remitamine remitamine commented Jul 29, 2015

it depends on the last segment when you stop the download if it's complete there is no problem but if it's not complete than when resume the download, the f4m downloader can't resume it than it pass keeping it incompete, the final video will stop at the at the last complete segment.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 29, 2015

I suspected that was the reason, I have checked it and it fixes it. With the change, if the last segment is not completely downloaded it's fully redownloaded when resuming.

@remitamine
Copy link
Collaborator Author

@remitamine remitamine commented Jul 29, 2015

when the downloader resume a download it send the Range header and expect the server to return something like that:

HTTP/1.1 206 Partial Content
Content-Range: bytes 1719365327-1806696447/4085354184
...

but in the case of viewster it return something like that(it doesn't contain the Content-Range header):

HTTP/1.1 200 OK
...

because of that i think the HttpFD doesn't check for the response if it contain Content-Range may be because the response code is 200.
the download mangers handle this case.
this is the info output of aria2c when i resume the download from viewster:

07/30 00:17:06 [INFO] CUID#7 - Requesting:
GET /z/http_rtmpe/shared/s/viewster-0009-00-848H264_movie/1152-12102-001_thehouseofvenusshowseason1_movie_viewster-0009-00-848H264_en_x_x.mp4/0_6c950b44d450840b_Seg1-Frag1?hdntl=exp=1438298399~acl=%2fz%2fhttp_rtmpe%2fshared%2fs%2fviewster-0009-00-848H264_movie%2f1152-12102-001_thehouseofvenusshowseason1_movie_viewster-0009-00-848H264_en_x_x.mp4%2f*~data=hdntl~hmac=e8e4fc75cb0d3dee00477dbb166e4dd864c8a58e67c4b0f39aa3e674e0368840 HTTP/1.1
Host: viewsterall-vh.akamaihd.net
Range: bytes=573440-1705011
Accept-Language: en-us,en;q=0.5
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip, deflate
Cookie: _alid_=90KzAsXHFR72+w0LNDVsuA==; hdntl=exp=1438298397~acl=%2fi%2fhttp_rtmpe%2fshared%2fs%2fviewster-0037-00-AkamaiHD_64kb%2f1152-12102-001_thehouseofvenusshowseason1_movie_viewster-0037-00-AkamaiHD_en_x_x.smil%2f*~data=hdntl~hmac=359930f1c0641358d3654f661d9ea498be94ca0866726c2aa2897303f63df49d


[#9ee018 560KiB/1.6MiB(33%) CN:1 DL:0B]                                        
07/30 00:17:07 [INFO] CUID#7 - Response received:
HTTP/1.1 200 OK
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: video/f4f
Content-Length: 1705012
Date: Wed, 29 Jul 2015 23:20:02 GMT
Connection: keep-alive



07/30 00:17:07 [ERROR] CUID#7 - Download aborted. URI=http://viewsterall-vh.akamaihd.net/z/http_rtmpe/shared/s/viewster-0009-00-848H264_movie/1152-12102-001_thehouseofvenusshowseason1_movie_viewster-0009-00-848H264_en_x_x.mp4/0_6c950b44d450840b_Seg1-Frag1?hdntl=exp=1438298399~acl=%2fz%2fhttp_rtmpe%2fshared%2fs%2fviewster-0009-00-848H264_movie%2f1152-12102-001_thehouseofvenusshowseason1_movie_viewster-0009-00-848H264_en_x_x.mp4%2f*~data=hdntl~hmac=e8e4fc75cb0d3dee00477dbb166e4dd864c8a58e67c4b0f39aa3e674e0368840
Exception: [AbstractCommand.cc:350] errorCode=8 URI=http://viewsterall-vh.akamaihd.net/z/http_rtmpe/shared/s/viewster-0009-00-848H264_movie/1152-12102-001_thehouseofvenusshowseason1_movie_viewster-0009-00-848H264_en_x_x.mp4/0_6c950b44d450840b_Seg1-Frag1?hdntl=exp=1438298399~acl=%2fz%2fhttp_rtmpe%2fshared%2fs%2fviewster-0009-00-848H264_movie%2f1152-12102-001_thehouseofvenusshowseason1_movie_viewster-0009-00-848H264_en_x_x.mp4%2f*~data=hdntl~hmac=e8e4fc75cb0d3dee00477dbb166e4dd864c8a58e67c4b0f39aa3e674e0368840
  -> [HttpResponse.cc:90] errorCode=8 Invalid range header. Request: 573440-1705011/1705012, Response: 0-1705011/1705012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.