Opened 4 years ago

Closed 4 years ago

#4594 closed defect (needs_more_info)

Files created are the same size regardless of quality settings

Reported by: illumilore Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When running"
~/src/ffmpeg/ffmpeg -f pulse -i default -f video4linux2 -input_format mjpeg -s 960x720 -r 5 -i /dev/video0 -acodec vorbis -vcodec libx264 -preset ultrafast -tune zerolatency -map 0:a -map 1:v http://127.0.0.1:8090/cam.ffm -f segment -segment_time 3600 -segment_atclocktime 1 -reset_timestamps 1 -vcodec libx264 -r 5 -s 960x720 -crf 40 -tune zerolatency -strict -2 -vf "drawtext='fontfile=/usr/share/fonts/truetype/DejaVuSans.ttf:fontcolor=white:fontsize=30:x=1:y=2:shadowx=1:shadowy=1:text=%{localtime\:%Y-%m-%d %H

\:%M

\:%S}'" -strftime 1 -acodec copy "/media/cam/%Y-%m-%d_%H-%M.mkv"

that will create files that are 650MB, while using -crf 32 will also create files that are 650MB,even though the former is lower quality and should create much smaller files.

Change History (5)

comment:1 Changed 4 years ago by cehoyos

Is this issue also reproducible with file input? Is it also reproducible without audio?

To make this a valid ticket, please provide the command line that allows to reproduce the issue together with the complete, uncut console output.

comment:2 Changed 4 years ago by illumilore

$ ~/src/ffmpeg/ffmpeg -f pulse -i default -f video4linux2 -input_format mjpeg -s 960x720 -r 5 -i /dev/video0 -acodec vorbis -vcodec libx264 -preset ultrafast -tune zerolatency -map 0:a -map 1:v http://127.0.0.1:8090/cam.ffm -f segment -segment_time 3600 -segment_atclocktime 1 -reset_timestamps 1 -vcodec libx264 -r 5 -s 960x720 -crf 40 -tune zerolatency -strict -2 -vf "drawtext='fontfile=/usr/share/fonts/truetype/DejaVuSans.ttf:fontcolor=white:fontsize=30:x=1:y=2:shadowx=1:shadowy=1:text=%{localtime\:%Y-%m-%d %H

\:%M

\:%S}'" -strftime 1 -acodec copy "/media/cam/%Y-%m-%d_%H-%M.mkv"
ffmpeg version N-72621-g21e40f0 Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 4.8 (SUSE Linux)
configuration: --enable-libfreetype --enable-libfontconfig --enable-libpulse --enable-gpl --enable-libvpx --enable-libx264
libavutil 54. 26.101 / 54. 26.101
libavcodec 56. 41.101 / 56. 41.101
libavformat 56. 34.100 / 56. 34.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100

[pulse @ 0x1ffbb20] pa_stream_get_latency() failed

Last message repeated 1 times

Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'default':

Duration: N/A, start: 1433575059.927935, bitrate: 1536 kb/s

Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s

Input #1, video4linux2,v4l2, from '/dev/video0':

Duration: N/A, start: 279833.136575, bitrate: N/A

