[FFmpeg-user] record presentation

Cédric Briner briner at infomaniak.ch
Tue Nov 8 23:03:57 EET 2016


Hi,
I'd like to record a conference. To do so, I record
* the speaker with a logitech webcam C920 (video1) able to directly generate h264
* the video presentation from a splitter recorded with a datapath [1] (video0)
* the sound with a wireless microphone system connected to the "Line In".


I do use the following command to record it (Debian Jessie)
ffmpeg -f v4l2 -input_format h264    -i /dev/video1 \
       -f v4l2 -input_format yuyv422 -i /dev/video0 \
       -f pulse -ac 2 -i default \
       -map 0 -map 1 -map 2\
       -c:v:0 copy \
       -c:v:1 h264 \
       -c:a:2 mp3 \
       output.mkv


When recording I got at about 8 secs some errors in the output such as:
[video4linux2,v4l2 @ 0x6d9d00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Past duration 0.982231 too large
frame=    1 fps=0.0 q=-1.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s dup=0 drop=1 spe[output stream 0:2 @ 0x6e8f80] 100 buffers queued in output stream 0:2, something may be wrong.
[matroska @ 0x6f8d80] Non-monotonous DTS in output stream 0:0; previous: 0, current: -167; changing to 0. This may result in incorrect timestamps in the output file.
[matroska @ 0x6f8d80] Non-monotonous DTS in output stream 0:0; previous: 0, current: -131; changing to 0. This may result in incorrect timestamps in the output file.
[matroska @ 0x6f8d80] Non-monotonous DTS in output stream 0:0; previous: 0, current: -99; changing to 0. This may result in incorrect timestamps in the output file.
[matroska @ 0x6f8d80] Non-monotonous DTS in output stream 0:0; previous: 0, current: -67; changing to 0. This may result in incorrect timestamps in the output file.
[matroska @ 0x6f8d80] Non-monotonous DTS in output stream 0:0; previous: 0, current: -31; changing to 0. This may result in incorrect timestamps in the output file.


What is strange it the output of ffpmeg -i output.mkv, as we do not have the same duration for audio & video
Input #0, matroska,webm, from 'output.mkv':
  Metadata:
    ENCODER         : Lavf57.41.100
  Duration: 00:00:41.02, start: 0.000000, bitrate: 3094 kb/s
    Stream #0:0: Video: h264 (Constrained Baseline), yuvj420p(pc), 640x480 [SAR 1:1 DAR 4:3], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
    Metadata:
      DURATION        : 00:00:41.021000000
    Stream #0:1: Video: h264 (High 4:2:2), yuv422p, 1920x1200, SAR 1:1 DAR 8:5, 59.95 fps, 59.95 tbr, 1k tbn, 119.90 tbc (default)
    Metadata:
      ENCODER         : Lavc57.48.101 libx264
      DURATION        : 00:00:35.333000000
    Stream #0:2: Audio: vorbis, 48000 Hz, stereo, fltp (default)
    Metadata:
      ENCODER         : Lavc57.48.101 libvorbis
      DURATION        : 00:00:34.478000000


I try to play both videos with "ffplay" without success.

So using vlc to play it, it seems ok for the first 8 secs. Except the sound that do not correspond at all.
At the same 8 secs after which I got some errors on the output the image of the speaker (video1) get... ehm I do not know how to say it: it does freeze and some times it moves agai like it's missing a *primary image* and the video is not good until the next *primary image* come.
[00007f1a7cc0fc68] clock decoder error: Timestamp conversion failed (delay 300000, buffering 100000, bound 9000000)
[00007f1a7cc0fc68] core decoder error: Could not convert timestamp 8377832553
..
..


So the questions are multiple:
* As I only want to record it, is it a good idea to have the 2 videos streams in one container ?
* As I will only record for 2 hours max, that I have a SSD of 100GB, I can use any encoder that: works well and do not use all my disk space. So I'm not really fixed to use h264. Should I use something else ?
* What can I do to not have Non-monotonous DTS. Reading the output of "ffmpeg -f v4l2 -list_formats all -i /dev/video1", I can use h264, mjpeg, yuyv422 (YUV 4:2:2 (YUYV)). So as said, I'm not fixed to use h264. So knowing what could I do to not have such errors
* What can I do to have streams (audio & videos) synchronized ?
* Will I be able to use this container (mkv or other if it fits better) to generate a video in a mosaic style like the following ?
1 2 2
3 2 2               
1 speaker face
2 video presentation (slide)
3 static image (logo + texte)


Cédric BRINER
P.-S. the version I use is on a Debian Jessie
ffmpeg -version
ffmpeg version 3.1.4-1~bpo8+1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)


[1] datapath: VisionRGB-E1S
http://datapath.co.uk/video-capture-cards/vision-range/visionrgb-e1s


More information about the ffmpeg-user mailing list