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

Round-tripping MPEG-TS not working. #59

Open
gliese1337 opened this issue Nov 14, 2020 · 0 comments
Open

Round-tripping MPEG-TS not working. #59

gliese1337 opened this issue Nov 14, 2020 · 0 comments

Comments

@gliese1337
Copy link

Before I do anything more complicated, I'm trying to just demux and decode an MPEG-TS file, and then re-encode and remux to get an equivalent file back out, using fs.createReadStream() for input and a PassThrough stream for output. (The end goal is to read from a network socket and write to another socket, with no file system involvement.)

My test code is here: https://gist.github.com/gliese1337/3e123764fec1e8792094e082a258d798

It creates a demuxer and a remuxer, creates an output stream for each input stream, then just loops over packets, decodes them, re-encodes them, and writes them back out to the remuxer.

Rather than actually producing an output file, through, I just get the following console output:

{ INIT_IN: 'INIT_OUTPUT' }
{ INIT_IN: 'INIT_OUTPUT' }
[aac @ 0000025ed8a2d300] The encoder timebase is not set.
[NULL @ 0000025ed8a2d300] No codec provided to avcodec_open2()
[NULL @ 0000025ed8a2d300] No codec provided to avcodec_open2()
[NULL @ 0000025ed8a2d300] No codec provided to avcodec_open2()
[libx264 @ 0000025ed8838100] The encoder timebase is not set.
[NULL @ 0000025ed8a2d300] No codec provided to avcodec_open2()
[NULL @ 0000025ed8838100] No codec provided to avcodec_open2()
{ a few hundred similar lines }
[NULL @ 0000025ed8838100] No codec provided to avcodec_open2()
[NULL @ 0000025ed8838100] No codec provided to avcodec_open2()
Flushing
[NULL @ 0000025ed8838100] No codec provided to avcodec_open2()
[NULL @ 0000025ed8838100] No codec provided to avcodec_open2()

I have checked that the input streams do have a timebase set.

Manually setting the output stream parameters doesn't fix it.

Any idea what I'm doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant