mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-15 13:35:30 +00:00
sendto doesn't seem to be sending #59
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @slifty on GitHub (Jun 24, 2015).
First: Awesome tool, you guys are awesome.
Second: I'm pulling captions from a UDP stream and I would like to send them to a TCP server.
In another shell, I've set up a netcat listening to 9500 to test this out:
When I run these two commands, the output is as follows:
However, it seems to be "connecting" since when I stop the nc early, it shows:
Note, I'm building something to make it easy to broadcast the captions extracted using ccextractor across a websocket API. I will be sure to update this issue when I figure out what's going on.
Worth noting that when I send the output to stdout with a -stdout flag (and removing sendto) I am seeing captions, so the UDP extraction portion is functioning as expected.
@slifty commented on GitHub (Jun 24, 2015):
All right -- I dug in and it looks like sendto is limited in scope and I misunderstood its purpose.
I'll document my findings here for the next person who has questions:
I'm likely going to need to fork ccextractor and modify the sendto functionality to send whatever the -out format is, since I don't want to have to write a binary transcript format parser in nodejs!
I'll leave this issue open for the next day or so in case a core contributor comes around and wants to weigh in. Otherwise I'll be closing this issue since sendto is functioning as coded.
@canihavesomecoffee commented on GitHub (Jun 25, 2015):
This was added as part of last years GSoC by @rkuchumov, where the goal was to be able to capture the raw packets on one instance and decode it on another. I'm not sure what his plans are for this summer, but maybe he can help you out :)
On a sidenote, with a bit of luck it might be added in the near future (@kisselef seems to be working on something similar:
bd050f6505).@slifty commented on GitHub (Jun 25, 2015):
Thanks @wforums for the context! That makes complete sense; @kisselef let me know if there is any help I can provide, I don't want to redouble your effort. One thought on the referenced commit is that I wonder if there is a way to make -sendto do it all, rather than having two somewhat similar flags.
The use case I'm looking to support is to be able to specify a host/port pair to receive whatever output is specified (instead of a file or stdout). Maybe this would be something like -netout (or a modification of -o to take in network paths somehow?)
@rkuchumov commented on GitHub (Jun 25, 2015):
-tcp and -sendto use a protocol which goal is to send captions to the repository. This protocol supports a passwords and some additional information. That's why there are confirmation bytes. In the end, it sends data in BIN format which is decoded at the server side to TTXT, SRT, ...
If I understood you correctly, you want to send extracted cc data (in txt, srt) to a server, don't you? why not just:
nc -l -p 2048andccextractor file -stdout -quiet -out=txt | nc 127.0.0.1 2048?@slifty commented on GitHub (Jun 25, 2015):
@rkuchumov That's exactly what I'll do -- I just got sucked down a rabbit hole and didn't think beyond ccextractor. Thank you!