[FFmpeg-user] ffmpeg is not playing video stream from unix domain socket after first time

Aakash raghav aakash at saralweb.com
Thu Jun 13 08:38:33 EEST 2019


Hi,

I am stuck at a point where I created a script which reads data from a 
unix domain socket and write it into the other one and the data is a 
continuous video stream sent by ffmpeg.

*
*

sockets used:-

*testData* : socket in which ffmpeg is continuously sending video stream.

*testPlay : *socket from which video feed is playing via ffplay.


My problem is that if i play the video using ffplay from*testData* 
socket it plays it normally for the first time but when i close ffplay 
and play it again it shows the following error *Invalid data found when 
processing input* .


[/Possibly it is because the video headers are only included first time 
when feed starts by ffmpeg in the socket /]


Even if i specified the container format to flv in ffplay then the 
ffplay generated error is :

*[flv @ 0x7f7a54000b40] Read FLV header error, input file is not a 
standard flv format, first PreviousTagSize0 always is 0**
**[flv @ 0x7f7a54000b40] Packet mismatch 922746988 11 11**
**[flv @ 0x7f7a54000b40] Unable to seek to the next packet 0B f=0/0 **
**unix:/tmp/testPlay.sock: could not find codec parameters*


I know that the video headers are missing but don't know how to include 
them in the *testData* socket every time when the connection is 
established to it.


*ffmpeg command : *ffmpeg -i rtsp://b1.dnsdojo.com:1935/live/sys3.stream 
-an -c:v copy -f flv unix:/tmp/testData.sock

*ffplay command : *ffplay -f flv unix:/tmp/testPlay.sock

The socket script is attached in the mail.


Thanks

Akash

-------------- next part --------------
A non-text attachment was scrubbed...
Name: testScript.js
Type: application/javascript
Size: 1859 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20190613/abd94f49/attachment.js>


More information about the ffmpeg-user mailing list