VRD v4.21.2.662a: H264 stream, missing info in the sequence parameter set

Fentropic

Member
Getting this error trying to open an H264 transport stream.

File is a transport stream .TiVo and came from a Premiere running v20.2.2.1.

Hex dump verifies it's a TiVo TS file (bit 5 of byte 7 = 1)

If I download it from the TiVo as a TS, it contains both video and audio and plays fine in WMP (using directshow filters from TiVo Desktop), but I get the above error opening it in VRD.

If I download it from the TiVo as a PS, it only contains audio and no video, but otherwise plays fine (audio) in WMP.

Not a show stopper, more a curiosity. The file originated from my PC (webcast download). I was just trying to roundtrip it through the TiVo and back to see what format it was stored on the TiVo in and if it would TTG and work.

Should be easy to verify as it's a publicly available webcast that you could download to PC, pull to the TiVo using pyTiVo (which sends it as a H264 TS, converting audio AAC to AC3 and dropping subtitles).
 

Dan203

Senior Developer
Staff member
The video is H.264 so only TS will work. PS only works with MPEG-2 video, which is why TiVo added TS in the first place.

As to the problem... They likely have the same issue we do. Some web videos do not contain a frame rate in the H.264 header (aka sequence parameter set) but they do have a frame rate listed in the MP4 or MKV container. When you open these files in VideoReDo we detect the missing frame rate in the header and pull it from the container instead. However TS files don't have that kind of data at the container level. So if you were to then save that file to a TS the resulting file would be invalid and would not reopen in VideoReDo. TiVo seems to be doing something similar. When they convert your web video to a TS they're losing the frame rate and causing the exact same problem. Unfortunately without the frame rate VideoReDo can't process a file so we throw an error.

That being said we were discussing a fix for a similar issue recently, so we may eventually be able to open these files. Although it may be easier to just download the files directly to your PC in their original MP4/MKV format and open them directly in VideoReDo.
 

Pawel

New member
Is it possible to patch header of such h264 file without reconverting it? I tried to use modified ffmpeg but it didn't work.
 

Dan203

Senior Developer
Staff member
tsMuxeR might be able to fix it. It has a way to insert NALs into the H.264 stream during remuxing.
 

Danr

Administrator
Staff member
If your objective is the edit the .TS files in VideoReDo we are exploring a solution for that. Adding the frame rate to the file would also work and may be something we look at as well.
 

Pawel

New member
Thank you for advice but tsMuxeR cannot do it at least for the file I have. No mention that audio is completely out of sync after remux.

Would be fantastic if you could provide a solution within VideoReDo. There are lot of such files coming out of webcasts. Thank you!
 

Dan203

Senior Developer
Staff member
If you save the file as an MP4 with the proper frame rate set in the MP4 container then we can open it. VideoReDo needs the frame rate. If it's not in the sequence header we try to get it from the container, but only certain containers store the frame rate. MP4 and MKV do, TS does not.
 

Pawel

New member
Yes, I know: I used mkv. However, navigation is quite choppy (also in players), and I afraid that after making some cuts the final file may have additional errors. So, I prefer to leave it until a patch is possible.

Anyway, I appreciate your support.
 

Dan203

Senior Developer
Staff member
MP4 is better then MKV for VideoReDo. MKV files use millisecond timestamps (i.e. 1000 ticks per second), which are fine for playback but not high enough resolution for percise navigation. MP4 files use 24MHz timestamps (i.e. 240000 ticks per second) which has plenty of resolution to represent every frame precisely.
 
Top Bottom