murxer83 17 Posted March 2, 2023 Posted March 2, 2023 Hello, it is possible to get the original url. [ { "Protocol": "Http", "Id": "a9b2f8891720a43b67e6e694c18d126f", "Path": "http://127.0.0.1:8096/LiveTv/LiveStreamFiles/25bb73bec24648ebaa2dece594634446/stream.ts", "Type": "Default", "Container": "mpegts", "IsRemote": false, "ContainerStartTimeTicks": 125809134780, "SupportsTranscoding": true, "SupportsDirectStream": false, "SupportsDirectPlay": false, "IsInfiniteStream": true, "RequiresOpening": true, "RequiresClosing": true, "LiveStreamId": "06044cf0e6f93cdae5f285c9ecfaaeb4_01413a525b3a9622ce6fdf19f7dde354_a9b2f8891720a43b67e6e694c18d126f", "RequiresLooping": false, "SupportsProbing": false, "MediaStreams": [ { "Codec": "h264", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "ColorSpace": "bt709", "StreamStartTimeTicks": 125815734780, "TimeBase": "1/90000", "VideoRange": "SDR", "DisplayTitle": "720p H264", "NalLengthSize": "0", "IsInterlaced": false, "BitRate": 6000000, "BitDepth": 8, "RefFrames": 1, "IsDefault": false, "IsForced": false, "Height": 720, "Width": 1280, "AverageFrameRate": 50, "RealFrameRate": 50, "Profile": "High", "Type": "Video", "AspectRatio": "16:9", "Index": 1, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "PixelFormat": "yuv420p", "Level": 40, "IsAnamorphic": false }, { "Codec": "mp2", "Language": "deu", "StreamStartTimeTicks": 125809454780, "TimeBase": "1/90000", "DisplayTitle": "German MP2 stereo", "DisplayLanguage": "German", "IsInterlaced": false, "ChannelLayout": "stereo", "BitRate": 256000, "Channels": 2, "SampleRate": 48000, "IsDefault": false, "IsForced": false, "Type": "Audio", "Index": 2, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File" }, { "Codec": "mp2", "Language": "deu", "StreamStartTimeTicks": 125815214780, "TimeBase": "1/90000", "DisplayTitle": "German MP2 stereo", "DisplayLanguage": "German", "IsInterlaced": false, "ChannelLayout": "stereo", "BitRate": 256000, "Channels": 2, "SampleRate": 48000, "IsDefault": false, "IsForced": false, "Type": "Audio", "Index": 3, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File" }, { "Codec": "mp2", "Language": "deu", "StreamStartTimeTicks": 125815214780, "TimeBase": "1/90000", "DisplayTitle": "German MP2 stereo", "DisplayLanguage": "German", "IsInterlaced": false, "ChannelLayout": "stereo", "BitRate": 192000, "Channels": 2, "SampleRate": 48000, "IsDefault": false, "IsForced": false, "Type": "Audio", "Index": 4, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File" }, { "Codec": "dvb_teletext", "Language": "deu", "StreamStartTimeTicks": 125809134780, "TimeBase": "1/90000", "Extradata": "00000000: 0900", "DisplayTitle": "German (DVB_TELETEXT)", "DisplayLanguage": "German", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Height": 250, "Width": 492, "Type": "Subtitle", "Index": 5, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "SubtitleLocationType": "InternalStream" }, { "Codec": "ac3", "Language": "deu", "StreamStartTimeTicks": 125815214780, "TimeBase": "1/90000", "DisplayTitle": "German AC3 stereo", "DisplayLanguage": "German", "IsInterlaced": false, "ChannelLayout": "stereo", "BitRate": 448000, "Channels": 2, "SampleRate": 48000, "IsDefault": false, "IsForced": false, "Type": "Audio", "Index": 6, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File" }, { "Codec": "dvbsub", "Language": "deu", "StreamStartTimeTicks": 125839534780, "TimeBase": "1/90000", "DisplayTitle": "German (DVBSUB)", "DisplayLanguage": "German", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 10, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "SubtitleLocationType": "InternalStream" } ], "Formats": [], "Bitrate": 7152000, "RequiredHttpHeaders": { "User-Agent": "VLC/3.0.0-git LibVLC/3.0.0-git", "Referrer": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36" }, "DirectStreamUrl": "", "TranscodingUrl": "", "TranscodingSubProtocol": "hls", "TranscodingContainer": "m4s,ts", "ReadAtNativeFramerate": false, "DefaultAudioStreamIndex": 2 } ] "Path": "http://127.0.0.1:8096/LiveTv/LiveStreamFiles/25bb73bec24648ebaa2dece594634446/stream.ts" Here a transcoded stream is offered, but I would like to be able to query the original URL, is that possible? Greetings
Luke 42077 Posted March 2, 2023 Posted March 2, 2023 HI, no, you need to use the streaming api and then you can get a direct url. If you must hack it quick and dirty, the normal /videos/id/stream?static=true may work, but will throw an error when the original stream can't be served that way (like if it's hls for example). So the better way is to use the normal /playbackinfo api to get your stream url as per usual, and you'll get a direct url if your streaming profile calls for it and if it is supported that way. 1
murxer83 17 Posted March 3, 2023 Author Posted March 3, 2023 Thank you, when I read answer I already see my problem. I have viewed the output from the browser log and here the url is not offered. When I do this through my plugin, I get the right URL. The problem is in front of the computer. Thank you
murxer83 17 Posted March 4, 2023 Author Posted March 4, 2023 My mistake was that I always looked in the browser request. Here a post request is sent and a profile is transferred. And here only transcoded streams will return. In the plugin I use the get request and then get the desired url. So the fault was mine, because I didn't understand or overwhelmed it. I'm just a hobby programmer and learned the whole thing via google, with request and API queries I still have a hard time. Thanks for your help, now I can expand live TV in the plugin. 1 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now