Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th December 2023, 23:06   #1  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,221
Corrupted files from a Sony Camera (UHD 29.970p BT2020 HLG)

Hi there,
JR, one of my colleagues, was out and about shooting stuff for fun in his spare time with his Sony and unfortunately they got corrupted.
Allegedly they're 3840x2160 29.970p 4:2:2 BT2020 HLG 10bit planar files encoded as H.264 Intra Level 5.2 with PCM 24bit 48'000Hz audio muxed as .mp4

It looks like Sony saves them internally as .rsv and then only muxes them into a right container, .mxf, at the end, when the file is effectively "closed" so what you have here are the .RSV files Link

Do you guys see any chance of recovery?
The mediainfo clearly says that the file is truncated and from an hex dump things don't look that good...

Last edited by FranceBB; 18th December 2023 at 10:14.
FranceBB is offline   Reply With Quote
Old 15th December 2023, 23:51   #2  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 452
Are C1799.RSV and C1809.RSV supposed to be completely empty?
wswartzendruber is offline   Reply With Quote
Old 16th December 2023, 17:30   #3  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,221
Those two are gone forever I'm afraid as they're quite literally impossible to copy from the memory card...
The other two have a certain file size but are nonetheless impossible to decode.
Indexing doesn't work, remuxing to mkv doesn't work (the file is remuxed with bogus info).
I think the only thing that *can* be done is taking one good file from the same camera with the same setting, copy the header and put it in the corrupted files and hope for the best.

I've asked JR for another good sample of his camera.
FranceBB is offline   Reply With Quote
Old 16th December 2023, 17:57   #4  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 452
Quote:
Originally Posted by FranceBB View Post
I think the only thing that *can* be done is taking one good file from the same camera with the same setting, copy the header and put it in the corrupted files and hope for the best.

I've asked JR for another good sample of his camera.
Yes, I concluded the same. At least for MP4 files shot on a Sony camera. I'm not sure of the distinction between MP4 and RSV, though.
wswartzendruber is offline   Reply With Quote
Old 16th December 2023, 23:24   #5  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 780
Try photorec, that's the best recovery tool i've used (and it's free), it look for mp4, mov formats like that though. You'll have to experiment and report back
Mounir is offline   Reply With Quote
Old 17th December 2023, 16:57   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,165
+1 on PhotoRec [a more specific version of TestDisk media recovery tool]:- https://www.cgsecurity.org/wiki/PhotoRec
EDIT: For file recovery, but not file damage repair.

TestDisk:- https://www.cgsecurity.org/wiki/TestDisk
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 17th December 2023 at 17:05.
StainlessS is offline   Reply With Quote
Old 18th December 2023, 10:35   #7  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,221
Well PhotoRec managed to recover the missing two files, however that doesn't help with the recovery.

After a few attempts transplanting stuff and writing random info to make the container work, this is as far as I've got:






Reconstructed: Link (link valid for 7 days)


Then I've got the good samples from JR and I tried swapping the header with the one of some good files.
Those are the good files I used to swap the header, though: Link


however the results are not what I expected:



I used recover_mp4 like so:

Code:
recover_mp4.exe "Z:\zzz_scambio\0000 INGEST\JR\header_good\stesse_spec_C1795.MP4" --analyze

recover_mp4.exe "Z:\zzz_scambio\0000 INGEST\JR\C1795.RSV" "Z:\zzz_scambio\0000 INGEST\JR\C1795_recontructed_v2.mp4"

pause
Mediainfo looks good, though, so I'm a bit puzzled:

Quote:
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:2:2@L5.1
Format settings : CABAC / 2 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 2 frames
Bit rate mode : Variable
Maximum bit rate : 140 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : HLG
Matrix coefficients : BT.2020 non-constant

Header Transplanted but somehow failed: Link

If someone wants to try to get something better out of it, go for it.

Last edited by FranceBB; 18th December 2023 at 10:37.
FranceBB is offline   Reply With Quote
Old 20th December 2023, 20:37   #8  |  Link
richardpl
Guest
 
Posts: n/a
I have alpha-state RSV demuxer for Librempeg. I struggle to find any info about layout of kkad/rtmd chunk that also store exif like metadata.
Huge boost would be if someone from Sony gives more info about such layout, (rtmd chunk is also present in normal mp4 sony files).
It looks like it intentionally discards/does not store actual extradata feed to video decoder in RSV files, and that data needs to be recreated copied from working mp4 files of same specifications.
There is some info that some Sonny utility named like *something Browser *something have support for reading and parsing such metadata. So it would be helpful to get such binary in some form.
  Reply With Quote
Old 20th December 2023, 23:41   #9  |  Link
wswartzendruber
hlg-tools Maintainer
 
wswartzendruber's Avatar
 
Join Date: Feb 2008
Posts: 452
What I don't understand is...who in blazes would ever make a stream writer work like this? I mean...the camera knows the resolution, frame rate, transfer function, colorspace, etc. of the video it's recording...and this isn't going to change mid-stream so........

Oh well. I'm in the market for a camera, but at least now I know it's not going to be a Sony.
wswartzendruber is offline   Reply With Quote
Old 1st April 2025, 21:53   #10  |  Link
jenny
Registered User
 
Join Date: Feb 2025
Posts: 6
It sounds like the files got interrupted before the camera could finalize and properly mux them, which often leaves you with raw .RSV data that lacks essential headers. Even though they look pretty broken in a hex dump and MediaInfo flags them as truncated, there's still a chance the video and audio data inside is recoverable — especially since they were recorded in high-quality intra-frame H.264. You might want to try CleverFiles Video Repair https://repair.cleverfiles.com/. It’s built to recover unfinalized or corrupted video files like this, especially when you have the original raw data. It works better if you can provide a sample of a working file recorded with the same settings, which helps the tool reconstruct the damaged one.

Last edited by jenny; 30th April 2025 at 13:22.
jenny is offline   Reply With Quote
Old 2nd April 2025, 12:22   #11  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,221
Quote:
Originally Posted by jenny View Post
were you able to recover those files?
yes, transplanting the header from a good file allowed me to play the file as well as index it and re-encode it, so it kinda worked, however keep in mind that not all slices were decodable as the video was actually truly corrupted.
FranceBB is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.