We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.1.20+ae1948925
Microsoft Windows NT 10.0.22631.0 x64
https://github.com/axiomatic-systems/Bento4
import { $ } from "bun"; async function getPssh(file: string) { // const mp4dump = Bun.spawn([ // "./mp4dump.exe", // "--verbosity", // "3", // "--format", // "json", // file, // ]); // await mp4dump.exited; // if (mp4dump.exitCode !== 0) { // throw new Error(`mp4dump process exited with code ${mp4dump.exitCode}`); // } const jsonInfo = await $`./mp4dump.exe --verbosity 3 --format json ${file}`.json(); console.log(jsonInfo); // const jsonInfo = await new Response(mp4dump.stdout).json(); let psshData = ""; for (const temp of jsonInfo) { if (temp["name"] === "moov") { for (const child of temp["children"]) { if ( "system_id" in child && child["system_id"] === "[ed ef 8b a9 79 d6 4a ce a3 c8 27 dc d5 1d 21 ed]" ) { psshData = child["data"]; break; } } break; } } psshData = psshData.replace("[", "").replace("]", "").replace(/\s+/g, ""); return Buffer.from(psshData, "hex").toString("base64"); } const filePath = process.argv[2]; getPssh(filePath) .then((pssh) => console.log(pssh)) .catch((error) => console.error(error));
There should be an output
Nothing.
Is the program interrupted because the output is too large?
The text was updated successfully, but these errors were encountered:
what if you do
import { $ } from "bun"; async function getPssh(file: string) { // const mp4dump = Bun.spawn([ // "./mp4dump.exe", // "--verbosity", // "3", // "--format", // "json", // file, // ]); // await mp4dump.exited; // if (mp4dump.exitCode !== 0) { // throw new Error(`mp4dump process exited with code ${mp4dump.exitCode}`); // } const jsonInfo = await $`./mp4dump.exe --verbosity 3 --format json ${file}`.json(); console.log(jsonInfo); // const jsonInfo = await new Response(mp4dump.stdout).json(); let psshData = ""; for (const temp of jsonInfo) { if (temp["name"] === "moov") { for (const child of temp["children"]) { if ( "system_id" in child && child["system_id"] === "[ed ef 8b a9 79 d6 4a ce a3 c8 27 dc d5 1d 21 ed]" ) { psshData = child["data"]; break; } } break; } } psshData = psshData.replace("[", "").replace("]", "").replace(/\s+/g, ""); return Buffer.from(psshData, "hex").toString("base64"); } const filePath = process.argv[2]; await getPssh(filePath)
Sorry, something went wrong.
@Jarred-Sumner This works, but why, I think it should be the same from the syntax side of the equation
Fixed by #11950
Successfully merging a pull request may close this issue.
What version of Bun is running?
1.1.20+ae1948925
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
https://github.com/axiomatic-systems/Bento4
What is the expected behavior?
There should be an output
What do you see instead?
Nothing.
![image](https://private-user-images.githubusercontent.com/32427677/350673559-efd78288-619f-4218-8139-38461d706e37.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU2MDQwMjIsIm5iZiI6MTcyNTYwMzcyMiwicGF0aCI6Ii8zMjQyNzY3Ny8zNTA2NzM1NTktZWZkNzgyODgtNjE5Zi00MjE4LTgxMzktMzg0NjFkNzA2ZTM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA2MjIwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwM2ZhMTI1MWZiNmFhYjViNmNmYjE4NDgzYmZjOTFlY2U0N2FiNTU3OTdhZGZkZWIzNzU1NWMwYzI1ODgwNDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.OkAmkeq_lUn1BfItjfmFyGaEvZDjWgnZWtszNfeIEg4)
Additional information
Is the program interrupted because the output is too large?
The text was updated successfully, but these errors were encountered: