Comments (7)
Hi! To add the necessary context to the ts segments, you should use audiowmark hls-prepare
as documented here:
https://github.com/swesterfeld/audiowmark/#preparing-hls-segments
from audiowmark.
Well if it really is just one .ts file that is large, you probably don't need all the extra stuff that the hls-prepare
and hls-add
commands do to make it work for a bunch of smaller segments. I think one way to solve your problem would be
- extracting / decompressing the audio from the .ts to a format that
audiowmark
can handle (such as wav) - watermarking the wav file
- reencoding the watermarked wav file to .ts
It should be possible to do steps 1 and 3 using ffmpeg
. If your .ts contains audio and video data, you might want to look at https://github.com/swesterfeld/audiowmark/blob/master/src/videowmark for some inspiration how to split/merge stuff. If its just audio data, it should be even easier.
from audiowmark.
@swesterfeld Thanks about your response.
My use case is, getting a ts file from my stream server then put a string in video or audio of that as a watermark, finally return it to the stream server to serve to the pleyer, How can I use this package for this use case?
Thanks for your help
from audiowmark.
This sounds like for your use case you would like to watermark a single .ts file without any context whatsoever. Currently
audiowmark
doesn't support anything like this. The reason is that often a .ts file is fairly short, probably even shorter than a single watermark block. So to create a watermark we can later detect, the watermark from the first .ts must continue in the second .ts and so forth.
Currently for audiowmark hls-prepare
we assume that you have all the content you want to watermark before streaming starts. You prepare all .ts segments adding meta info to each .ts. Later to deliver a single .ts to the user, audiowmark
will use that meta info (like full_flac_mem
) to produce a watemarked .ts that perfectly fits to the .ts segments before the current one and after the current one.
from audiowmark.
My ts file is not small and it can include 128 kbit message as a watermark, so is it possible to change your code for my case?
If yes, how I can do that?
Thanks
from audiowmark.
Yes, It's a good way to do my case.
The problem is response time, because I want to do that real time and I have to do that below 0.5 second, so I have to make my way as much as optimism.
Thanks about your help and this good package.
from audiowmark.
To minimize response time, usually it is best to do the watermarking in a pipe, so that the first watermarked bytes can already be sent while the rest of the stream is still being processed. For mp3 I've described how to do decoding, watermarking and reencoding using a pipe here:
https://groups.google.com/g/audiowmark/c/1PPrvwOHhSo
Of course if you have a huge file (like 30 minutes) and the user seeks to a position late in the file, this would still introduce a delay, so in this case splitting into multiple smaller files (using HLS like audiowmark supports it) is the better solution.
from audiowmark.
Related Issues (20)
- How do I extract the watermark from the ts file?
- sprintf is deprecated on macOS 13 HOT 1
- fails to compile with clang15 HOT 2
- hello please HOT 1
- Zita-resampler issue HOT 1
- zita-resampler not found after compiling from source HOT 3
- autoconf issue: AC_LIB_HAVE_LINKFLAGS HOT 1
- syncfinder
- How to find synchronization bits HOT 1
- Build for Windows HOT 18
- Audible noise in watermarked audio even with --strength 5, also not extractable even at --strength 100 HOT 11
- Build for Mac OSX High Sierra HOT 6
- Using 48kHz files
- Supported formats?
- --with-ffmpeg: deprecation warnings with libavcodec 7:5.1.4-0+deb12u1 HOT 1
- Enhancement Request: Preserve MP3 Metadata When Watermarking HOT 1
- Preserving Video Metadata When Watermarking
- Hope to support mingw32
- weird results with hls when original audio source is mono HOT 3
- Video Watermarking: support for multiple audio tracks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audiowmark.