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

Restreaming RTMP to RTMP with captions #67

Open
ramiel opened this issue Feb 7, 2023 · 1 comment
Open

Restreaming RTMP to RTMP with captions #67

ramiel opened this issue Feb 7, 2023 · 1 comment

Comments

@ramiel
Copy link

ramiel commented Feb 7, 2023

This is not an issue, I'm just looking for help. Sorry if this is not the correct channel. I'm trying to get an input video coming from an RTMP endpoint and restreaming to another after adding srt file. I'm using a command like this one

ffmpeg -i rtmp://localhost:1935/live/test -codec copy -f flv - | ./flv+srt - ../../sub.srt - | ffmpeg -i - -codec copy -y -f flv rtmp://a.rtmp.youtube.com/live2/aabbcc

The restreaming works fine if I omit the flv+srt part, but it fails if I use the command above. The RTMP never receives the stream and this is printed in console.

Loaded new SRT at time 0.000000=       1kB time=00:00:00.00 bitrate=N/A speed=   0x    
T: 0.07: [CAPTIONS CLEARED]
T: 5.40 (10.00s):41 q=-1.0 size=    1582kB time=00:00:04.86 bitrate=2665.4kbits/s speed=1.36x    
This is an example of
a subtitle.

T: 15.53: [CAPTIONS CLEARED]ize=    4917kB time=00:00:15.08 bitrate=2670.7kbits/s speed=1.09x    
[flv @ 0x7face391d140] Packet mismatch 216678557 6386798 6386798ate=2668.7kbits/s speed=1.07x    
T: 20.40 (99.00s):2 q=-1.0 size=    6607kB time=00:00:20.18 bitrate=2682.2kbits/s speed=1.07x    
This is an example of
a subtitle - 2nd subtitle.
[flv @ 0x7face391d140] Packet mismatch -527437488 5557771 11944569e=2697.8kbits/s speed=1.04x    
[NULL @ 0x7facc2f05f40] missing picture in access unit with size 10178
[extract_extradata @ 0x7facd3006680] No start code is found.
pipe:: could not find codec parameters
Input #0, flv, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: aac, 44100 Hz, stereo
  Stream #0:1: Video: h264, none, 1k tbn
[flv @ 0x7facd3006800] dimensions not setB time=00:00:35.98 bitrate=2694.2kbits/s speed=1.04x    
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 -- 
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
    Last message repeated 1 times
av_interleaved_write_frame(): Broken pipe
[flv @ 0x7fcda1304c40] Failed to update header with correct duration.
[flv @ 0x7fcda1304c40] Failed to update header with correct filesize.
Error writing trailer of pipe:: Broken pipe
frame= 1083 fps= 31 q=-1.0 Lsize=   11837kB time=00:00:36.03 bitrate=2691.3kbits/s speed=1.03x    
video:11093kB audio:704kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.343468%
Error closing file pipe:: Broken pipe
Conversion failed!

Do you have any idea about what the cause can be?

@ramiel
Copy link
Author

ramiel commented Feb 7, 2023

I'm realising this is maybe a duplicate of #55 but that issue has no answer yet

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