601
Multimedia / Re: Use of webcam
« on: June 26, 2020, 08:55:46 pm »Hi Rémy,
Good to know that it is working for you too. What actual parameters did you use?
I am asking because /m for mjpg versus /u for yuyv makes a big difference in processing.
The mjpg images are sent as is whereas the yuyv images are converted to mjpg first.
I think that for the C270 with /r4 the resolution is 320x176 rather than 320x180.
Thanks for testing and reporting back.
Hi Wim,
Yes, you are right, it is 320x176 with /r4 (I rounded by error the value after taking a window copy by pmview - before changing it to window interior).
I know use ffprob instead of ffplay to get all information with accurate values
webcam /s/r4 | ffprobe -i -
or
webcam /s/r4 | ffprobe -show_streams -i - | more
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=192
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=320
height=176
coded_width=320
coded_height=176
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]
webcam /u/s/r4 | ffprobe -show_streams -i - | more
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=192
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=320
height=176
coded_width=320
coded_height=176
has_b_frames=0
sample_aspect_ratio=1:1
display_aspect_ratio=20:11
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]
webcam /m/s/r4 | ffprobe -show_streams -i - | more
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=Motion JPEG
profile=192
codec_type=video
codec_time_base=0/1
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=320
height=176
coded_width=320
coded_height=176
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj422p
level=-99
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
chroma_location=center
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]
The strange is that I have 640x480 if no /rN parm but the second cam QuickCam pro 9000 has a 160x120 size
With the previous build, I had 640x480 in both cases without new /rN parm which was better as general default size.
Regards
Rémy