Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default ffmpeg test pattern - multiple playback issues #5292

Open
Bossett opened this issue Sep 12, 2024 · 2 comments
Open

default ffmpeg test pattern - multiple playback issues #5292

Bossett opened this issue Sep 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Bossett
Copy link
Contributor

Bossett commented Sep 12, 2024

Describe the bug

See https://bsky.app/profile/bossett.social/post/3l3wru4mlxy2j. The ffmpeg testrc pattern in 1920x1080 @ 120fps causes a number of playback issues.

To Reproduce

Generate a test file using ffmpeg mp4 defaults:

ffmpeg -f lavfi -i testsrc=duration=59:size=1920x1080:rate=120 testsrc.mp4

Upload file, and view on mobile (and some other platforms)

Expected behavior

No errors

Screenshots

image

(others in thread)

Details

  • Platform: iOS (others reported)
  • Platform version: 17.6.1
  • App version: 1.91

Additional context

https://bsky.app/profile/bossett.social/post/3l3wssuiaju2i - also resizes slightly when hitting play on web, where it works

https://github.com/user-attachments/assets/a42e6f6d-c356-41a9-a117-1c945526e345 is the video original and media info:

General
Format                      : MPEG-4
Format profile              : Base Media
Codec ID                    : isom (isom/iso2/avc1/mp41)
File size                   : 2.88 MiB
Duration                    : 59 s 0 ms
Overall bit rate            : 409 kb/s
Frame rate                  : 120.000 FPS
Writing application         : Lavf58.64.100

Video
ID                          : 1
Format                      : AVC
Format/Info                 : Advanced Video Codec
Format profile              : High 4:4:4 Predictive@L5.1
Format settings             : CABAC / 4 Ref Frames
Format settings, CABAC      : Yes
Format settings, Reference  : 4 frames
Codec ID                    : avc1
Codec ID/Info               : Advanced Video Coding
Duration                    : 59 s 0 ms
Bit rate                    : 400 kb/s
Width                       : 1 920 pixels
Height                      : 1 080 pixels
Display aspect ratio        : 16:9
Frame rate mode             : Constant
Frame rate                  : 120.000 FPS
Chroma subsampling          : 4:4:4
Bit depth                   : 8 bits
Scan type                   : Progressive
Bits/(Pixel*Frame)          : 0.002
Stream size                 : 2.81 MiB (98%)
Writing library             : x264 core 161 r3027 4121277
Encoding settings           : 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=4 / threads=34 / lookahead_threads=5 / 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=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box     : avcC
@Bossett Bossett added the bug Something isn't working label Sep 12, 2024
@Bossett Bossett changed the title ffmpeg testrc pattern in 1920x1080 @ 120fps causes a number of playback issues default ffmpeg test pattern - multiple playback issues Sep 12, 2024
@Bossett
Copy link
Contributor Author

Bossett commented Sep 12, 2024

Some invesigation - https://bsky.app/profile/bossett.social/post/3l3y5yjp6v22q plays on the phone.

The only difference is chroma subsampling - the new image is 4:2:0 and the original is 4:4:4

mediainfo of working file:

General
Format                      : MPEG-4
Format profile              : Base Media
Codec ID                    : isom (isom/iso2/avc1/mp41)
File size                   : 3.22 MiB
Duration                    : 59 s 0 ms
Overall bit rate            : 457 kb/s
Frame rate                  : 120.000 FPS
Writing application         : Lavf58.64.100

Video
ID                          : 1
Format                      : AVC
Format/Info                 : Advanced Video Codec
Format profile              : High@L5.1
Format settings             : CABAC / 4 Ref Frames
Format settings, CABAC      : Yes
Format settings, Reference  : 4 frames
Codec ID                    : avc1
Codec ID/Info               : Advanced Video Coding
Duration                    : 59 s 0 ms
Bit rate                    : 448 kb/s
Width                       : 1 920 pixels
Height                      : 1 080 pixels
Display aspect ratio        : 16:9
Frame rate mode             : Constant
Frame rate                  : 120.000 FPS
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 8 bits
Scan type                   : Progressive
Bits/(Pixel*Frame)          : 0.002
Stream size                 : 3.15 MiB (98%)
Writing library             : x264 core 161 r3027 4121277
Encoding settings           : 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=34 / lookahead_threads=5 / 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=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box     : avcC

working file: https://github.com/user-attachments/assets/5dceff32-53f5-4d08-a303-af45ab1d3c62
generated with: ffmpeg -f lavfi -i testsrc=duration=59:size=1920x1080:rate=120 -pix_fmt yuv420p yuv420p.mp4

suggest the fix here is just to force 4:2:0 in the processing step to maximise compatibility

@Bossett
Copy link
Contributor Author

Bossett commented Sep 13, 2024

https://bsky.app/profile/bossett.social/post/3l3zhoecfp22q - appears now fixed, this is ffmpeg -f lavfi -i testsrc=duration=58:size=1920x1080:rate=120 testsrc5.mp4 and working on iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant