Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500380 - =media-video/vlc-2.1.2 'cvlc v4l2:///dev/video0 ... vlc://quit' does not quit as fast as expected and there are some strange intensities
Summary: =media-video/vlc-2.1.2 'cvlc v4l2:///dev/video0 ... vlc://quit' does not quit...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Nick Andrade
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-05 15:19 UTC by Juergen Rose
Modified: 2017-02-23 21:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2014-02-05 15:19:45 UTC
Mostly 'v4l2:///dev/video0 -Vdummy --no-audio --run-time 1 --scene-path ./tmp --scene-replace --scene-format png --video-filter scene vlc://quit' or even 'cvlc v4l2:///dev/video0 -Vdummy --no-audio --run-time 1 --scene-path ./tmp  --scene-format png --video-filter scene vlc://quit' does not quit as expected.

I started with an empty tmp directory:

 rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(259)$ rm tmp/*
rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(260)$ time cvlc v4l2:///dev/video0 -Vdummy --no-audio --run-time 1 --scene-path ./tmp --scene-replace --scene-format png --video-filter scene vlc://quit
VLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876)
[0x2030da8] dummy interface: using the dummy interface module...
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
[0x7f439c000e68] idummy demux: command `quit'

real	0m15.192s
user	0m1.000s
sys	0m0.179s

I expected the end after one second 15 seconds is a little bit longer. OK, maybe there is some overhead. I repeated the experiment, now there was scene.png in the tmp directory:

rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(261)$ ll tmp/
insgesamt 468
-rw-r----- 1 rose rose 476280  5. Feb 15:27 scene.png
rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(262)$ time cvlc v4l2:///dev/video0 -Vdummy --no-audio --run-time 1 --scene-path ./tmp --scene-replace --scene-format png --video-filter scene vlc://quit
VLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876)
[0x105bda8] dummy interface: using the dummy interface module...
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
[0x7fa598000e28] idummy demux: command `quit'

real	0m39.743s
user	0m1.982s
sys	0m0.280s


Almost 40 seconds! What is vlc doing. The same once more:


rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(263)$ ll tmp/
insgesamt 700
-rw-r----- 1 rose rose 715218  5. Feb 15:28 scene.png
rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(264)$ time cvlc v4l2:///dev/video0 -Vdummy --no-audio --run-time 1 --scene-path ./tmp --scene-replace --scene-format png --video-filter scene vlc://quit
VLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876)
[0x229ada8] dummy interface: using the dummy interface module...
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
[0x7f2ba4000e68] idummy demux: command `quit'

real	3m59.724s
user	0m12.016s
sys	0m2.263s


Almost 4 minutes! What is happening? I remove the --scene-replace argument and hope, that vlc will save some snapshots. At this attempt it even works and I got 48 new images:
 rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(265)$ time cvlc v4l2:///dev/video0 -Vdummy --no-audio --run-time 1 --scene-path ./tmp --scene-format png --video-filter scene vlc://quitVLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876)
[0x1922cb8] dummy interface: using the dummy interface module...
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
[0x7f5e60000e68] idummy demux: command `quit'

real	1m41.502s
user	0m4.676s
sys	0m0.629s
rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(266)$ ll tmp/
insgesamt 22896
-rw-r----- 1 rose rose 713492  5. Feb 15:32 scene.png
-rw-r----- 1 rose rose 654966  5. Feb 15:40 scene00001.png
-rw-r----- 1 rose rose 467737  5. Feb 15:40 scene00051.png
...
-rw-r----- 1 rose rose 468453  5. Feb 15:41 scene02351.png


Often I had the feeling that the commands never finishes and I killed it with ^C. Maybe I was not waiting long enough. Why vlc needs so much time?


Then there is a second problem, the image which I got with the --scene-replace argument has a mean intensity of about 148:

rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(270)$ identify -verbose tmp/scene.png | grep  "Channel statistics:\|Overall\|mean"
  Channel statistics:
      mean: 146.354 (0.573935)
      mean: 150.821 (0.591456)
      mean: 145.737 (0.571517)
    Overall:
      mean: 147.637 (0.578969)

The intensity of the remaining images (without -scene-replace argument) starts with 65 all remaining images have a mean intensity of about 35:

rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(271)$ identify -verbose tmp/scene*.png | grep  "Channel statistics:\|Overall\|mean"
  Channel statistics:
      mean: 146.354 (0.573935)
      mean: 150.821 (0.591456)
      mean: 145.737 (0.571517)
    Overall:
      mean: 147.637 (0.578969)
  Channel statistics:
      mean: 58.5689 (0.229682)
      mean: 66.3934 (0.260366)
      mean: 67.5334 (0.264837)
    Overall:
      mean: 64.1653 (0.251628)
  Channel statistics:
      mean: 29.6748 (0.116372)
      mean: 35.9216 (0.140869)
      mean: 39.2059 (0.153749)
    Overall:
      mean: 34.9341 (0.136996)
  Channel statistics:
      mean: 29.7021 (0.116479)
      mean: 35.9425 (0.140951)
      mean: 39.3634 (0.154366)
    Overall:
      mean: 35.0026 (0.137265)
  Channel statistics:
      mean: 29.6673 (0.116342)
      mean: 35.8888 (0.14074)
      mean: 39.2923 (0.154087)
    Overall:
      mean: 34.9495 (0.137057)
...
 Channel statistics:
      mean: 29.544 (0.115859)
      mean: 35.5772 (0.139518)
      mean: 38.7538 (0.151976)
    Overall:
      mean: 34.625 (0.135784)
  Channel statistics:
      mean: 28.9655 (0.11359)
      mean: 34.9071 (0.13689)
      mean: 37.9856 (0.148963)
    Overall:
      mean: 33.9527 (0.133148)

rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(274)$ uvcdynctrl -g 'Exposure (Absolute)'
70
rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(276)$ uvcdynctrl -g 'Exposure, Auto'
1

I did a further test with a higher exposure time:

rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(277)$ uvcdynctrl -s 'Exposure (Absolute)' 250
rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(278)$ rm tmp/*
rose@leopard:/home_leopard/rose/Txt/projects/IVD_soeren/Cameras/Phytec(279)$ time cvlc v4l2:///dev/video0 -Vdummy --no-audio --run-time 1 --scene-path ./tmp --scene-format png --video-filter scene vlc://quit
VLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876)
[0x1682cb8] dummy interface: using the dummy interface module...
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
^C
real	14m29.589s
user	0m47.027s
sys	0m7.899s

The programm does not finish after almost 15 minutes, I had to kill it. 437 images has been created. The first image has a mean intensity of 135, for the remaining the intensity decreases continously from 131 to 110.

Should I generally forget the first two or three images, because there is still some initialization of the camera?


Reproducible: Always
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-02-06 06:46:48 UTC
Well, I run vlc-2.0.7 myself because I have recording related problems in later versions of vlc; I think they are similar to yours but different in the way it is expressed, in my case I have some problem with heavy audio stuttering as well as the screen being laggy (sometimes it keeps the same frame or so) or things like that (I've been bisecting a range of commits on that when I did last version bump, without succes).

So, on vlc-2.0.7 I just get this:

 $ mkdir tmp
 $ time cvlc v4l2:///dev/video0 -Vdummy --no-audio --run-time 1 --scene-path ./tmp --scene-replace --scene-format png --video-filter scene vlc://quit
VLC media player 2.0.7 Twoflower (revision 2.0.6-54-g7dd7e4d)
[0x6bf738] dummy interface: using the dummy interface module...
[0x7f0118001538] idummy demux: command `quit'

real	0m2.105s
user	0m0.048s
sys	0m0.013s

Upon repetition of about 10 runs, it stays lower than four seconds; and upon checking some other commands you gave, it is the case for all of them.

I'll try out your version of vlc towards this weekend to see if differs; if it does, it may be possible to automate bisecting this with a simple condition that the amount of time should be lower than 8 seconds or so. Such that I don't need to do manual involvement; though, having previously bisected it it can happen that some of the versions don't compile due to inconsistencies with libraries.

I'm not sure about your other problem, I think I'm missing some knowledge and/or background on that (or rather, I'm not used to the terms); but I'll try to test that out, as well as to compare it, when I get to do that testing.
Comment 2 jospezial 2015-06-17 23:57:48 UTC
 08 May 2015; Agostino Sarubbo <ago@gentoo.org> -vlc-2.1.2.ebuild:
  Drop 2.1.2
Comment 3 Amy Liffey gentoo-dev 2017-02-23 21:37:58 UTC
(In reply to jospezial from comment #2)
>  08 May 2015; Agostino Sarubbo <ago@gentoo.org> -vlc-2.1.2.ebuild:
>   Drop 2.1.2

Thanks for noticing ! :)