Opened 6 years ago

Closed 9 days ago

#928 closed defect (invalid)

ffmpeg libdc1394 camera live mpeg streaming stops a specific frame number

Reported by: Zax Owned by:
Priority: minor Component: undetermined
Version: unspecified Keywords: libdc1394
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


I was trying to stream live video from a dc1394 camera by using ffmpeg and ffserver. I was successful in streaming the video; however, the stream freezes/stops/hangs after a specific time (00:02:23.06) or frame (2146).

I have tried to debug the problem and noticed that after the 2146th frame "vdelta" in "do_video_out" at "ffmpeg.c" goes negative. Moreover, each frame increment causes it to decrement further. The reason vdelta goes negative is "ost->sync_ist->pts" of input variable "const OutputStream? *ost" in do_video_out changes sign.

So, I have made some modifications in "do_video_out" and "get_sync_ipts" and temporarily solved the negative vdelta problem. You can find the changed functions in the attachment.

Though I have solved my problem, the bug ("ost->sync_ist->pts" goes negative) still exits. I hope my comments are helpful.

Here is my ffmpeg commands and ffserver conf file.

# ffmpeg -loglevel debug -v verbose -f libdc1394 -i hw:0,0 -vcodec mpeg4 -b:v 10000k -bufsize 150000k -r 5
# ffserver -loglevel debug -f ffs.conf
Port 8090 
# bind to all IPs aliased or not 
# max number of simultaneous clients 
MaxClients 4 
# max bandwidth per-client (kb/s) 
MaxBandwidth 10000000 s
# Suppress that if you want to launch ffserver as a daemon. 

<Feed feed1.ffm> 
	File /tmp/feed1.ffm 
	FileMaxSize  2000M
	ACL allow 

# mpeg
<Stream test.mpg> 
	# the source feed 
	Feed feed1.ffm 

	# the output stream format - FLV = FLash Video 
	Format 	mpegts
	VideoCodec mpeg4

	AVOptionVideo 	maxrate 1000000k
	AVOptionVideo	qmin	1
	AVOptionVideo	qmax	31
	AVOptionVideo	bufsize	100000k

	# this must match the ffmpeg -r argument 
	VideoFrameRate 15 
	VideoSize 320x240


	VideoGopSize 20

	Strict -1

	# this sets how many seconds in past to start 
	PreRoll 0 

	# don't have audio 

	ACL allow localhost
	ACL allow

<Stream stat.html>
Format status
ACL allow localhost
ACL allow

Attachments (1)

uglyFix.c (6.8 KB) - added by Zax 6 years ago.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by Zax

comment:1 Changed 9 days ago by llogan

  • Keywords ffserver live streaming removed
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from git-master to unspecified

ffserver was removed from git master, closing bug as invalid.

If this old issue can be duplicated with ffmpeg from the current git master branch alone please re-open. As a reminder, patches should be created using git format-patch or git send-email and sent to the ffmpeg-devel mailing list. Patches are often forgotten here.

Note: See TracTickets for help on using tickets.