-->
保存您的免费座位流媒体连接今年八月. 现在注册!

准备恢复的时间是在视频文件丢失之前

文章特色图片

今年早些时候, one of my clients messaged me with an urgent issue: The person had accidentally deleted a server-side recording of a live sporting event from the previous evening. 当他发出消息的时候, 几个小时已经过去了, and other live events had continued to stream and record to the same server. (这是一个重要的细节,我将会回来讨论.他想知道我能否帮忙找回丢失的录音. 我已经为这个客户机构建了一个事件后转码管道, and he had access to the shared network file system (NFS) from which the transcoder server would pull source recordings. 他希望我能“弥补”这个错误.

While I wasn’t able to recover that specific recording from the NFS (or from any other temporary volume used in the transfer process for postprocessing), 我确实重新发现了文件恢复的各种方法, 专门针对视频文件. I was amazed at how much material was recovered by open source tools, fully intact and playable. 作为那次经历的结果, I’m going to provide two sets of recommendations for others who may need to solve this same dilemma.

当您不小心删除远程视频文件时该怎么办

If you delete a remote video file that you still need, I recommend taking these five steps:

  1. Immediately stop all write activity to the volume where the file was stored. This means you need to stop any process on the server that could be writing more data to the same volume, 可能会覆盖丢失文件的位. If you’re trying to recover a file on a media server that is still streaming live video, you may need to wait until your other event(s) have finished in order to shut down the media server.
  2. Download and/or purchase a file recovery product and run its recovery scan as soon as possible. If you are attempting recovery on a Linux system, you can try Foremost,一个开源工具. (你可以 阅读关于最重要的教程.) Here’s a command that looks for MP4 and MOV files on /dev/disk1s1 and saves recovered files on a separate volume, /dev/disk4s2:首要-t mp4,Mov /dev/disk1s1 -o /dev/disk4s2
  3. Copy the recovered data to your local computer so you have a duplicate of it and you can run further tools on the recovered video file, 如果有必要的话.
  4. 检查每个文件的可玩性和内容. Recovered files don’t usually have the same filename as the original file that was deleted, so you won’t have an easy way to identify a specific file among several other recovered video files. 如果您无法打开或播放恢复的文件, put that file into its own folder/directory on your computer for the next step. If you were able to find your lost file and it worked as expected during playback, thank the video gods and celebrate that you get to be the hero in this story. However, if you weren’t able to find your file among playable ones but found nonplayable files, 还有希望.
  5. 如果你有不可播放的恢复文件, you can use video repair software to attempt full or partial playback. 我用得最多的软件是 Untrunc,一个开源工具. This tool (and several other licensed products easily found with a Google search) usually wants a reference file to compare to the damaged file. 在我当事人丢失录音的案子中, we located a similar recording made by the media server with the same publish settings (dimensions, 帧率, 比特率)作为丢失的记录. To date, 我只能用Untrunc恢复部分录音, but it can often recover audio portions that are more intact than the video portions.

你能做些什么来避免未来的文件丢失

If you haven’t lost any files yet, don’t count on luck to continue your streak. 采取以下步骤首先避免文件丢失:

  1. Build redundancy into as many components of your video pipeline as possible, 从现场录音到远程服务器录音. If you rely on outsourced vendors, make sure they’re providing redundancy.
  2. If you make long live recordings, configure your recorder to segment the files based on time. While many systems allow you to record a live stream into one file, 任何小问题都可能破坏整个数据流. If you use segments, then any corruption can be isolated to one particular segment.
  3. 在编码过程中创建文件副本, backing up the source file to a local cache folder for the encoder to use while keeping the original source location intact. If possible, create copies of files on different disks or partitions from the original location.
  4. Build restrictions into your pipeline to prohibit manual interventions by your organization’s staff. 在我的例子中, a project manager was able to access the remote file system directly and delete the source file that was being used during a transcode process.
  5. Have recovery tools pre-installed on any systems that read/write your video files.
  6. Back up video files to a cloud storage service such as Amazon AWS S3.

I hope you don’t find yourself in need of video file recovery in the future, 但如果你这么做了, keep calm and proceed as quickly as possible to retrieve the bits that can be found. The longer you wait, the less likely it is that the entire video will be recoverable and playable.

[本文发表于2018年6月号的。 流媒体杂志 而是“为恢复做好准备”."]

相关文章

项目经理对于任何视频开发项目都是必不可少的

It's a thankless job, but PMs keep projects moving forward in a thousand ways. When projects don't have a PM, things can get seriously out of whack.

视频:大规模直播流中冗余的投资回报率

Verizon's Joe Einstein and Right Brain Media's Deke Cooper discuss redundancy best practices they've used for webcasts that are too big to fail, 比如格莱美奖, 奥斯卡颁奖典礼, 和大师们.

为实时编码和交付添加冗余的最佳实践

Learn the best practices for reacting and responding in real-time to issues in an encoding and delivery workflow to ensure a seamless experience for viewers.

提及的公司及供应商