Videos getting corrupted

When I move files between my computer and diferent SSD cards, commonly there are videos that are getting corrupted.

$ mpv input_video.mp4
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
[lavf] avformat_open_input() failed
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
[lavf] avformat_open_input() failed
Failed to recognize file format.

Exiting... (Errors when loading file)

With vlc gives similar error.

I have Garuda, with btrfs and cryptsetup. I don't know where the problem is coming from.
Also, I can't recover the videos, I already tried:

ffmpeg -i input_video.mp4 -c:v libx264 -crf 18 -preset slow -c:a copy output_video.mp4

Is anyone else having this problem and know how to solve it?

garuda-inxi

System:
  Kernel: 6.2.13-zen-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/@boot/vmlinuz-linux-zen
    root=UUID=e1adc2d5-7b7d-4266-8e23-555c7e26c364 rw
    [email protected] quiet
    cryptdevice=UUID=7b1ced1a-3ab8-4284-9652-bdd8a1f83892:luks-7b1ced1a-3ab8-4284-9652-bdd8a1f83892
    root=/dev/mapper/luks-7b1ced1a-3ab8-4284-9652-bdd8a1f83892 quiet splash
    rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3 ibt=off
  Desktop: KDE Plasma v: 5.27.4 tk: Qt v: 5.15.9 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Inspiron 5502 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0YWFX8 v: A00 serial: <superuser required> UEFI: Dell
    v: 1.7.1 date: 08/06/2021
Battery:
  ID-1: BAT0 charge: 46.0 Wh (100.0%) condition: 46.0/53.0 Wh (86.8%)
    volts: 15.6 min: 15.0 model: BYD DELL TXD0316 type: Unknown serial: <filter>
    status: full
CPU:
  Info: model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
    process: Intel 10nm family: 6 model-id: 0x8C (140) stepping: 1
    microcode: 0xA6
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 2377 high: 4154 min/max: 400/4700 scaling:
    driver: intel_pstate governor: performance cores: 1: 3879 2: 1700 3: 2124
    4: 2758 5: 4154 6: 1700 7: 1005 8: 1700 bogomips: 27033
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Dell
    driver: i915 v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21
    ports: active: eDP-1 empty: DP-1,HDMI-A-1 bus-ID: 0000:00:02.0
    chip-ID: 8086:9a49 class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce MX350] vendor: Dell driver: nouveau
    v: kernel non-free: 530.xx+ status: current (as of 2023-03) arch: Pascal
    code: GP10x process: TSMC 16nm built: 2016-21 bus-ID: 0000:2b:00.0
    chip-ID: 10de:1c94 class-ID: 0302
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
    bus-ID: 3-6:4 chip-ID: 0c45:671b class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
    compositor: kwin_x11 driver: X: loaded: modesetting,nouveau
    alternate: fbdev,intel,nv,vesa dri: iris,nouveau gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: LG Display 0x05f2 built: 2018 res: 1920x1080
    hz: 60 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 23.0.3 renderer: Mesa Intel Xe Graphics (TGL GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Dell
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3
    chip-ID: 8086:a0c8 class-ID: 0401
  API: ALSA v: k6.2.13-zen-1-zen status: kernel-api with: aoss
    type: oss-emulator tools: N/A
  Server-1: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel bus-ID: 0000:00:14.3
    chip-ID: 8086:a0f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
    driver: btusb v: 0.8 bus-ID: 3-10:5 chip-ID: 8087:0aaa class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b rev: class-ID: 0104
Drives:
  Local Storage: total: 506.07 GiB used: 238.1 GiB (47.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: A-Data
    model: IM2P33F3A NVMe 512GB size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 92103061 temp: 49.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Generic model: SD MMC MS PRO
    size: 29.13 GiB block-size: physical: 512 B logical: 512 B type: SSD
    serial: <filter> rev: 1.00 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 350.57 GiB size: 350.57 GiB (100.00%)
    used: 238.1 GiB (67.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-7b1ced1a-3ab8-4284-9652-bdd8a1f83892
  ID-2: /boot raw-size: 350.57 GiB size: 350.57 GiB (100.00%)
    used: 238.1 GiB (67.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-7b1ced1a-3ab8-4284-9652-bdd8a1f83892
  ID-3: /boot/efi raw-size: 1024 MiB size: 1022 MiB (99.80%)
    used: 380 KiB (0.0%) fs: vfat dev: /dev/nvme0n1p7 maj-min: 259:7
  ID-4: /home raw-size: 350.57 GiB size: 350.57 GiB (100.00%)
    used: 238.1 GiB (67.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-7b1ced1a-3ab8-4284-9652-bdd8a1f83892
  ID-5: /var/log raw-size: 350.57 GiB size: 350.57 GiB (100.00%)
    used: 238.1 GiB (67.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-7b1ced1a-3ab8-4284-9652-bdd8a1f83892
  ID-6: /var/tmp raw-size: 350.57 GiB size: 350.57 GiB (100.00%)
    used: 238.1 GiB (67.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-7b1ced1a-3ab8-4284-9652-bdd8a1f83892
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.35 GiB used: 1.32 GiB (8.6%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 71.0 C mobo: N/A gpu: nouveau temp: 63.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 303 Uptime: 7d 19h 31m wakeups: 15929 Memory: 15.36 GiB
  used: 5.84 GiB (38.0%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 2249 libs: 542 tools: octopi,paru Shell: fish v: 3.6.1 default: Bash
  v: 5.1.16 running-in: kitty inxi: 3.3.26
Garuda (2.6.16-1):
  System install date:     2023-02-18
  Last full system update: 2023-04-28
  Is partially upgraded:   Yes
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       No/Undetected
  Failed units:            

What is your method for moving the files?

I already tried moving from dolphin, mv and rsync. All methods let some files corrupted

I think there is a missing e after don

find. -type f `; do NEWFILE=`echo "$FILE" | sed 's/.mov/_NEW.mov/g'`; qt-faststart "$FILE" $NEWFILE; don

Repair with ffmpeg, are the movie files encrypted too and why, if? :smiley:

1 Like

It seems possible the target SSD is itself corrupted. If it is Btrfs, try to run btrfs check to test.

btrfs check <target device>

It is recommended to unmount the disk first.

2 Likes
$ qt-faststart "input_video.mp4" "input_video_new.mp4"
ftyp          0 24
free         24 405150
mdat     405174 4557430888798830399
last atom in file was not a moov atom

the movie files are not encrypted, just the partitions.

sudo btrfs check /dev/mapper/system
Opening filesystem to check...
Checking filesystem on /dev/mapper/system
UUID: e1adc2d5-7b7d-4266-8e23-555c7e26c364
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 253265580032 bytes used, no error found
total csum bytes: 244451844
total tree bytes: 2001403904
total fs tree bytes: 1593556992
total extent tree bytes: 110329856
btree space waste bytes: 326137521
file data blocks allocated: 18988133277696
referenced 271398707200

Can you explain how you set up this device?

When i was installing Garuda i put the option to encrypt the system.
Then, now I booted from my bootable pendrive with Garuda, opened it:

sudo cryptsetup open /dev/nvme0n1p8 system

I put my password and executed the " sudo btrfs check /dev/mapper/system"

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.