[linux-dvb] Converting TS file to DVD format

Nico Sabbi nsabbi at tiscali.it
Thu Mar 31 23:19:25 CEST 2005


C.Y.M wrote:

>Nico Sabbi wrote:
>  
>
>>you have been very lucky not to destroy dync. You simply should use
>>
>>mencoder -of mpeg -mpegopts format=dvd:vbitrate=9000 -o
>>/home/video/$1.mpg -oac copy -ovc copy *.vdr
>>
>>
>>    
>>
>
>Ok, this works as well.  But the sync is not right. 
>

was it right with the other method?

>I have a feeling the desync
>has to do with the cut marks I have created and processed with vdr on the recording.
>  
>

maybe. I will never get tired of complaining of .vdr file format: it 
serves no
purpose and should be simply dropped in favor of mpeg-[tp]s

>It appears we lose ~200ms of audio for every cut mark that is created and
>processed by vdr.  I have experimented with other demuxers and lvedemux appears
>to work as well.  What I have done is count the blocks of video and multiply
>that by 200ms.  Then use that calculation in the "time shift" switch here (-sh):
>  
>

generally TV stations transmit audio  ~200 ms ahead of video, but mencoder
should compensate automatically for them, unless you use -mc 0 and -noskip.
These options generally make a lot of sense and don't generate frame 
freezes,
but when muxing from dvb streams (with so high audio preloads) I prefer 
to avoid them and
let mencoder auto-sync.

>mkfifo file.m2v file.mpa
>cat 00*.vdr|pes2ts2 100 101|ts2ps 100 101 > file.ps
>lvedemux file.ps | lvemux -p -1 -r -sh -400 -v file.m2v -a file.mpa -o file.mpg
>
>Note: -400ms would be for a recording with two blocks of video (-600ms for 3
>blocks, etc..). This is to compensate for the loss of audio on the cuts.
>
>  
>

I bet that if you had the original .ts you wouldn't have this problem.
try to run

mencoder -of mpeg -mpegopts format=dvd -oac copy -ovc copy -o file.mpg 
dvb://TV

and see yourself: after few seconds audio will be automatically synced.

>>are you using one of those castrated packaged ffmpeg/libavcodec/mplayer?
>>If so you should compile
>>a fresh checkout of ffmpeg+mplayer
>>
>>    
>>
>
>Im using cvs for both ffmpeg and mplayer.  I also have just about everything
>enabled that I can.  I am assuming that the mpeg2video codec comes from ffmpeg?
>
>Thanks for the help..
>
>Regards,
>C.Y.M.
>
>  
>

yes. It can't be absent, unless you configured it with --without-risky




More information about the linux-dvb mailing list