[mythtv-users] Recording from input video on demand, no tuner; update: troubles capturing video using RPI4
Jay Harbeston
jharbestonus at gmail.com
Thu Mar 2 20:31:28 UTC 2023
> On Mar 2, 2023, at 3:02 PM, John Pilkington <johnpilk222 at gmail.com> wrote:
>
>
> I've seen the 'non-monotonous' complaint before (and think it ought to be non-monotonic). For file-to-file stuff I use
>
> ionice -c3 mythffmpeg -hide_banner -ignore_unknown -fflags +genpts \
> -i infile.ts -vcodec copy -acodec copy -avoid_negative_ts make_zero \
> -f mpegts outfile.ts
>
> where the '-fflags +genpts' before the -i seems important. I think the 'avoid_negative make_zero' bits affect concatenation, and IDK whether they would help here.
>
> John P
>
I have modified my ffmpeg command to incorporate the additional arguments as follows, and include the output(abbreviated) as follows:
ffmpeg -hide_banner -f v4l2 -thread_queue_size 1024 -input_format mjpeg -video_size 1920x1080 -framerate 30 -ignore_unknown -fflags +genpts -i /dev/video0 -f pulse -thread_queue_size 1024 -i default -f mpegts -codec copy -avoid_negative_ts make_zero vid_1080p_30.ts
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1205729.839641, bitrate: N/A
Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, pulse, from 'default':
Duration: N/A, start: 1677788495.641996, bitrate: 1536 kb/s
Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
File 'vid_1080p_30.ts' already exists. Overwrite? [y/N] y
Output #0, mpegts, to 'vid_1080p_30.ts':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, q=2-31, 30 fps, 30 tbr, 90k tbn, 1000k tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x23ab9b0] Stream 0, codec mjpeg, is muxed as a private data stream and may not be recognized upon reading.
[mpegts @ 0x23ab9b0] Stream 1, codec pcm_s16le, is muxed as a private data stream and may not be recognized upon reading.
frame= 45 fps=0.0 q=-1.0 size= 14080kB time=00:00:02.86 bitrate=40267.4kbits
frame= 61 fps= 60 q=-1.0 size= 18944kB time=00:00:03.39 bitrate=45690.5kbits
frame= 76 fps= 50 q=-1.0 size= 23808kB time=00:00:03.89 bitrate=50052.8kbits
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, mpegts, from 'vid_1080p_30.ts':
Duration: N/A, bitrate: N/A
mythffprobe vid_1080p_30.ts
ffprobe version v32.0-40-g7bb5162be0 Copyright (c) 2007-2021 the FFmpeg developers
built with gcc 10 (Raspbian 10.2.1-6+rpi1)
configuration: --arch=arm --sysinclude=/usr/include --cc='ccache gcc' --cxx='ccache g++' --ld=gcc --cpu=cortex-a7 --target_os=linux --pkg_config=pkg-config --prefix=/usr --libdir=/usr/lib --as=gcc --objcc=gcc --dep_cc=gcc --host_cc=gcc --host_ld=gcc --ar=ar --nm='nm -g' --ranlib='ranlib -D' --disable-cross-compile --enable-libmp3lame --disable-libx264 --disable-libx265 --disable-libvpx --disable-libxvid --disable-vdpau --enable-libxml2 --enable-libass --disable-dxva2 --enable-libbluray --disable-libfontconfig --disable-libfreetype --disable-libiec61883 --disable-crystalhd --disable-sdl2 --disable-ffplay --enable-mmal --enable-libdrm --enable-gnutls --extra-cflags=' -mfpu=neon -w' --extra-ldflags= --extra-libs= --enable-stripping --strip='echo skipping strip' --disable-manpages --disable-podpages --disable-doc --disable-nvenc --enable-shared --disable-static --enable-gpl --enable-pic --disable-demuxer=mpegtsraw --disable-indev=dshow
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, mpegts, from 'vid_1080p_30.ts':
Duration: N/A, bitrate: N/A
Still the same results as far as the mythffprobe is concerned.
Does the statements when capturing about the private data stream have any bearing on the problem?
[mpegts @ 0x23ab9b0] Stream 0, codec mjpeg, is muxed as a private data stream and may not be recognized upon reading.
[mpegts @ 0x23ab9b0] Stream 1, codec pcm_s16le, is muxed as a private data stream and may not be recognized upon reading.
When I do the capture using the mkv or avi versions of the command, those do not show I believe.
Regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230302/9ba25f65/attachment.htm>
More information about the mythtv-users
mailing list