Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5c7d549
Enable multi stream async generator
taoboyang Aug 13, 2025
2d7158b
Fix gpu ci env
taoboyang Aug 18, 2025
014ff77
Change headers from MD5 to evp and updated function calls
Lith-30 Jan 13, 2026
88394a8
Updated function calls and variable names
Lith-30 Jan 13, 2026
f547151
dynamic allocation of EVP_MD_CTX and change macro name for file check
Lith-30 Jan 14, 2026
0628815
Fixed errors with EVP function call inputs
Lith-30 Jan 14, 2026
c5f9973
prototype implementation
jonahmvp Feb 11, 2026
8637f88
cleaner implementation and logging, passes test_transcode test
jonahmvp Feb 12, 2026
b03198b
add disable_seek and simplify logic
jonahmvp Feb 18, 2026
5914682
fix incorrect frame count
jonahmvp Feb 20, 2026
0fbd1e3
bug fixes and benchmark suite
jonahmvp Feb 20, 2026
31f6c58
performance aligned with decord
jonahmvp Feb 24, 2026
73092d4
align index-based sampling with decord
jonahmvp Feb 25, 2026
0f69b68
add vfr video to unit test
jonahmvp Feb 25, 2026
a1ad423
fix disable_cuda in build.sh
jonahmvp Feb 25, 2026
05d594e
fix ci test failures
jonahmvp Mar 3, 2026
8de9a53
add some tolerance in perf constraint
jonahmvp Mar 3, 2026
f64e07d
add psutil cpu utilization metrics
jonahmvp Mar 16, 2026
967cde0
CI windows ffmpeg 4.4 build from GyanD
jonahmvp Mar 17, 2026
591ec70
copy_props copy color params
HuHeng Jul 1, 2025
945de21
should not copy_props in reformat process
HuHeng Jul 2, 2025
3cca5f8
feat: Add flush api on sync module
HuHeng Sep 4, 2025
44f2318
set inputFrmOrder
ganwenyao123 Aug 28, 2025
4859a00
cmake: compatiable with openssl version
HuHeng Mar 18, 2026
2034f2a
Increment version number to 0.2.1
jonahmvp Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .codebase/pipelines/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- apt-get update
- apt-get install -y protobuf-compiler libgflags-dev libdw-dev libgoogle-glog-dev
- pip3 install --upgrade pip
- pip3 install timeout_decorator onnxruntime==1.18.0 numpy==1.26.4 requests opencv-python librosa
- pip3 install timeout_decorator onnxruntime==1.18.0 numpy==1.26.4 requests opencv-python librosa decord psutil
- echo "build finished"
- uses: actions/setup-proxy
- name: run_test
Expand Down Expand Up @@ -63,6 +63,7 @@ jobs:
- (cd output/test/run_by_config && python3 test_run_by_config.py)
- (cd output/test/server && python3 test_server.py)
- (cd output/test/c_module && python3 test_video_c_module.py)
- (cd output/test/decord_decoder && python3 test_decord_decoder.py)
- (cd output/test/dynamical_graph && python3 dynamical_graph.py)
- (cd output/test/av_log_buffer && python3 test_av_log_buffer.py)
- (cd output/test/push_data_into_graph && python3 test_push_data.py)
Expand Down Expand Up @@ -171,10 +172,10 @@ jobs:
eval "$(./win_env/vcvarsall.sh x64)"
export INCLUDE="${INCLUDE};C:\\msys64\\usr\\local\\include"
pacman -S unzip ca-certificates --noconfirm
wget https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2024-03-31-17-28/ffmpeg-n4.4.4-94-g5d07afd482-win64-gpl-shared-4.4.zip --no-check-certificate
unzip ffmpeg-n4.4.4-94-g5d07afd482-win64-gpl-shared-4.4.zip
wget https://github.com/GyanD/codexffmpeg/releases/download/4.4.1/ffmpeg-4.4.1-full_build.zip --no-check-certificate
unzip ffmpeg-4.4.1-full_build.zip
mkdir -p /usr/local
cp -r ffmpeg-n4.4.4-94-g5d07afd482-win64-gpl-shared-4.4/* /usr/local/
cp -r ffmpeg-4.4.1-full_build/* /usr/local/
./build_win_lite.sh --msvc=2019 --preset=x64-Release bmf_ffmpeg
cmake --build build_win_lite/x64-Release --config Release --target ALL_BUILD
cmake --build build_win_lite/x64-Release --config Release --target ALL_BUILD
Expand Down Expand Up @@ -251,6 +252,8 @@ jobs:
./Miniconda3-latest-Linux-x86_64.sh -b
export PATH=\"/root/miniconda3/bin:\$PATH\"
source /root/miniconda3/bin/activate
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
conda create -n myenv python=3.12 numpy=2.0 -y
conda init
conda activate myenv
Expand Down
22 changes: 22 additions & 0 deletions bmf/builder/bmf_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,28 @@ def start(self, stream, is_sub_graph=False):

self.exec_graph_.close()

def start_multiple_streams(self, streams, is_sub_graph=False):
self.output_streams_.extend(streams)

# create a edge connected with stream and graph output stream
for idx, stream in enumerate(streams):
graph_output_stream = BmfStream(stream.get_name(), None, idx)
edge = BmfEdge(stream, graph_output_stream)
stream.get_node().add_outgoing_edge(edge)
self.mode = GraphMode.GENERATOR

# parse graph config
self.graph_config_, self.pre_module = self.generate_graph_config()

# for sub-graph, don't start executing
if is_sub_graph:
return

# create and run graph
graph_config_str = self.graph_config_.dump()
self.exec_graph_ = engine.Graph(graph_config_str, False, True)
self.exec_graph_.start()

## @ingroup pyAPI
## @ingroup grphClass
###@{
Expand Down
3 changes: 3 additions & 0 deletions bmf/builder/bmf_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def close(self):
def dynamic_reset(self, opt_reset=None):
self.mod.dynamic_reset(opt_reset)

def flush(self):
self.mod.flush()

## @ingroup pyAPI
## @ingroup syncMd
###@{
Expand Down
23 changes: 22 additions & 1 deletion bmf/c_modules/include/ffmpeg_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ class CFFDecoder : public Module {
int64_t last_ts_;
int64_t ts_offset_;
std::vector<double> durations_;
double filter_fps_ = 0;
int filter_crop_x_ = 0;
int filter_crop_y_ = 0;
int filter_crop_w_ = 0;
int filter_crop_h_ = 0;
int filter_scale_w_ = 0;
int filter_scale_h_ = 0;
int idx_dur_;
bool dur_end_[2];
AVRational video_time_base_;
Expand Down Expand Up @@ -141,7 +148,19 @@ class CFFDecoder : public Module {
std::mutex process_mutex_;
std::thread exec_thread_;
Task task_;
bool disable_seek_ = false;
size_t num_seeks_ = 0;
size_t num_sent_before_target_ = 0;
size_t num_recv_before_target_ = 0;
double extract_frames_fps_ = 0;
int extract_frames_n_frames_ = 0;
std::vector<int> extract_frames_frame_indexes_ = {};
std::vector<int64_t> target_frames_pts_ = {};
size_t target_frames_index_ = 0;
int64_t current_target_pts_ = 0;
int64_t last_keyframe_pts_ = 0;
int64_t last_keyframe_duration_pts_ = 0;
bool seek_decode_mode_enabled_ = false;
std::string extract_frames_device_;
std::shared_ptr<VideoSync> video_sync_ = NULL;
bool start_decode_flag_ = false;
Expand Down Expand Up @@ -199,6 +218,8 @@ class CFFDecoder : public Module {
int process_task_output_packet(int index, Packet &packet);
int64_t get_start_time();
int extract_frames(AVFrame *frame, std::vector<AVFrame *> &output_frames);
void init_target_frames(AVStream *vid_stream);
int seek_start(bool force = false);

#ifdef BMF_USE_MEDIACODEC
int init_android_vm();
Expand Down Expand Up @@ -266,4 +287,4 @@ class CFFDecoder : public Module {
* @}
*/

#endif // BMF_FF_DECODER_H
#endif // BMF_FF_DECODER_H
Loading
Loading