Avalpa Community

The place where we can talk freely about Avalpa product and services
It is currently Fri May 27, 2022 1:39 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Aug 27, 2014 6:19 pm 
Offline

Joined: Fri Aug 22, 2014 11:05 pm
Posts: 2
Hi

As first, big thanks for great piece of software.

I am trying record video and audio from the desktop and transmit it to the DVB-T, everything works perfect, except audio video sync. Audio is 3 s after video (depends on commands order pesvideo2ts, pesaudio2ts , if i switch this commands, delay is larger).

CPU has no problem with power, ussage is approx. 30 - 40%.

If i try capture screen from avconv direct to the MKV, no audio delay (merge 2 avconv commands to one audio + video).

Is some possibility to fix this? Or another solution?
Thanks :)

Code:
avconv -y  -video_size 1600x900 -r 25 -framerate 25 -f x11grab -i :0.0+0,0 \
-f mpeg2video -s 720x576 -r 25 -b 5000k -maxrate 5000k -minrate 5000k -bf 2 -an -bufsize 1835008 fifo.mp2 2> /dev/null &
avconv -y -f pulse -i default -ab 128k -ar 48000  -acodec mp2 -vn -ac 2  fifoA.mp2 1> /dev/null &

esvideompeg2pes fifo.mp2 1> ed.video.pes 2> ed.pes.length &
esaudio2pes fifoA.mp2 1152 48000 384 -1 3600 > ed.audio.pes &

pesvideo2ts 2064 25 112 7000000 0 ed.video.pes > fifo2 &
pesaudio2ts 2068 1152 48000 384 1 ed.audio.pes > fifoA1 &

tscbrmuxer  b:7000000 fifo2 b:188000 fifoA1   b:1500 firstsdt.ts b:3008 firstpat.ts b:3008 firstpmt.ts o:7464681 null.ts > fifo3 &
tsstamp fifo3 7464681 > fifo4 &

tsrfsend fifo4  0 586000 8000 4 3/4 1/4 8 0 -15


Top
 Profile  
 
PostPosted: Wed Aug 27, 2014 6:36 pm 
Offline

Joined: Sun Sep 22, 2013 10:29 am
Posts: 39
as a fast comment, i would say that a missing sync is to be expected as in the DVB-T toolchain, the two "avconv" do not have any relationship,
in any case, a proper analysis would need to give a loot to the TS getting out of the TSCBRMUXER, as the main focus should be related to understand the PTS values stored in both stream.

getting audio video sync ok is not an easy task and opencaster was born more for the datacasting focus.

don't want to divert you too much, but did you try to investigate the "open broadcast encoder" (OBE) source tree:

https://github.com/ob-encoder

it's x264 based but maybe the AV sync is better and you should be still be able to use the opencaster tools down the chain up to the modulator.

bests

Andrea


Top
 Profile  
 
PostPosted: Wed Aug 27, 2014 9:27 pm 
Offline

Joined: Fri Aug 22, 2014 11:05 pm
Posts: 2
Hi

Thanks for response. Jop, i must study more harder :).

Thanks for link looks nice, i try understand code.

I found temporary solution to make A/V in sync. If i run tsrfsend as first (waiting for fifo) and then run my previous code, A/V are in sync.

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group