Stream #1:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 960x720, 0 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc

Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 (http://127.0.0.1:8090/cam.ffm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption tune (Tune the encoding params (cf. x264 --fullhelp)) specified for output file #0 (http://127.0.0.1:8090/cam.ffm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[swscaler @ 0x1fddb20] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x1fd3560] deprecated pixel format used, make sure you did set range correctly
No pixel format specified, yuvj422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x20096e0] using cpu capabilities: MMX2 SSE2Fast LZCNT
[libx264 @ 0x20096e0] profile High 4:2:2, level 3.1, 4:2:2 8-bit
[libx264 @ 0x20096e0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=5 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=40.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[segment @ 0x200b500] Codec for stream 1 does not use global headers but container format requires global headers
[matroska @ 0x26bbc80] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, ffm, to 'http://127.0.0.1:8090/cam.ffm':

Metadata:

creation_time : now
encoder : Lavf56.34.100
Stream #0:0: Video: flv1 (flv), yuv420p, 960x720, q=5-15, 4000 kb/s, 5 fps, 1000k tbn, 5 tbc
Metadata:

encoder : Lavc56.41.101 flv

Stream #0:1: Video: mjpeg, yuvj422p(pc), 960x720, q=1-5, 64 kb/s, 5 fps, 1000k tbn, 2 tbc
Metadata:

encoder : Lavc56.41.101 mjpeg

Stream #0:2: Video: mjpeg, yuvj422p(pc), 640x480, q=10-20, 64 kb/s, 5 fps, 1000k tbn, 2 tbc
Metadata:

encoder : Lavc56.41.101 mjpeg

Output #1, segment, to '/media/cam/%Y-%m-%d_%H-%M.mkv':

Metadata:

encoder : Lavf56.34.100
Stream #1:0: Video: h264 (libx264), yuvj422p(pc), 960x720, q=-1--1, 5 fps, 1k tbn, 5 tbc
Metadata:

encoder : Lavc56.41.101 libx264

Stream #1:1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s

Stream mapping:

Stream #1:0 -> #0:0 (mjpeg (native) -> flv1 (flv))
Stream #1:0 -> #0:1 (mjpeg (native) -> mjpeg (native))
Stream #1:0 -> #0:2 (mjpeg (native) -> mjpeg (native))
Stream #1:0 -> #1:0 (mjpeg (native) -> h264 (libx264))
Stream #0:0 -> #1:1 (copy)

Press [q] to stop, ? for help
[mjpeg @ 0x201e520] rc buffer underflow

Last message repeated 1 times

[pulse @ 0x1ffbb20] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[segment @ 0x200b500] Non-monotonous DTS in output stream 1:1; previous: 2, current: -10; changing to 3. This may result in incorrect timestamps in the output file.
[segment @ 0x200b500] Non-monotonous DTS in output stream 1:1; previous: 3, current: -13; changing to 4. This may result in incorrect timestamps in the output file.
[segment @ 0x200b500] Non-monotonous DTS in output stream 1:1; previous: 4, current: -14; changing to 5. This may result in incorrect timestamps in the output file.
[segment @ 0x200b500] Non-monotonous DTS in output stream 1:1; previous: 5, current: -14; changing to 6. This may result in incorrect timestamps in the output file.
[segment @ 0x200b500] Non-monotonous DTS in output stream 1:1; previous: 6, current: -8; changing to 7. This may result in incorrect timestamps in the output file.
[segment @ 0x200b500] Non-monotonous DTS in output stream 1:1; previous: 7, current: 5; changing to 8. This may result in incorrect timestamps in the output file.
[mjpeg @ 0x201e520] rc buffer underflow
frame= 3 fps=0.0 q=2.0 q=33.7 q=2.0 q=38.0 size= 60kB time=00:00:01.50 bitrate= 327.7kbits/s [mjpeg @ 0x201e520] rc buffer underflow
frame= 6 fps=5.9 q=2.0 q=34.0 q=4.2 q=38.0 size= 100kB time=00:00:02.00 bitrate= 409.6kbits/s du[mjpeg @ 0x201e520] rc buffer underflow
frame= 8 fps=5.3 q=2.0 q=31.4 q=6.7 q=38.0 size= 136kB time=00:00:02.50 bitrate= 445.6kbits/s du[mjpeg @ 0x201e520] rc buffer underflow
frame= 11 fps=5.4 q=2.0 q=31.4 q=9.4 q=38.0 size= 172kB time=00:00:03.00 bitrate= 469.7kbits/s du[mjpeg @ 0x201e520] rc buffer underflow
frame= 13 fps=5.1 q=1.6 q=31.4 q=12.3 q=38.0 size= 220kB time=00:00:03.50 bitrate= 514.9kbits/s d[mjpeg @ 0x201e520] rc buffer underflow
frame= 16 fps=5.3 q=2.0 q=31.4 q=15.2 q=38.0 size= 264kB time=00:00:04.00 bitrate= 540.7kbits/s d[mjpeg @ 0x201e520] rc buffer underflow
frame= 18 fps=5.1 q=2.0 q=31.4 q=18.1 q=38.0 size= 30

comment:3 Changed 4 years ago by cehoyos

Is this issue also reproducible with file input? Is it also reproducible without audio?

comment:4 Changed 4 years ago by michael

please provide a minimal testcase that contains no options which are not required to reproduce the problem

comment:5 Changed 4 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed

Please reopen this ticket if you can add the requested information.

Note: See TracTickets for help on using tickets.