Skip to content
New issue

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

media_files_src_bin uses same source-id for all videos in a folder #604

Closed
Y-T-G opened this issue Jan 7, 2024 · 6 comments · Fixed by #611
Closed

media_files_src_bin uses same source-id for all videos in a folder #604

Y-T-G opened this issue Jan 7, 2024 · 6 comments · Fixed by #611
Assignees
Labels
bug Something isn't working

Comments

@Y-T-G
Copy link
Contributor

Y-T-G commented Jan 7, 2024

It would be better if media_files_src_bin dynamically changed source_id for each video or image in a folder. It makes it easier to save them as different files using video file sink adapter which saves based on source_id.

@bwsw
Copy link
Contributor

bwsw commented Jan 7, 2024

Hello, the problem is not related to the source adapter. It does not change source id because it allows processing chunked files as a continuous object.

The problem is related to the sink adapter mostly, but we believe sinks are purpose built. So because the sink receives the information about the source files in meta, it can handle it properly. Just do not forget enable EOS-sending.

Another trivial option is to use a shell script around the source:

ls | while read f
do
  run source source-id=$f
done

@Y-T-G
Copy link
Contributor Author

Y-T-G commented Jan 7, 2024

@bwsw The video files adapter sink creates a .mov video file with the source-id as the name. So when processing another video from the same folder, it just overwrites the previous video with EOS. So how do I prevent that?

@bwsw bwsw added the maybebug label Jan 7, 2024
@bwsw
Copy link
Contributor

bwsw commented Jan 7, 2024

@Y-T-G it may be a bug.

@tomskikh
Copy link
Collaborator

tomskikh commented Jan 9, 2024

There's a bug: when CHUNK_SIZE=0 the sink adapter creates only one file video.mp4 and overwrite it after each EOS.

@bwsw
Copy link
Contributor

bwsw commented Jan 9, 2024

@Y-T-G you can set CHUNK_SIZE to a large value and try again. We consider the report as a bug and fix.

@bwsw bwsw added bug Something isn't working and removed maybebug labels Jan 9, 2024
@bwsw
Copy link
Contributor

bwsw commented Jan 12, 2024

@tomskikh let us fix that please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants