2011-06-13 19:05:07     ffmpeg hangs on device open

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-06-13 19:05:07     ffmpeg hangs on device open

Gilles Gameiro (UNITED STATES)

Message: 101236   




There are a few threads similar but still nothing helpful. I was hoping we could try to address the issue here. At this point, I am trying to run ffmpeg on a vanilla, unmodified uClinux and toolchain 2010R1 on a BF527-EZLITE-V2  with the CMOS CAM extender and a VS6524. I have obviously read these:








Still, ffmpeg hangs right after opening (or during opening) /dev/video0. If my command line is incorrect, I'll get errors like "[video4linux @ 0xc6d2e0]Wrong time base" or the sort suggesting that it's doing the proper checks but with the following command line, it hangs as shown below:


> ffmpeg -f video4linux -s 320x240 -i /dev/video0 -an -vcodec copy /dev/null


FFmpeg version git-bc8ef58, Copyright (c) 2000-2009 Fabrice Bellard, et al.

  built on Jun 13 2011 13:25:32 with gcc 4.3.5

  configuration: --prefix=/usr --source-path=/home/gilles/bfsrc/uclinux dist/lib/ffmpeg/build/../ffmpeg-svn-20344 --target-os=linux --arch=bfi-

  libavutil     50. 3. 0 / 50. 3. 0

  libavcodec    52.37. 0 / 52.37. 0

  libavformat   52.39. 2 / 52.39. 2

  libavdevice   52. 2. 0 / 52. 2. 0

  libswscale     0. 7. 1 /  0. 7. 1

  libpostproc   51. 2. 0 / 51. 2. 0


I'd appreciate any suggestions. I need to start modifying code for a project I'm working on but I hate to do that on a base which doesn't work to begin with. Note that Ctrl-C works (vs complete death).


I tried to compile in the video test driver instead to eliminate possible issues in the video SOC driver but it uses v4l2 and ffmpeg rejects it with the following error (of course the command line was changed to -f video4linux2):




  [video4linux2 @ 0xc70fa0][3]Capabilities: 5000001

  [video4linux2 @ 0xc70fa0]mmap: No such device

  /dev/video0: I/O error occurred






2011-06-21 04:08:28     Re: ffmpeg hangs on device open

Aaron Wu (CHINA)

Message: 101511   


is above the full log you see during the test? From your command line I guess you might be trying to direct the raw video to /dev/null, did you see some log like" Press [q] to stop encoding?". Actually I tried the same command you use I get error: [video4linux @ 0x25f5360]Wrong time base(0), so you may want to check your command line.


Following the document   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:v4l_blackfin_camera I use the command:

ffmpeg -v 0 -f video4linux -r 20 -s 320x240 -i /dev/video0 -an -qscale 2 -f avi foo And it works fine, I can caputure the video into a file succesfully.