VRD 5.1.2.737 doesn't copy Beyond TV metadata when saving MP4 files

stevehiner

New member
When I edit MPG, TP and TS files it copies the Beyond TV metadata but I recently found out that it doesn't maintain that data when working with MP4 files. The new file appears to be completely missing the metadata (looked at it with a hex editor).
 

Dan203

Senior Developer
Staff member
Does Beyond TV actually record in the MP4 format now? Or are you just converting from TP/TS to MP4?
 

stevehiner

New member
It doesn't, MP4 is one of the target formats for compression.

Since posting that I found that BeyondTV won't play the file VRD saved. It tells me the file is corrupt. The file will play in VLC though. Note that BeyondTV doesn't require that metadata in order to play a file so there must be something else about the file that it doesn't like. Any ideas?
 

Dan203

Senior Developer
Staff member
They have their own built in compression? When you use it to convert to MP4 it retains the metadata? If so we would need to get a sample file with the data to see how it saves it so we can replicate it. (if possible)

As for the file not playing... When saving click options, then advanced, then in the MP4 options section change the "Leaves SPS/PPS in H.264 video frames" to no and change the "Move MOOV atom to start of file" to no as well. I think that should make the file playable for you.

If not there may be profil/level or bitrate limits they impose on MP4s which is why they only allow it as a compressed format and not an original recording format.
 

stevehiner

New member
Yes, they can compress to MP4, DIVX or WMV but I think MP4 is the only one VRD supports so that's what I use. I don't think they wrote it themselves though, I think they licensed it because it was a paid add-on.

The sample file with metadata that I have with me is about 1.2GB. I could record something a lot smaller if you'd like or I can upload this one.

On the subject of BTV metadata, would you be willing to share any info you have reverse engineered about how to find it? I wrote a powershell script that I use to extract the data. It's what I use to catch those rare times when VRD fails to copy the data. It's pretty cludgey and I'm wondering if you found a better way to locate the data in the file.
 

darucla23

Member
I'm sure somebody more authoritative will be along to confirm, but FYI, VRD5 can open almost any file, including DIVX and WMV, although it can only output H264 or MPEG2 (WMV can contain either of these formats, and VRD5 can output WMV files).
 

stevehiner

New member
Dan,

I have a few sample MP4 files created in BeyondTV to give to you. The best of the 3 is also the smallest but you can have all 3 if you want. They are 51MB, 309MB and 938MB.

I saved an MP4 file with the options changes you suggested and it still will not play in Beyond TV. Same error, it says the file is missing or corrupted.

Thank you SO much for looking into this for me. I'm ever grateful for the fact that VRD supports Beyond TV.
 

stevehiner

New member
I uploaded the file on Friday.

Also:
When saving click options, then advanced, then in the MP4 options section change the "Leaves SPS/PPS in H.264 video frames" to no and change the "Move MOOV atom to start of file" to no as well.
Did not fix the issue in BeyondTV. It still tells me the file is corrupt. Maybe the MP4 I sent you will give you some clues as to what BeyondTV thinks an MP4 should look like.

Thanks again for looking into these issues. :-D
 

Dan203

Senior Developer
Staff member
OK they appear to be copying the metadata over to standard ID3 tags. We do not have a way to do that. The metadata in Beyond TV files is not something we actually know how to parse. We just copy the bits over when saving as TS. And even if we could parse the metadata we don't currently have a way to translate different types of data to different formats. It's strictly pass through.

As for playing a converted file on your DVR... That file has very low specs. It's resolution is only 640x480, it's using Baseline/Level 3, and it only has 2ch AAC audio. Any of those things could be the difference. The first thing I would try is just forcing the audio to 2ch AAC. If that doesn't work try using the "iPhone 3G/iPod" profile. That's the closest one we have that matches the specs on the file you sent.
 

stevehiner

New member
Ok, thanks for looking into it. I'll see if I can find a reliable way to extract the tags from the original file and insert them into the MP4's ID3 tags. This probably just means that for any files I intend to edit I need to do it with the tp/ts file and then let BTV compress it.

I'm surprised that the MP4 was that low rez. I certainly don't intend for BTV to be lowering the resolution. It's possible that the channel I recorded was broadcasting a low rez signal so BTV just maintained that. I'll play with the settings as you suggest and see if I can find a combination that makes BTV happy. Then again, if I can't get the metadata into the new file it might not matter to me if BTV can play it.

I thought VRD avoided changing anything about the file so would it have changed something about this MP4 that would make BTV not like it? Seems like if it didn't change the resolution or audio encoding then the file should still work. I shouldn't have to reduce the resolution since BTV can play the original file. Does that make sense?

I really appreciate the time you spent looking into this.
 
Last edited:

stevehiner

New member
That file has very low specs. It's resolution is only 640x480, it's using Baseline/Level 3, and it only has 2ch AAC audio.
That might have been an atypical recording. I'm looking at the specs of the MP4 I was originally trying to edit and it's resolution is 1280x720 and it's at Baseline/4.0. It does also have 2 channel AAC.

I'll try a few different exports to find out which one works.



