0

I have a file(har file saved from web developer" that contains the base64 encoded value of multiple video*.ts files. I am interested to decode the base64 part and save as multiple ts files if the request url is a .ts file and the response encoding should be base64.

"request": {
          "bodySize": 0,
          "method": "GET",
          "url": "https://vz-73062248-092.b-cdn.net/856d96e6-97e6-4c3d-82b8-a53a8a411513/1920x1080/video1.ts",
......
.....
....
"response":{

.....
.....
"content": {
            "mimeType": "video/mp2t",
            "size": 882472,
            "encoding": "base64",
"text": "R................=="}, ----->should be decoded from this string as video1.ts
.....

The above should be saved as video1.ts , decoded from the base64 string between "text": ", till "

There are multiple entries for the ts files from 1 till 350 in the file. The file is around 500MB

Please please let me know hoe can i save as multiple ts files from the base64 decoded string from the file?

3
  • You nearly have a JSON file. Is it actually a JSON file or is it a broken segment like you show us? If it's a valid JSON file please include enough of the structure so we can use a parser such as jq to extract the data Commented Jul 19, 2022 at 21:11
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Commented Jul 21, 2022 at 18:39
  • So the file is fragments of JSON: "key" : { value } entries not contained in an object? Commented Aug 9, 2022 at 22:49

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.