[MEncoder-users] How to Change FPS on a Broken TS Stream?
Bill Adams
gofish at evilbill.org
Mon Jun 5 09:58:31 CEST 2006
Thanks all for your suggestions. Unfortunately it looks like getatsc
does not do the right thing -- I will cover that below but want to
answer some questions first...
A link to a sample bad ts stream is here:
http://evilbill.org/static/Bad-FPS.ts
Again, this is the opening to Lost season 2 episode 1 so be warned it is
be a spoiler for anyone who has not already seen all of season one.
When I run:
~/tmp/dtvstream-linux-1.1/dtvstream -i Bad-FPS.ts -o Tmp.mpg -v -d -a
1000000000000
I see many, many lines of "Waiting for a free buffer." but nothing else
that stands out to me.
The reason that I want to encode the material to 1280x720 is that is the
native resolution of my projector. The scale=1280:720 is unnecessary for
the ABC material as it is already that resolution but the OPB/PBS
Secrets of the Dead stream is 1080i so I am down-sampling it and
deinterlacing it to the native resolution of my projector. This is why I
do not use the format=dvd option. I tried that option on the bad stream
and it did not help.
> Do you know that you are getting good reception of ABC?
My reception according to "dtvsignal 43" (ABC in my area Portland OR)
reports 94-98%.
I have some NBC streams from Conan. They are 1920x1080 and transcode
fine with e.g.:
mencoder -oac copy -ovc lavc -lavcopts
vcodec=mpeg2video:vqscale=4:dia=4:keyint=20 -vf pp=fp -of mpeg -o
Test.mpg Conan-OBrien-Tue.ts
As it turns out, captures with a stock getatsc from FOX exhibit the same
problem where the FPS is wrong. I don't know why I never noticed this.
> The strange thing about this capture is that there are many video
> packets full of zeros. There are also no null packets - how exactly did
> you capture it?
I use a version of getatsc (dvb-atsc-tools
http://www.pchdtv.com/downloads.html) that I hacked to filter out
specific PIDs. I have not put this to the outside world (yet). The
Bad-FPS.ts referenced above was created with the noop tools
atscut/xtscut. The hack that I did writes all packets to the disks
except the ones for the PIDs of the sub-channels I do not want (this was
before I realized that mencoder could filter on PIDs too). If anyone
wants, I can email my version of getatsc.c. As it turns out, the stock
version of getatsc has the same problem where mencoder reports a funny
fps for full stream captures. My guess is that something needs to be
filtered from the stream that is not getting filtered.
A question: How did you find these video packets full of zeros? Is there
an easy way I can filter them without breaking the video stream? (Or
RTFM link)? I have a strange feeling that if I get rid of those
packets/video frames (or fix getatsc to properly detect null packets)
the problem I see will go away.
Thanks again everyone.
b.
More information about the MEncoder-users
mailing list