File: Name : I:\The Last Man on Earth-(The Do-Over; Pranks for Nothin')-2015-04-12-0.mp4
Size : 1.304 GB
Duration : 01:03:56.02
Mux type : MP4
Video: Encoding : H.264
VideoStreamID : x201
Frame rate : 29.97 fps
Encoding size : 1280 x 720
Aspect ratio : 16:9
Header bit rate : 20.000 Mbps
VBV buffer : 380 KBytes
Profile : Baseline/4.0
Progressive : Progressive
Chroma : 4:2:0
Entropy mode : CAVLC
Bit rate : 2.611 Mbps
Captioning : None found
Audio Stream: 1 (Primary) Codec : AAC
Format : RAW
Channels : 2.0
Language : eng
PID : x202
PES Stream Id : xC0
Sampling rate : 48000
 

Dan203

Senior Developer
Staff member
Ok, thanks for looking into it. I'll see if I can find a reliable way to extract the tags from the original file and insert them into the MP4's ID3 tags. This probably just means that for any files I intend to edit I need to do it with the tp/ts file and then let BTV compress it.

I'm surprised that the MP4 was that low rez. I certainly don't intend for BTV to be lowering the resolution. It's possible that the channel I recorded was broadcasting a low rez signal so BTV just maintained that. I'll play with the settings as you suggest and see if I can find a combination that makes BTV happy. Then again, if I can't get the metadata into the new file it might not matter to me if BTV can play it.

I thought VRD avoided changing anything about the file so would it have changed something about this MP4 that would make BTV not like it? Seems like if it didn't change the resolution or audio encoding then the file should still work. I shouldn't have to reduce the resolution since BTV can play the original file. Does that make sense?

I really appreciate the time you spent looking into this.
Unfortunately even if you have BeyondTV compress it you will still lose the metadata if you edit with VideoReDo. We do not currently support MP4 metadata at all, even for pass through, sorry.
 

dlflannery

Moderator
VAP, link in signature, will insert metadata into VRD .mp4 output files. It reads metadata from input files (.mp4, .wtv or .tivo) and also attempts to get metadata for TV series episodes from theTVDB.com. It can also parse metadata items from input file names based on a user-defined template.

Post in the VAP subforum here for questions and help.
 

stevehiner

New member
Unfortunately even if you have BeyondTV compress it you will still lose the metadata if you edit with VideoReDo. We do not currently support MP4 metadata at all, even for pass through, sorry.
I can work around that but do you have any idea why it won't even play in BTV? I tried your suggestions but they didn't fix it. I could send you two example files, one directly from BTV that does work and one post-editing from VRD that does not work. I have downloaded numerous MP4 files for things like TED talks and they play fine in BTV. I have edited MP4 files in the past with VRD and they still played in BTV but they might not have originally come from BTV, they might have been files I downloaded.
 

Dan203

Senior Developer
Staff member
I can work around that but do you have any idea why it won't even play in BTV? I tried your suggestions but they didn't fix it. I could send you two example files, one directly from BTV that does work and one post-editing from VRD that does not work. I have downloaded numerous MP4 files for things like TED talks and they play fine in BTV. I have edited MP4 files in the past with VRD and they still played in BTV but they might not have originally come from BTV, they might have been files I downloaded.
Did you try the iPhone profile? If not try that. That will tell us if it's the original video causing the problem or the muxer.
 

stevehiner

New member
I had forgotten to try the iPhone profile. I did that this weekend and that version will play in Beyond TV. It upscaled the video to 1080p and dramatically increased the size and processing time of the output MP4 but BTV was able to play it (sans metadata of course but I can solve that a different way).
 

stevehiner

New member
I cloned the iPhone 1080p and iPhone 720p profiles. Then I changed the copy to use intelligent recoding rather than forcing the recode. I saved the Beyond TV video using the 720p profile (since my source was 720p) and the file plays fine in Beyond TV. There must be some difference between how the iPhone profiles handle video an how the default MP4 profile handles video that breaks it in Beyond TV. I know for sure that I have edited MP4 videos in the past with VRD and they still played in Beyond TV but it's possible that those videos did not originate from Beyond TV so maybe that has something to do with it.
 

Dan203

Senior Developer
Staff member
OK so if you changed it to intelligent and it still worked then it's not the video. There are a few MP4 settings that are different between the iPhone and MP4 profiles, I bet one of them is the culprit. Check the advanced section of the profile, there are 3 MP4 options...

Move MOOV atom to start of file
Leave SPS/PPS in H.264 frames
MP4 mux format

For the standard MP4 profile those are set to

Yes
Yes
Generic

for iPhone they're set to

No
No
iPhone

I'd try enabling those one by one and see which one makes the difference.

It's also possible it's the audio. The iPhone profile recodes audio to 2ch AAC, while the default MP4 leaves it alone. That could be something to try as well.
 

stevehiner

New member
It turns out it's the Mux Format that breaks BTV playback. Generic does not work but iPod works. I'm trying out PSP and Mov mux to see if they work for BTV.

Any advantage/disadvantage to any of them?
 
Top Bottom