[FFmpeg-user] Question about v4l2 controls and ffmpeg, also dts muxer problems

Goetz Dapp goetz.dapp at googlemail.com
Tue May 15 00:02:54 CEST 2012


Hello everybody,

On 05/06/2012 05:49 PM, Goetz Dapp wrote:
> On Sat, May 5, 2012 at 1:09 AM, Carl Eugen Hoyos <cehoyos at ag.or.at
> <mailto:cehoyos at ag.or.at>> wrote:
>
>     Goetz Dapp <goetz.dapp <at> googlemail.com
>     <http://googlemail.com>> writes:
>
>     > ffmpeg -f video4linux2 -framerate 30 -video_size hd720 -input_format
>     > mjpeg -fflags igndts -an -i /dev/video0 -c:v copy -an
>     /HDD2/test1.mjpeg
>
>     > I am curious though if there is any way of controlling the v4l2
>     control
>     > ids through ffmpeg, i.e. things like
>     V4L2_CID_WHITE_BALANCE_TEMPERATURE,
>     > V4L2_CID_DO_WHITE_BALANCE, V4L2_CID_FOCUS_AUTO ...
>
>     No, but I believe it should be straight-forward to implement, see
>     v4l2_set_parameters() and options[] in libavdevice/v4l2.c
>
>
> Sorry it took me a while to respond. I did some searching, but I think
> I am not entirely clear what this would entail. Since I am not a
> programmer, could you give me some more ideas how that could be done?
>  
>
>     > The autofocus particularly kicks in during recording and messes
>     things up.
>
>     > I also have another problem, namely that I am getting tons of errors
>     > "/Application provided invalid, non monotonically //increasing
>     dts to muxer"
>
>     Complete, uncut console output missing.
>
>
> See: http://pastebin.com/iVcchSVv
>  
>
>
>     > If I tell it to save it as an .avi file it crashes immediately
>
>     Crashes are important, please provide the missing information
>     as explained on http://ffmpeg.org/bugreports.html
>
>
> Do I need to compile ffmpeg to get the ffmpeg_g? Here is what I get in
> the regular console:
>
> http://pastebin.com/TerkNUPP
>
>  
>
>     > with the mjpeg it seems to record relatively OK. Is there a
>     > way of solving this?
>
>     > Or, at the least, to turn off the error messages?
>
>     -loglevel xx ?
>
>
> Thanks! I completely missed that.
>
>
>     Carl Eugen
>
>     _______________________________________________
>     ffmpeg-user mailing list
>     ffmpeg-user at ffmpeg.org <mailto:ffmpeg-user at ffmpeg.org>
>     http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>
> Thanks for your help!
>
> Goetz

I investigated this a little further, in the hope that I would hear
something in the meantime - so please forgive my "double posting".

I am running two instances of ffmpeg simultaneously, using

ffmpeg -loglevel panic -f video4linux2 -framerate 30 -video_size hd720
-input_format mjpeg -fflags igndts -an -i /dev/video0 -c:v copy -an
/HDD2/test1.mjpeg

and

ffmpeg -loglevel panic -f video4linux2 -framerate 30 -video_size hd720
-input_format mjpeg -fflags igndts -an -i /dev/video0 -c:v copy -an
/HDD3/test2.mjpeg

I am still getting the same errors along the line I have posted above,
"[mjpeg @ 0x639a00] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 100961 >= 73082", which, of course,
the loglevel suppresses now.

I am also encountering occasional framedrops that ffmpeg does not report
(even without any -loglevel restriction). I have manually set the
bandwidth in the uvc_video.c v4l driver to 3072 (as per:
http://www.mail-archive.com/linux-uvc-devel@lists.berlios.de/msg04783.html),
using two different USB buses (one PCIE USB3 card, and the onboard
USB2). I'm also running it without x server (init level 3), and the CPU
usage is about 18% of each core (dual core Athlon 4000+), and I am
saving each file to a separate hard drive. In other words, there should
be enough bandwidth and computing power available. Could that be an
effect of the dts muxer errors reported by ffmpeg?

Shouldn't the -an option theoretically avoid that altogether, or do I
misunderstand what that error means?

Also, could you provide me with further indications how the v4l video
options could be implemented?

One more thing that confuses me: I am allegedly recording at 30fps, yet
ffmpeg reports 25fps when using ffmpeg -i /HDD2/test1.mjpeg, and ffplay
also plays them at 25fps unless I use the -framerate 30 setting.

Thanks for your help!
Goetz




More information about the ffmpeg-user mailing list