{"id":13613254,"url":"https://github.com/sunrise2575/AutoAVS","last_synced_at":"2025-04-13T15:32:53.915Z","repository":{"id":46005654,"uuid":"172703441","full_name":"sunrise2575/AutoAVS","owner":"sunrise2575","description":" Automated Audio, Video, Subtitle Tool (ffmpeg 벌크 인코딩 툴)","archived":true,"fork":false,"pushed_at":"2022-06-20T07:14:40.000Z","size":6608,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-08-02T20:45:19.452Z","etag":null,"topics":["audio","bulk","encoding","ffmpeg","golang","h265-hevc","opus","transcoding","video","vp9"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunrise2575.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-26T12:01:57.000Z","updated_at":"2023-08-01T14:10:52.000Z","dependencies_parsed_at":"2022-08-25T08:52:50.394Z","dependency_job_id":null,"html_url":"https://github.com/sunrise2575/AutoAVS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunrise2575%2FAutoAVS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunrise2575%2FAutoAVS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunrise2575%2FAutoAVS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunrise2575%2FAutoAVS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunrise2575","download_url":"https://codeload.github.com/sunrise2575/AutoAVS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223592517,"owners_count":17170503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","bulk","encoding","ffmpeg","golang","h265-hevc","opus","transcoding","video","vp9"],"created_at":"2024-08-01T20:00:42.745Z","updated_at":"2024-11-07T21:30:52.938Z","avatar_url":"https://github.com/sunrise2575.png","language":"Go","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"This repository is no longer maintained.\n\nUse https://github.com/sunrise2575/dist-ffmpeg instead. Thanks.\n\n# AutoAVS\n\nThe automated audio, video, subtitle tool. Currently audio and video is supported.\n\n## When to use this program?\n\n- Transcode hundreds of video/audio file **seamlessly** in a computer as the manner of **bulk processing**\n\n  - Just hit Enter button, and your computer can't be idle before finishing jobs\n\n- Select single stream from multiple streams **automatically**, transcode/copy each stream, and merge into single file\n\n- Supports **user query** for general usage conditions (note: `query_*.json`)\n\n  - movie, drama, anime, music, ... whatever you want to transcode\n\n## Requirements\n\n### Basic requirements\n\n- golang (for program compile)\n\n- `ffmpeg`, `ffprobe`\n\n  - Note: I developed and tested in `ffmpeg 3.4.8-0ubuntu0.2 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)` version\n\n- (Optional) Linux\n\n  - I haven't tested on Windows environment, but if you replace `ghw.PCI` package to another way, you can utilize my program.\n\n### (Optional, but recommended) requirements for using GPU\n\n- This program can utilize `ffmpeg`'s NVENC support, so you can use your NVIDIA GPU for transcoding\n\n  - You can see the list of NVENC devices here: https://developer.nvidia.com/video-encode-decode-gpu-support-matrix\n\n    - You can see that older GPUs can't support much codecs.\n\n  - This program doesn't use NVDEC for supporting various codecs without errors, i.e. decode on CPU → encode on GPU)\n\n    - Note: NVDEC supports few codecs like H264, HEVC, VP8, VP9, AV1, ...\n\n- NVIDIA graphics driver (you should see the result of `nvidia-smi` command)\n\n- NVIDIA **NVENC limitation unlock** patch: https://github.com/keylase/nvidia-patch\n\n  - That website's `Max # of concurrent sessions` is a kind of NVIDIA's fraud. It is implemented as GPU driver, so it is a software lock.\n\n  - GPU can have capability to running multiple encoding/decoding session over this software limit. This limit can be unlocked by this patch\n\n  - If you can't/don't patch, you can't run multiple session **even you have multiple GPUs**\n\n## How to use\n\n1. Write down the query in `*.json` file. Your all video/audio files under the selected directory will be processed by this query. The default `query_*.json` files are included in this package. The query is designed like:\n\n    ```\n    {\n        // \"input\" section\n        \"input\": {\n            // the program scans following files\n            \"extension\": [\"mp3\", \"mkv\", \"mp4\", ...]\n        },\n\n        // \"output\" section\n        \"output\": {\n            \"stream\": [\n              // \"stream\" is an array, and the order decides output media stream\n              //   For example,\n              //     \"stream\": input query = [{\"codec_type\":\"audio\", ...}, {\"codec_type\":\"video\", ...}]\n              //       -\u003e file's output stream order = [\"audio\", \"video\"]\n              {\n                    // \"codec_type\" is \"video\", \"audio\", and \"subtitle\"\n                    \"codec_type\": \"video\",\n                    // This example means that:\n                    //   The 1st stream will be video\n\n                    // You can omit \"select_prefer\" and \"select_priority\"\n                    // Which means that you choose 0-th video stream whatever it is\n\n                    // You can write \"copy_if\" here\n                    \"copy_if\": {\n                        // in this section, you can write regex JSON compare query\n                        \"codec_name\": \"^(hevc)$\", \n                        \"pix_fmt\": \"^(yuv420p)$\"\n                    },\n\n                    // This stream's example section means that:\n                    //   If \"codec_name\" is \"hevc\"\n                    //      and \"pix_fmt\" is \"yuv420p\",\n                    //      then the program just copies this stream.\n                    //   Otherwise this stream should be transcoded\n\n                    // ffmpeg transcoding parameter\n                    \"ffmpeg_parameter\": {\n                        \"c\": \"hevc_nvenc\",\n                        \"pix_fmt\": \"yuv420p\",\n                        \"profile\": \"main\",\n                        \"level\": \"auto\",\n                        \"preset\": \"hq\",\n                        \"qp\": \"25\"\n                        // This example section means that:\n                        //   ffmpeg ... -c:v hevc_nvenc -pix_fmt:v yuv420p -profile:v main -level:v auto -preset:v hq -qp:v 25 ...\n                    },\n\n\n                    \"temp_file_extension\": \"mkv\" // temp file extension before merging\n                },\n                {\n                    // \"codec_type\" is \"video\", \"audio\", and \"subtitle\"\n                    \"codec_type\": \"audio\",\n                    // This example means that:\n                    //   The 2nd stream will be audio\n\n\n                    \"select_prefer\": {\n                        // in this section, you can write regex JSON compare query\n                        // regex is combined golang-optional regex and perl regex\n\n                        \"channels\": 2,\n                        \"tags\": {\n                            \"language\": \"^(eng|und)$\",\n                            \"title\": \"(?i)^(?!.*comment).*$\"\n                            // note: (?i) is golang-style regex, means insensitive\n                            //   for additional options like global, multiline, ... you should use golang-style regex\n                            // note: ^(?!.*comment).*$ is perl-style regex (i.e. lookahead)\n                            //   for core regex, you should use perl-style regex\n                        }\n                    },\n\n                    // \"select_priority\" is\n                    \"select_priority\": [\"tags.title\", \"tags.language\"], // select_prioritty\n\n                    // This stream's example section means that:\n                    //   If \"channels\" is 2\n                    //     and \"language\" is \"eng\" or \"und\"\n                    //     and \"title\" is not including \"comment\", the program prefers to choose.\n                    //   Especially the program gives most priority for \"tags.title\",\n                    //     second priority for \"tags.language\"\n                    //     and other JSON fields are equally same priority\n                    //   Basically, choose only 1 stream for this \"codec_type\" from entire audio stream candidates,\n                    //     therefore the highest ranked stream is selected\n\n                    // you can omit \"copy_if\" section\n                    // Which means that that:\n                    //   All kinds of audio stream should be transcoded\n\n                    // ffmpeg transcoding parameter\n                    \"ffmpeg_parameter\": {\n                        \"c\": \"libopus\"\n                        // What this example section means is that:\n                        //   ffmpeg ... -c:a libopus ...\n                    },\n\n                    \"temp_file_extension\": \"mka\" // temp file extension before merging\n                }\n            ],\n\n            // final output extension\n            //   If the number of requested stream in query is just one,\n            //     and its \"temp_file_extension\" and this \"extension\" is same,\n            //     then the merging process is skipped, because its behavior is just useless file copying.\n            \"extension\": \"mp4\"\n        }\n    }\n    ```\n\n    Note: `\"codec_type\"`, `\"select_prefer\"` and `\"copy_if\"` compares its value to the result of following command:\n\n    ```bash\n      ffprobe -v quiet -print_format json -show_streams \u003cfilename\u003e\n    ```\n\n\n2. Run the program by following command, sit back and watch\n\n    (Note: This program recursively found video files under the root folder designated by `-root` flag.)\n    \n    ```bash\n    go run . -config \u003cquery_JSON_file\u003e -root \u003cyour_video_path\u003e -worker \u003cworkers\u003e\n    ```\n\n## Note\n\n- This program has been developed for my personal usage. Please be generous for little failure. (But I personally think the program is quite reliable.) You can submit some pull request for fixing bugs and helping me.\n\n- Also, you can fork my repostory, but please notify me when not using this program in personal way (e.g. commercial use, integrate to open source module, ...).\n\n## TODO\n\n- Subtitle extraction and conversion (SRT, SAMI, VTT, ...)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunrise2575%2FAutoAVS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunrise2575%2FAutoAVS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunrise2575%2FAutoAVS/lists"}