".media"-files of a surveillance camera

Hello - I am new here. usually I use shotcut to manipulate the videos of my YT-channel at a low level.

I am owner of a surveillance camera (denver) and this stores “.media” -files on SD. 26 of these files are in a subfolder and additionally a file called “.info”.

BUT you cannot - as I understood correctly- view these video files on a PC.
VLC- no way. The denver hotline : “It’s not possible to view them on PC”.
And I did not find any software (what is IMO easy to understand- how to search on the internet the string “.media”…).

But I tried to put it into shotcut- and shotcut immediately converts the files to mp4 to handle them. Thank you, developer!

What is missing is the sound. OK- it is not so important, but maybe here ist anybody who knows how it works.
And furthermore it nerves to convert these clips with a length of about 5 seconds.

Does have anybody here experience with this strange format?
If needed- I can upload such a file- it’s about 1,3 MB.

I’m m sure some people would be interested to take a look at your file. You can upload it to this forum, or share a link to a file sharing site like google drive.

This sounds like the NHNT format. If you upload a .media file, please include the .info file as well. This format is based on MPEG-4, which means configuration data has to go in a separate stream (.info in this case) rather than the media stream. It takes both to decode everything.

Another complication is that there is only one stream per .media file. Video would be in one, and audio would be in another one, and a player would have to know how to match two of them together and play them at the same time. We might need the whole directory (or a clean SD card that has a single surveillance clip recorded to it) to identify the scheme that links media files together.

If this feels janky… it is. Super old tech.

The NHNT format for anyone following along:

http://wiki.gpac.io/xmlformats/NHNT-Format/

1 Like

I had problems to upload this file directly therefore I send it as a zip.
File nanemes in this directory are 0013.media, 0025.media, 0037.media and 0049.media - and this .info file.
1722961145_0000.zip (941.8 KB)

Looks like a video-only file to me. Only one stream in it. The .info file suggests only one codec as well (for video, none for audio). Perhaps the audio is in a separate .media file. Or the camera doesn’t record audio locally, it only sends it to a cloud provider. Some security cameras do that, for whatever reason. We know for sure this camera records audio?

If you click on the “More Information…” option in the Properties Panel, you can see the FFProbe output:

ffprobe output

[streams.stream.0]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=Main
codec_type=video
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=1280
height=720
coded_width=1280
coded_height=720
closed_captions=0
film_grain=0
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuv420p
level=40
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=left
field_order=progressive
refs=1
is_avc=false
nal_length_size=0
id=N/A
r_frame_rate=40/1
avg_frame_rate=25/1
time_base=1/1200000
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
extradata_size=37

[streams.stream.0.disposition]
default=0
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
timed_thumbnails=0
non_diegetic=0
captions=0
descriptions=0
metadata=0
dependent=0
still_image=0

[format]
filename=C:/Users/Owner/Downloads/1722961145_0000/0037.media
nb_streams=1
nb_programs=0
nb_stream_groups=0
format_name=h264
format_long_name=raw H.264 video
start_time=N/A
duration=N/A
size=1.053408 Mibyte
bit_rate=N/A
probe_score=51
Completed successfully in 00:00:00

This file is just raw H.264 video with no container.

Yes- when you play recorded Videos on mobile there ist sound.
And on SD-Card there is only the files I explained- nothing else.
nevertheless I will check it out again- I hope I have time today:

They told me a complicated way to transfer these Videos.

Rename it from 0037.media to 0037.mp4
It is a AVC-Video without Audio.

I think this cannot be:
Because the “exported files” have sound. The noise is the motor of the cam.
And I did not find any any sound files on SD.
The way to “export” in this “tuya” software is to go to the recorded part and then maybe there is a screenrecord which is exported.
From the rear through the knee…

Next: when I obpen such a littlefile in Shotcut shotcus says that it cannt read correchtly an tthen there is an automatic conversion (3 qualities are possible).

Shotcut requires “constant framerate”. Your camera delivers “variable framerate”. Hence the conversion.
aus: MediaInfo
/ media-Dateien einer Uberwachungskamera - HilfeWie - Shotcut For.mp4
Format : MPEG-4
Video
Format : AVC
Duration : 4 s 450 ms
Bit rate : 438 kb/s
Height : 720 pixels
Frame rate mode : Variable
Frame rate : 10.115 FPS
Minimum frame rate : 4.098 FPS
Audio
Format AAC LC
Channel(s) : 1 channel
Sampling rate: 8 000 Hz
Frame rate : 7.812 FPS (1024 SPF)

Hello and thank you
What I forgot to say is that the automatic shotcut-conversion blows up the singe files with about the factor 15.
media-file 1.275.015 byte
mp4-file 16.874.487 byte
Is this is because of variable framerate?
Or does shotcut put a container around the the file?


My question is: Is it possible to avoid these little files?
Is it possible to put all files of one directory together and put them maybe into one container?
I’ll try and tell you my experience.


OK- it works: One can concatenate simply by command
type 00*.* > zzz.media
and (see above): when exported in shotcut filesize is reduced by factor 10 relative to the automatically generated file.
There is only one question: where the h.ll ist the sound?
I will dig the SD-Card again.

Thank you
Hermann

There might actually be audio in there after all. Tuya claims to store video and audio in a proprietary format, with future support for MP4 (which would be great). What this probably means is that they have stuffed audio data into the in-band headers of an H.264 stream. For something like FFmpeg to play this, it may involve the extract bitstream filter to turn the in-band data into out-of-band data that can be saved as extradata to a file. Then remux the audio and video together. To make things more fun, a folder represents a continuous clip of up to 600 seconds, with each media file inside representing only a few seconds, and the multiple files have to be stitched in proper order to reconstruct the full clip.

From an embedded systems perspective, I understand why they do the fragmented clips. From a business perspective, I get why they use a dumb ancient format for its lower licensing fees and hardware cost. From a consumer perspective… it’s pretty awful unfortunately.

Here is the Tuya developer page explaining parts of their proprietary format:

The automatically generated file is created at very high quality settings to avoid generational loss during export. A converted clip is re-encoded a minimum of twice (conversion plus final export). Its quality settings are much higher than final export settings so the quality doesn’t degrade along the way.

This topic was automatically closed after 90 days. New replies are no longer allowed.