[FFmpeg-user] 3D SBS with ffmpeg quality question

Sully Beck ffmpeg-334dzyck at sullybeck.com
Thu May 24 05:07:06 EEST 2018


On 05/23/2018 09:27 PM, Carl Eugen Hoyos wrote:
> 2018-05-24 2:17 GMT+02:00, Sully Beck <ffmpeg-334dzyck at sullybeck.com>:
>
>> Finally, I used ffmpeg to create an MP4 file, and I've included the
>> mediainfo description below.
> (Why?)

Because I thought it would help :-)

I'm new at using ffmpeg.  Up to now, I've just been using windows tools 
that I bought (like PavTube) which have basically been point and click 
and I've been learning as I go what all of the ffmpeg options mean.  I 
used mediainfo to help me along because it told me the parameters that I 
thought I would want to duplicate.  I apologize if that was too much/too 
useless information.  Basically, at each step, I was trying to get all 
of the video parameters in the ffmpeg version to match those in the 
PavTube one at which point my assumption was that the video would be of 
comparable quality.

Apparently that's not necessarily the case, and I'm failing to 
understand something and hopefully this exchange will help me there.

>> I used the command:
>>
>>      ffmpeg \
>>         -i Monster_House_t00.mkv \
>>         -filter_complex stereo3d=al:sbsl \
>>         -vcodec libx264 \
>>         -acodec aac \
>>         -s 1920x1080 -aspect 16:9 \
>>         -b:v 15000k \
>>         -b:a 448000 \
>>         -ar 48000 \
>>         -r 23.976 \
> This cannot be correct.
>
>>         -y \
>>         -coder 0 \
>>         MH.mp4"

I'm not sure why you say that this cannot be correct.  I promise that 
the above command is EXACTLY what I typed.  As a matter of fact, I just 
copied it from my message and ran it again (the only change being that 
I'm writing MH2.mp4 so I don't overwrite the previous one).  It hasn't 
completed... but it is running right now.

It appears that you're targeting the '-r 23.976' option, but until I 
included that, the frame rate of the file produced was wrong (I don't 
remember what it was... but it was less than 23.976).

> Complete, uncut console output missing.

Sorry for not including that.  I've included it below.

>> But when I play the ffmpeg file, it is
>> visibly jerky, and I'm not sure why.
> Do you mean the quality of the encoded file is not ok?
> Or is real-time decoding not possible?
>
> Carl Eugen
>

I do mean that the quality of the encoded file (ffmpeg) is inferior to 
the PavTube version.

It's a bit hard to describe (and I'm not certain anyone wants me to 
attach a portion of the video).  When I watch the PavTube version, the 
animated motion is smooth.  When I watch the ffmpeg version, it is not 
smooth.  It's almost like a claymation animation where a few frames of 
quick motion and then a few frames of less motion, rather than the 
motion spread out evenly among all the frames, so the motion is jumpy 
instead of smooth.

The sound that goes along with it is fine (no audible skipping or jumping).

Hopefully that clarifies what I'm meaning.

If there's any other information I need to provide, let me know.

==============================================
Output from the above ffmpeg command:

ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
   built with gcc 4.8 (SUSE Linux)
   configuration: --prefix=/usr --libdir=/usr/lib64 
--shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg 
--extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -g' 
--optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -g' 
--disable-htmlpages --enable-pic --disable-stripping --enable-shared 
--disable-static --enable-gpl --disable-openssl --enable-avresample 
--enable-libcdio --enable-gnutls --enable-ladspa --enable-libass 
--enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 
--enable-libfreetype --enable-libgsm --enable-libmp3lame 
--enable-libopenjpeg --enable-libopus --enable-libpulse 
--enable-libspeex --enable-libtheora --enable-libtwolame 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzvbi 
--enable-vaapi --enable-vdpau --enable-libfdk_aac --enable-nonfree 
--enable-libx264 --enable-libx265 --enable-libxvid
   libavutil      55. 78.100 / 55. 78.100
   libavcodec     57.107.100 / 57.107.100
   libavformat    57. 83.100 / 57. 83.100
   libavdevice    57. 10.100 / 57. 10.100
   libavfilter     6.107.100 /  6.107.100
   libavresample   3.  7.  0 /  3.  7.  0
   libswscale      4.  8.100 /  4.  8.100
   libswresample   2.  9.100 /  2.  9.100
   libpostproc    54.  7.100 / 54.  7.100
