Hello everybody, I usually record TV with my SAT-PVR receiver and then I export the recordings from the PVR's disk to the PC.
The utility to extract the recordings from the PVR, saves Audio and Video streams separately as ES Video (M2V) and ES Audio (MP2 or AC3) or even PES Audio (MPP).
Usually, when I multiplex the Elementary Streams together, I can get perfect A/V synchronization, and when I open the ES Video with an MPEG editor I can see its full timeline.
However I can't get synchronization on multiplexing the streams coming out from certain channels.
More over, if I open the video streams coming out from these channels, I can't get their full timeline, but only 2 frames from the start of the video and 1 frame from its end.
Demuxing the streams with ProjectX, then I can see the full timeline, but I can't put in sync the A/V streams.
I tried to examine these Video file with "Dr M" a nice utility of M2-Edit, and I obtained this message:
* A GOP timecode was repeated (00:00:00:00)
I know that many multiplex tools use the GOP timecode to synchronize the streams, and maybe this could give out the A/V desynchronization.
What do you think about?
Is there any way to fix the problem and get the original GOP timecode of the stream?
Is there any tool to multiplex the streams using only PTS values?
+ Reply to Thread
Results 1 to 9 of 9
-
-
I just tested ReStream.
It rewrites the GOP timecode of the ES Video.
In fact I can navigate its timeline.
However the desynchronization on muxing with audio still remains.
I also tested ReStream with an ES Video file that already had got GOP timecode and a perfect synchronization on muxing with ES Asudio.
The new file coming out from ReStream still keeps his perfect synchronization with the audio file and still shows the correct value under the field "First-GOP timestamp" (6h 6m 31s 17f for example).
At the contrary, the "bad" ES Video always shows the value: 0h 0m 0s 0f.
So I think the real GOP-timecode is missing at all;
and rewriting a "fake" timecode doen't give out good results...
I know that streams without any GOP headers and timecode are legal in MPEG-2.
So maybe the GOP timecode is not sent by the DVB provider...
Because if there was a bug in the extraction utility, I think no recordered ES Video had got the GOP timecode.
However if I play the recording on the PVR it works perfectly.
So how does the PVR synchronize the streams?
Does it make synchronization by using the PTS values?
Is it possible to do the same with the extracted Elementary Streams?
However I've got the source code of the extraction utility.
I also can create a few MB image of the PVR's disk that is readable by the utility. -
What sort of sync problem are you having ? Is is drifting in and out, or out by a constant amount ?
A constant difference is simple - just add or subtract a delay to the audio and your problem is solved.
I know that an occasional glitch in our FTA DBVS can cause sync issues, however editing out commercials seems to fix the issue from the edit point onwards. So I just have to find the point where the audio goes out, and drop a quick cut straight after using Womble. Not even remove a frame, just drop in an edit. Outputting the new stream seems to fix the problem.Read my blog here.
-
I use Audio GAP correction, because the A/V delay is constant.
But often it's a bit difficult to find the right value, especially for dubbed films...
I think the best way to synchronize the streams, would be to try extracting the PES Video and then demultiplex it together with PES Audio, by using ProjectX.
In fact only the PES packets contain the PTS values.
So I'll try to modify the source code of the extraction utility... -
I took a look at the .hex image of the PVR's disk I've dumped, and I found:
ES Video Header: 0x00 0x00 0x01 0xB3
PES Audio header: 0x00 0x00 0x01 (0xC0 - 0xDF) - usually 0xC0
but I couldn't find the PES Video Header: 0x00 0x00 0x01 (0xE0 - 0xEF)
So I really can't understand how the PVR synchronizes the PES Audio with the ES Video, when it plays the recordings...
Can anybody, who has experience in MPEG, give me his opinion, please? -
Hi
I don't know much about your mentioned time codes but have you tried to use freeware pvastrumento instead of projectx?
Regards
Sektionschef -
Originally Posted by sektionschef
-
Originally Posted by sektionschef
I took another look at the .hex image of the PVR's and I found the SyncWord (0x41 0x56) of the AV packet's header, typical of the PVA format.
So I think the recording format is similar to the PVA standard.
The PVR has got a DSP chipset: "TMX320AV7110GFN AD 18ZBNH3".
However, according to PVA specifications released by TechnoTrend AG, the stream seems to be a non standard revision of PVA.
As described in this document (http://neuron2.net/library/PVA_format_v1.pdf):
"...The PVA format is near to the TMS320AV7110's on-chip MPEG-2 Video and Audio decoder input fuffer format..."
So I compared the streams recorded (approximately at the same time) from my SAT-PVR receiver and from a SAT-PCI card:
- the 1st from my SAT-PVR receiver:
obviously at the beginning we can find some informations used by the PVR itself.
here is the dump: http://rapidshare.com/files/50092431/RaiSportSat.mmr.html
- the 2nd from a SAT-PCI card:
this is a standard PVA format: http://rapidshare.com/files/50092820/RaiSportSat.pva.html
For example I found the same video stream in the two files at these addresses:
RaiSportSat.mmr: 0x00113C6C
RaiSportSat.pva: 0x00056610
Two different bytes at addresses:
RaiSportSat.mmr: 0x00113CD3 and 0x00113CD4
RaiSportSat.pva: 0x00056677 and 0x00056678
However the AV packets seem to be different in the two files.
I didn't find any StreamID in the .mmr file (not as defined in the PVA specifications).
Obviously the data organization is different, but the .mmr file should contain the same kind of data, such as A/V streams, PTS, DTS etc...
So I think that the PVR writes direcly the input buffer of its "TMX320AV7110GFN AD 18ZBNH3" chipset to the Hard Disk.
Here is the datasheet of the TMS320AV7110: http://www.linuxdvb.tv/documentation/AV711x_3_1.pdf
I think that examinating it we can understand more about synchronization.
For now I'm able to extract the full ES Video and ES Audio or PES Audio streams, but I need PTS informations to synchronize the A/V streams.
So there would be two solutions in my opinion:
1st) convert the non standard PVA stream into a standard one, by understanding data organization inside the .mmr file
2nd) retrieve some informations of the PES Video header and insert them in the ES Video.
The 2nd solution should be the easiest.
It's the same process described in PVA Technical Specification, to convert PVA in MPEG2 (see the last page of the document).
What do you think about?
Similar Threads
-
How to put/print timecode/timestamp on a video
By truth of life in forum EditingReplies: 0Last Post: 11th Mar 2012, 09:29 -
Adding timecode data to a VP8 video at encode-time
By ilya.lissoboi in forum ProgrammingReplies: 0Last Post: 29th Apr 2011, 05:43 -
Any idea to add timecode in DC video file
By chung1107 in forum SubtitleReplies: 0Last Post: 8th Sep 2010, 03:37 -
How to generate and embed Timecode while video capturing?
By asifjavaid in forum Video Streaming DownloadingReplies: 0Last Post: 8th Apr 2009, 07:51 -
How do I add a datecode/timecode to a MOV video?
By Zorro_100 in forum Newbie / General discussionsReplies: 0Last Post: 21st Apr 2008, 10:05