Hi Team,
Please help me to edit preset/web-hd which one use for Transcode video.
I need to add new resolution(1920x1080) in the predefined preset web-hd.
I tried to edit above preset json, but not able to do. Please help me to edit this json or share the PHP code to create new preset with all options had in web-hd preset
Hi @satheesh-kumar,
Welcome to Google Cloud Community!
To edit the preset for video transcoding and add a new resolution (1920x1080) to the existing web-hd preset, you can either directly edit the JSON file or create a new preset using PHP. For detailed information on video transcoding presets, refer to the official transcoding documentation.
Here’s how to modify the web-hd Preset:
1. Locate the Preset File: Navigate to the directory where your video transcoding software stores its presets. Common locations include:
2. Find the web-hd Preset: Look for a file named web-hd.json or web_hd.json
3. Open the JSON File: Use a text editor like Notepad++, Sublime Text, or VS Code to open the web-hd.json file.
4. Edit the Resolution: Locate the section in the JSON that defines the resolution, which may appear like this:
"video": {
"width": 1280,
"height": 720
}
And then change the values to set width to 1920 and height to 1080.
5. Save the Changes: Save the modified web-hd.json file.
Steps in creating a New Preset with PHP:
1. preset Array: Defines the configuration for your new preset.
2. name: The user-friendly name of your preset (e.g., custom_1080p).
3. video: Contains video-specific settings:
4. audio: Contains audio settings:
5. JSON Encoding: The PHP json_encode() function converts the preset array into a JSON string.
6. File Creation: The code writes the JSON string to a file (optional).
Additional Tips:
I hope the above information is helpful.