Click here to Skip to main content
15,883,623 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I would like to know is there any possibility to send video file using TCP/IP sockets, if so can you share your idea on it.
Posted
Updated 10-Feb-15 18:58pm
Comments
Mehdi Gholam 10-Feb-15 0:57am    
Yes you can, if it you couldn't then the internet would not exist.
venkat28vk 10-Feb-15 1:01am    
could you share any links or some kind of references
Mehdi Gholam 10-Feb-15 1:07am    
Google : c ubuntu send files tcp
Richard MacCutchan 10-Feb-15 4:54am    
A video file is the same as any other file: a stream of bytes. So sending it via TCP/IP is exactly the same as sending a text file.
venkat28vk 10-Feb-15 6:15am    
ok... do i need to serialize the data into streams for the required output?

1 solution

The problems you had by simply packetizing and sendind data are related to the dispatch time and network latency that are not relevanto for static data transmission as files.
You may want have a look to RTP (real time protocol) for transmission of real time data as audio and video.
This page from Gary Mc Gath give some starting points about some diffused protocols.
 
Share this answer
 
v2
Comments
venkat28vk 8-Jun-15 5:55am    
Hi Frank in the latest code i have posted

printf("Enter Filename:\n");
gets(filename);
filename2 = open("/home/sosdt009/Desktop", && filename);
printf("Filename2: %s \n", filename2);
gets(a);
text = fopen(filename2, "w");

I have edited all the changes as per you said, but there are two errors caused while running the program

1)error: expected expression before ‘)’ token
for(i=0; i<max_path>)
2) error: variable-sized object may not be initialized
char FullFilename[MAX_PATH] = "/home/sosdt009/Desktop";

i have tried by various means ,but i could not solve this.How to resolve this issue.
Frankie-C 8-Jun-15 6:38am    
Under linux use PATH_MAX instead of MAX_PATH.
In the for loop I thing that is missing the ++ after the i:
for (i=0; some condition; i++)
venkat28vk 8-Jun-15 7:12am    
can i have the source code you have given early , because the question for the above code is closed.
venkat28vk 8-Jun-15 7:28am    
I have resolved the first error by assigning a condition. Only the second error is left out.
Frankie-C 8-Jun-15 7:35am    
I don't remember the code.
Something like this:
char FullPath[PATH_MAX] = "/home/sosdt009/Desktop/";
char filename2[PATH_MAX];
printf("Enter Filename:\n");
scanf("%s%*c", FullPath+strlen(FullPath));
FILE *fp = fopen(FullPath, "r");
fgets(filename2, PATH_MAX, fp);
int i;
for (int i=0; filename2[i]; i++)
if (filename2[i] == '\n')
{
filename2[i] = '\0';
break;
}
printf("Filename2: %s \n", filename2);
getchar();
FILE *text = fopen(filename2, "w");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900