[FFmpeg-user] bananapi cedrus h264 hardware encoder yields 0-byte size file

cedric.dewijs at telfort.nl cedric.dewijs at telfort.nl
Fri May 18 15:58:40 EEST 2018


>> >See the v4l2 options for global timestamps.
>> Where and how can I enable this? Where is the manual?
>
>The manual is in the doc/ subdir of your build, or here:
>https://www.ffmpeg.org/ffmpeg-devices.html#video4linux2_002c-v4l2
>
>I had mentioned v4l2's timestamps option in a previous mail as well.
>
>Moritz
>_______________________________________________
Thanks Mortiz,

When I add -ts abs to my ffmpeg commandline, the resulting file plays in real-time on VLC on my PC. It looks like each time the message about non-monotonous DTS comes up in the console, the corresponing video frame is dropped. In VLC, in the window "Current media Information" - Statistics, video, I see the number of lost frames increasing.

When I add -ts mono2abs  to my ffmpeg commandline, the resulting file plays way too fast in VLC.I see no changes with framedrops.

cedric at bananapi:~/official/ffmpeg-4.0$ ./ffmpeg -ts abs -f v4l2 -input_format mjpeg -s 1280x960 -i /dev/video0 -c:v copy /media/cedric/MYLINUXLIVE/out.mkv
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 20160609
  configuration: --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse --enable-libv4l2
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
[video4linux2,v4l2 @ 0x25e2270] The V4L2 driver changed the video from 1280x960 to 1280x720
[video4linux2,v4l2 @ 0x25e2270] Detected monotonic timestamps, converting
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 1526648446.111326, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
File '/media/cedric/MYLINUXLIVE/out.mkv' already exists. Overwrite ? [y/N] y
Output #0, matroska, to '/media/cedric/MYLINUXLIVE/out.mkv':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, q=2-31, 30 fps, 30 tbr, 1k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x25e40c0] Non-monotonous DTS in output stream 0:0; previous: 3090, current: 2232; changing to 3090. This may result in incorrect timestamps in the output file.
[matroska @ 0x25e40c0] Non-monotonous DTS in output stream 0:0; previous: 3090, current: 2265; changing to 3090. This may result in incorrect timestamps in the output file.
...
[matroska @ 0x25e40c0] Non-monotonous DTS in output stream 0:0; previous: 10580048, current: 530577; changing to 10580048. This may result in incorrect timestamps in the output file.
[matroska @ 0x25e40c0] Non-monotonous DTS in output stream 0:0; previous: 10580048, current: 530611; changing to 10580048. This may result in incorrect timestamps in the output file.
frame=12057 fps= 23 q=-1.0 Lsize= 3027751kB time=02:56:20.04 bitrate=2344.3kbits/s speed=  20x    
video:3027358kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.012984%
^C^C^C
cedric at bananapi:~/official/ffmpeg-4.0$


More information about the ffmpeg-user mailing list