I have some locally stored media i was copying between drives and one mkv file gave this error error reading 'video1.mkv': Input/output error and only copied 176/256 MiB; the copied file plays the video only up to a certain point before abruptly closing; I can play the original file fine albeit there is a noticeable hitch at that point but the video plays normally till the end I have tried zipping the file but it fails to zip it I tried copying it using ffmpeg but it also gave the same error I can copy the file in the same directory but trying to copy the copy also gives the same error I tried copying to a variety of different storage drives and it still gave me this error any ideas?

13 points
*

Seems like there’s some bitrot in the middle of the file, and whatever you’re using to play back the original file just skips it and doesn’t care enough to halt playback. You might try looking for ways to restore as much of the file as possible with something like this, assuming the mkv is a unique copy that you can’t get anywhere else.

Edit: I’m also curious if this file lives on an XFS/BTRFS/ZFS filesystem. The reflink property of these filesystems may be the reason that you can copy within the same folder without it throwing an error.

permalink
report
reply
4 points
*

Yes it lives on BTRFS, I tried a few solutions but some gave this Read error Error demuxing input file 0: Input/output error video1.mkv: Input/output error and other things i tried said that i dont have hevc support(Yay Fedora) I might be wasting more time than necessary on the file.so i might just give up

permalink
report
parent
reply
7 points

What are the results of a scrub on the filesystem? I’m not familiar with BTRFS, but use ZFS, and a scrub is where I would start in your shoes.

permalink
report
parent
reply
5 points

I did a scrub and this is what it showed when i ran btrfs scrub status : Duration: 0:17:54 Total to scrub: 63.82GiB Rate: 60.85MiB/s Error summary: read=528 csum=48 Corrected: 570 Uncorrectable: 6 Unverified: 0

permalink
report
parent
reply
5 points

Fair enough. I would at least try to get the damaged file off of the disk so you can potentially fix it later, or just have it available to play in its broken state. For the future you should probably be running monthly BTRFS scrubs to detect bitrot sooner, and potentially you should have some backups or data redundancy so you can repair the bitrot when it’s detected.

permalink
report
parent
reply
2 points

I did a BTRFS scrub on the partiton and this is what came up Duration: 0:17:54 Total to scrub: 63.82GiB Rate: 60.85MiB/s Error summary: read=528 csum=48 Corrected: 570 Uncorrectable: 6 Unverified: 0 I dont know what else to do from here

permalink
report
parent
reply
1 point

Thank you I think i might distro hop considering how many problems fedora is giving me, as for the file; it refuses to budge, i have found another such file within the same set, i might just leave it there for future me.

permalink
report
parent
reply
2 points

i dont have hevc support(Yay Fedora)

Can’t you install RPMFusion codecs and “fix” that?

permalink
report
parent
reply
9 points

It’s very likely that your disk is failing.

dd if=/path/to/file.mkv of=/new/file/path.mkv conv=noerror,sync bs=4k

Should give you a file with just the damaged bits missing.

permalink
report
reply
3 points

Did you try copying it with dd/ddrescue?

permalink
report
reply
1 point

Is the copied file going to a usb? Is the usb fake? Otherwise I’m pretty sure your source is bad. Probably the disk sector if you’re sure the file was at some point complete.

Something like btrfs probably does block cloning or similar so a copy to the same disk probably just points at the same disk blocks as the original.

ffmpeg -v error -i file.avi -f null - 2>error.log

Check the source probably

permalink
report
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.5K

    Monthly active users

  • 6.3K

    Posts

  • 173K

    Comments