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

[Bug]: Preview of MP4 Videos failing to generate with ffmpeg/avconf #42545

Open
5 of 8 tasks
br4yd opened this issue Dec 30, 2023 · 2 comments
Open
5 of 8 tasks

[Bug]: Preview of MP4 Videos failing to generate with ffmpeg/avconf #42545

br4yd opened this issue Dec 30, 2023 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug feature: previews and thumbnails needs review Needs review to determine if still applicable

Comments

@br4yd
Copy link

br4yd commented Dec 30, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

Hello,
when trying to watch a video uploaded by any of my Android devices (Samsung Galaxy S21 FE, Google Pixel 2 XL or Google Pixel 8 Pro (running GrapheneOS)) I'm unable to watch the video. In the overview of Memories and Photos or event the files app I get a preview image. However when clicking on it, I only get sound from the playback but no video. Just a black screen. In addition videos uploaded from an iPhone are playable without any issues.

When doing so I also get an error message in the top right corner telling me to check the protocol because the preview failed. Doing so gives me the following error:

Movie preview generation failed Output: ffmpeg version 6.0.1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r10) 20220924 configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gnutls --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 5. 0.100 / 5. 0.100 libpostproc 57. 1.100 / 57. 1.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f75a2446680] moov atom not found /tmp/oc_tmp_lcmODH: Invalid data found when processing input

This issue makes it impossible for me to use my Nextcloud for my photo and video backup because it's not really usable if I can't watch the videos I've backed up. I hope there's some fix for that.

I also found some related issues that can maybe help to trace this issue.

  • There is Preview of MP4 Videos failing to generate with ffmpeg/avconf if larger than 5MB #1475 which was created in 2016 and closed without any real solution for endusers and hasn't been reopened since then. Someone asked about reopening the issue back in 2021 because of no fix but it is still closed. This indicates for me that this bug happens in some cases since at least 2016 and is not fixed since then (?).
  • I found another issue in another repo Movie preview generation failed previewgenerator#319 but in this persons case it seems like the file was corrupt. I'm not sure if it really was corrupt in this person's case or if it was the way his videos were stored by Android. As OP wrote in the previous issue "If the moov atom is at the beginning of a video, the preview generation works. If the the moov atom is at end of the video, the generation fails." there seem to just be some Android phones that put the moov atom at the end of the video (I'm not an expert in this topic and don't know what it is. I'm just trying to pinpoint the issue to get it to work)
  • There's also an unresolved conversation about this or a related issue with the moov atom that can't be found in the Community Forums at https://help.nextcloud.com/t/thumbnails-video-preview-not-working-for-videos-longer-than-1-second/107295. This one is open and unresolved since 2021.

In #1475 there was also some solution as it seems to change something up in some PHP file but due to AIO running inside Docker I don't want to fiddle around and change any of the files of Nextcloud inside the Docker installation. My goal is not to break anything and it wouldn't be a reasonable approach for me as an enduser to change something inside the code (as it seems) to try to fix this just on my end.

Steps to reproduce

  1. Set up Nextcloud AIO on Debian 12 using Object Storage as primary storage
  2. Install Memories app and add Memories Community App to AIO
  3. Enable hardware encoding, preview generation etc. in the settings of the Memories app (everything should be green for you)
  4. Try to open and play a MP4 video with that moov atom at the end of a video that is larger than 5 MB (which reasonable is not large for an MP4 file nowadays. A 4K60 video is much larger if it's just a few seconds long)
  5. See error message and check protocols to see above mentioned error

Expected behavior

Video should just play as normal

Installation method

Official All-in-One appliance

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "appsallowlist": [],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "28.0.1.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatedirectory": "\/nc-updater",
        "loglevel": "2",
        "app_install_overwrite": [
            "nextcloud-aio",
            "news",
            "integration_homeassistant",
            "checksum",
            "riotchat",
            "memories",
            "facerecognition"
        ],
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": "10485760",
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": "30",
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "http:\/\/nextcloud-aio-imaginary:9000",
        "objectstore": {
            "class": "\\OC\\Files\\ObjectStore\\S3",
            "arguments": {
                "bucket": "***REMOVED SENSITIVE VALUE***",
                "autocreate": true,
                "key": "***REMOVED SENSITIVE VALUE***",
                "secret": "***REMOVED SENSITIVE VALUE***",
                "hostname": "s3.nl-ams.scw.cloud",
                "port": 443,
                "use_ssl": true,
                "region": "nl-ams",
                "sse_c_key": "***REMOVED SENSITIVE VALUE***"
            }
        },
        "default_language": "de",
        "default_locale": "de",
        "default_phone_region": "DE",
        "default_timezone": "Europe\/Berlin",
        "mail_smtpauth": 1,
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "defaultapp": "",
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-musl",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "memories.vod.disable": false,
        "memories.vod.external": true,
        "memories.vod.connect": "nextcloud-aio-memories:47788",
        "memories.vod.vaapi": true,
        "memories.vod.nvenc": true
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - app_api: 1.4.4
  - assistant: 1.0.3
  - bruteforcesettings: 2.8.0
  - calendar: 4.6.1
  - camerarawpreviews: 0.8.4
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - collectives: 2.9.2
  - comments: 1.18.0
  - contacts: 5.5.0
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_antivirus: 5.4.0
  - files_external: 1.20.0
  - files_fulltextsearch: 28.0.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - forms: 4.0.0
  - fulltextsearch: 28.0.0
  - fulltextsearch_elasticsearch: 28.0.0
  - gpxpod: 5.0.14
  - groupfolders: 16.0.1
  - impersonate: 1.15.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - mail: 3.5.0
  - memories: 6.1.5
  - nextcloud-aio: 0.4.0
  - nextcloud_announcements: 1.17.0
  - notes: 4.9.2
  - notifications: 2.16.0
  - notify_push: 0.6.6
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - previewgenerator: 5.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recognize: 6.0.1
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.0
  - riotchat: 0.16.5
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - side_menu: 3.11.2
  - spreed: 18.0.1
  - support: 1.11.0
  - survey_client: 1.16.0
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - tasks: 0.15.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_totp: 10.0.0-beta.2
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - encryption: 2.16.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Mentioned above in my description

Additional info

NONE

@br4yd br4yd added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 30, 2023
@joshtrichards joshtrichards transferred this issue from nextcloud/server Dec 31, 2023
@szaimen
Copy link
Contributor

szaimen commented Jan 2, 2024

Moving back to server since this is either a nextcloud/server bug or pulsejet/memories bug and not one in nextcloud/all-in-one.

Please make sure to also open an issue at pulsejet/memories.

@br4yd
Copy link
Author

br4yd commented Jan 3, 2024

Moving back to server since this is either a nextcloud/server bug or pulsejet/memories bug and not one in nextcloud/all-in-one.

Please make sure to also open an issue at pulsejet/memories.

Thanks! I opened an issue at pulsejet/memories too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug feature: previews and thumbnails needs review Needs review to determine if still applicable
Projects
None yet
Development

No branches or pull requests

3 participants