Crunchyroll-XML-Decoder icon indicating copy to clipboard operation
Crunchyroll-XML-Decoder copied to clipboard

Problem choice resolution video

Open Virusf opened this issue 5 years ago • 8 comments

Hi people

someone would have a solution because the choice of resolution no longer works and whatever the choice the resolution is 1080p?

sorry for my english which is google translation

Virusf avatar Mar 12 '19 20:03 Virusf

i haven't looked at the selection of the resolution yet but crunchyroll doesn't send the resolution in the xml answer anymore since today.

Elegond avatar Mar 12 '19 20:03 Elegond

I think the quality in altfuncs.py line 20 needs to be remapped but I don't have the time to test it right now.

Elegond avatar Mar 12 '19 21:03 Elegond

Thank you Elegond. Now I have to find how to download in 720p.

nigoki2 avatar Mar 13 '19 09:03 nigoki2

you can extract quality from the link of the stream

resolution

example:

ffmpeg -i "https://dl.v.vrv......." -map p:0 -c copy "720p.ts" ffmpeg -i "https://dl.v.vrv......." -map p:1 -c copy "1080p.ts" ffmpeg -i "https://dl.v.vrv......." -map p:2 -c copy "480p.ts"

rs3mk avatar Mar 17 '19 18:03 rs3mk

@rs3mk How to put this in the script ?

nigoki2 avatar Mar 17 '19 19:03 nigoki2

edit: ultimate.py video_hls(filen, video_input, vquality) ultimate

hls.py

def find_720_video(uri, vquality):
    playlist = m3u8.load(uri)
    if not playlist.is_variant:
        return playlist
    best_stream = playlist.playlists[0]
    for stream in playlist.playlists:
        if stream.stream_info.bandwidth == 'max' or stream.stream_info.resolution == vquality:
            best_stream = stream
    return find_720_video(best_stream.absolute_uri, vquality)
	
def video_hls(uri, output, vquality):
	if vquality == "720p":
		vquality = "1280x720"
		video = find_720_video(uri, vquality)
		fetch_encryption_key(video)
		fetch_streams(output, video)	
	else:
		video = find_best_video(uri)
		fetch_encryption_key(video)
		fetch_streams(output, video)

hls

rs3mk avatar Mar 24 '19 06:03 rs3mk

@rs3mk Thanks for your help but it doesn't work with me. After editing ultimate.py and hls.py the script still downloads in 1080p.

nigoki2 avatar Mar 24 '19 11:03 nigoki2

can you try this code https://github.com/alzamer2/Crunchyroll-XML-Decoder-py3 i re-write it to use python3

alzamer2 avatar Mar 30 '19 14:03 alzamer2