[h264 @ 0xaa1280] sps_id 1 out of range
[matroska,webm @ 0xa8b380] Could not find codec parameters for stream 4 
(Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[matroska,webm @ 0xa8b380] Could not find codec parameters for stream 5 
(Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[matroska,webm @ 0xa8b380] Could not find codec parameters for stream 6 
(Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[matroska,webm @ 0xa8b380] Could not find codec parameters for stream 7 
(Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
Input #0, matroska,webm, from 'Monster_House_t00.mkv':
   Metadata:
     title           : Monster House
     encoder         : libmakemkv v1.12.2 (1.3.5/1.4.7) x86_64-suse-linux
     creation_time   : 2018-05-11T01:17:27.000000Z
   Duration: 01:30:38.43, start: 0.000000, bitrate: 45333 kb/s
     Chapter #0:0: start 0.000000, end 394.685958
     Metadata:
       title           : Chapter 01
     Chapter #0:1: start 394.685958, end 816.273792
     Metadata:
       title           : Chapter 02
     Chapter #0:2: start 816.273792, end 1005.713042
     Metadata:
       title           : Chapter 03
     Chapter #0:3: start 1005.713042, end 1223.972750
     Metadata:
       title           : Chapter 04
     Chapter #0:4: start 1223.972750, end 1439.646542
     Metadata:
       title           : Chapter 05
     Chapter #0:5: start 1439.646542, end 1596.553292
     Metadata:
       title           : Chapter 06
     Chapter #0:6: start 1596.553292, end 1984.107125
     Metadata:
       title           : Chapter 07
     Chapter #0:7: start 1984.107125, end 2357.396708
     Metadata:
       title           : Chapter 08
     Chapter #0:8: start 2357.396708, end 2781.028250
     Metadata:
       title           : Chapter 09
     Chapter #0:9: start 2781.028250, end 3221.259708
     Metadata:
       title           : Chapter 10
     Chapter #0:10: start 3221.259708, end 3623.411458
     Metadata:
       title           : Chapter 11
     Chapter #0:11: start 3623.411458, end 3940.895292
     Metadata:
       title           : Chapter 12
     Chapter #0:12: start 3940.895292, end 4115.736625
     Metadata:
       title           : Chapter 13
     Chapter #0:13: start 4115.736625, end 4382.836792
     Metadata:
       title           : Chapter 14
     Chapter #0:14: start 4382.836792, end 4615.777833
     Metadata:
       title           : Chapter 15
     Chapter #0:15: start 4615.777833, end 5438.433000
     Metadata:
       title           : Chapter 16
     Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 
1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
     Metadata:
       stereo_mode     : block_lr
       BPS-eng         : 40644284
       DURATION-eng    : 01:30:38.433000000
       NUMBER_OF_FRAMES-eng: 130392
       NUMBER_OF_BYTES-eng: 27630151934
       SOURCE_ID-eng   : 001011
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
     Side data:
       stereo3d: frame alternate
     Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p 
(24 bit) (default)
     Metadata:
       title           : Surround 5.1
       BPS-eng         : 2602518
       DURATION-eng    : 01:30:38.442666666
       NUMBER_OF_FRAMES-eng: 509854
       NUMBER_OF_BYTES-eng: 1769205844
       SOURCE_ID-eng   : 001100
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
     Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 
kb/s
     Metadata:
       title           : Surround 5.1
       BPS-eng         : 1509000
       DURATION-eng    : 01:30:38.442666666
       NUMBER_OF_FRAMES-eng: 509854
       NUMBER_OF_BYTES-eng: 1025826248
       SOURCE_ID-eng   : 001100
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
     Stream #0:3(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
     Metadata:
       title           : Surround 5.1
       BPS-eng         : 448000
       DURATION-eng    : 01:30:38.464000000
       NUMBER_OF_FRAMES-eng: 169952
       NUMBER_OF_BYTES-eng: 304553984
       SOURCE_ID-eng   : 001101
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
     Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
     Metadata:
       BPS-eng         : 25940
       DURATION-eng    : 01:28:11.682229166
       NUMBER_OF_FRAMES-eng: 1976
       NUMBER_OF_BYTES-eng: 17158493
       SOURCE_ID-eng   : 001200
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
       3d-plane-eng    : 0
     Stream #0:5(eng): Subtitle: hdmv_pgs_subtitle
     Metadata:
       BPS-eng         : 32963
       DURATION-eng    : 01:29:35.849645833
       NUMBER_OF_FRAMES-eng: 2929
       NUMBER_OF_BYTES-eng: 22150576
       SOURCE_ID-eng   : 001201
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
       3d-plane-eng    : 0
     Stream #0:6(rus): Subtitle: hdmv_pgs_subtitle
     Metadata:
       BPS-eng         : 262
       DURATION-eng    : 01:09:26.182854166
       NUMBER_OF_FRAMES-eng: 18
       NUMBER_OF_BYTES-eng: 136948
       SOURCE_ID-eng   : 001219
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
       3d-plane-eng    : 0
     Stream #0:7(eng): Subtitle: hdmv_pgs_subtitle
     Metadata:
       BPS-eng         : 66342
       DURATION-eng    : 01:30:13.053479166
       NUMBER_OF_FRAMES-eng: 3120
       NUMBER_OF_BYTES-eng: 44889269
       SOURCE_ID-eng   : 00121A
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
       3d-plane-eng    : 1
Stream mapping:
   Stream #0:0 (h264) -> stereo3d (graph 0)
   stereo3d (graph 0) -> Stream #0:0 (libx264)
   Stream #0:1 -> #0:1 (dts (dca) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x116db40] sps_id 1 out of range
[libx264 @ 0xd09420] using SAR=1/1
[libx264 @ 0xd09420] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2
[libx264 @ 0xd09420] profile High, level 4.1
[libx264 @ 0xd09420] 264 - core 152 - H.264/MPEG-4 AVC codec - Copyleft 
2003-2017 - https://urldefense.proofpoint.com/v2/url?u=http-3A__www.videolan.org_x264.html&d=DwIDaQ&c=pZJPUDQ3SB9JplYbifm4nt2lEVG5pWx2KikqINpWlZM&r=WeUmY2aCwgrEjUlg-w6bx67WMPBxlqtrMUfnBXVCvJ8&m=xvBg9rUVej5sIaw352r5G_F2UZV8lLzRzB-Zvsgwm5k&s=yatxjOw-LDgndXM8UZIWovCiCJDUcGMNflRD_oW7wc4&e= - options: cabac=0 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=24 
lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 
keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr 
mbtree=1 bitrate=15000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 
ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'MH2.mp4':
   Metadata:
     title           : Monster House
     encoder         : Lavf57.83.100
     Chapter #0:0: start 0.000000, end 394.685958
     Metadata:
       title           : Chapter 01
     Chapter #0:1: start 394.685958, end 816.273792
     Metadata:
       title           : Chapter 02
     Chapter #0:2: start 816.273792, end 1005.713042
     Metadata:
       title           : Chapter 03
     Chapter #0:3: start 1005.713042, end 1223.972750
     Metadata:
       title           : Chapter 04
     Chapter #0:4: start 1223.972750, end 1439.646542
     Metadata:
       title           : Chapter 05
     Chapter #0:5: start 1439.646542, end 1596.553292
     Metadata:
       title           : Chapter 06
     Chapter #0:6: start 1596.553292, end 1984.107125
     Metadata:
       title           : Chapter 07
     Chapter #0:7: start 1984.107125, end 2357.396708
     Metadata:
       title           : Chapter 08
     Chapter #0:8: start 2357.396708, end 2781.028250
     Metadata:
       title           : Chapter 09
     Chapter #0:9: start 2781.028250, end 3221.259708
     Metadata:
       title           : Chapter 10
     Chapter #0:10: start 3221.259708, end 3623.411458
     Metadata:
       title           : Chapter 11
     Chapter #0:11: start 3623.411458, end 3940.895292
     Metadata:
       title           : Chapter 12
     Chapter #0:12: start 3940.895292, end 4115.736625
     Metadata:
       title           : Chapter 13
     Chapter #0:13: start 4115.736625, end 4382.836792
     Metadata:
       title           : Chapter 14
     Chapter #0:14: start 4382.836792, end 4615.777833
     Metadata:
       title           : Chapter 15
     Chapter #0:15: start 4615.777833, end 5438.433000
     Metadata:
       title           : Chapter 16
     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 15000 kb/s, 23.98 fps, 11988 tbn, 
23.98 tbc
     Metadata:
       encoder         : Lavc57.107.100 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/15000000 buffer size: 0 vbv_delay: -1
       stereo3d: frame alternate
     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 
5.1(side), fltp (24 bit), 448 kb/s (default)
     Metadata:
       title           : Surround 5.1
       BPS-eng         : 2602518
       DURATION-eng    : 01:30:38.442666666
       NUMBER_OF_FRAMES-eng: 509854
       NUMBER_OF_BYTES-eng: 1769205844
       SOURCE_ID-eng   : 001100
       _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 linux(x64-release)
       _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-11 01:17:27
       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES SOURCE_ID
       encoder         : Lavc57.107.100 aac
[h264 @ 0x1733ae0] sps_id 1 out of range
frame=    3 fps=0.0 q=0.0 size=       0kB time=00:00:00.78 bitrate=   
0.0kbits/sframe=   15 fps= 14 q=0.0 size=       0kB time=00:00:01.27 
bitrate=   0.0kbits/s[h264 @ 0x117a2c0] sps_id 1 out of range
frame=   27 fps= 17 q=0.0 size=       0kB time=00:00:01.81 bitrate=   
0.0kbits/sframe=   39 fps= 19 q=0.0 size=       0kB time=00:00:02.30 
bitrate=   0.0kbits/s[h264 @ 0xea49e0] sps_id 1 out of range

Similar lines to the last couple repeat many times course.



More information about the ffmpeg-user mailing list