I am currently working on the ability to change the
FEC rate and symbol rate without having to restart
the program.
The FEC rate code works well, when I select a new rate
the appropriate video bitrate is calculated and the
FFMPEG encoder is programmed with that rate also
the FEC mother code puncturing is adjusted to match.
It is interesting to see the change in quality as the
bitrate changes.
A change in symbol rate often causes a crash so some
further work is involved. I think I need to semaphore
protect the filter routines to stop this happening.
I have found an issue with the S/W MPEG encoding,
FFMPEG seems to have a minimum bitrate it will
operate at for a given picture size. For 70 cms it is
looking like I am going to have to change the number
of lines to get the lower bitrate I need. I have already
reduced the audio bitrate down to 64kbits from the
192kbits it was operating at originally.
Amateur TV used to be thriving in the Worthing
area but things are very quite now. Some people
have left the area, others got proper jobs in
broadcasting, others family commitments and
some have simply lost interest.
There are some newer Amateurs showing interest
in this facet of the hobby but I am not sure how to
engage them and to re-engage the lapsed souls.
I am not someone that particularly enjoys the social
side of the hobby, I prefer to stick to software
development. So I am not sure how to go about
the re-awakening, suggestions welcome!
Sunday, 29 April 2012
Friday, 27 April 2012
Text Overlay
Using libavfilter I have now managed to add a text overlay to my
transmitted DATV signal. I had some trouble doing this because
drawtext did not seem to work, in the end I found I had more than
one version of FFMPEG on my Linux machine. The required library
is not a default so you need to use ./configure --enable-libfreetype
for it to work.
transmitted DATV signal. I had some trouble doing this because
drawtext did not seem to work, in the end I found I had more than
one version of FFMPEG on my Linux machine. The required library
is not a default so you need to use ./configure --enable-libfreetype
for it to work.
Sunday, 22 April 2012
3.4 GHz and other meanderings
I have not managed to get much done this weekend.
I am in the middle of doing a maths assignment so
time is short. However I did managed to plug in one
of the C Band LNBs I bought on eBay. I successfully
received a DATV 3.4 GHz signal sent by my USRP2
with it.
Other than that I have drilled the end plates for my
two 120W 1.3 GHz PAs. I started working on the SMA
socket mounts for the amplifiers but realised I had the
wrong type of sockets so it will be a while before
I can complete that. That is it for now!
I am in the middle of doing a maths assignment so
time is short. However I did managed to plug in one
of the C Band LNBs I bought on eBay. I successfully
received a DATV 3.4 GHz signal sent by my USRP2
with it.
Other than that I have drilled the end plates for my
two 120W 1.3 GHz PAs. I started working on the SMA
socket mounts for the amplifiers but realised I had the
wrong type of sockets so it will be a while before
I can complete that. That is it for now!
Thursday, 19 April 2012
Firewire Redux
Finally I managed to get the DV Audio working on the
Firewire port. The FFMPEG DV Audio decoder was
not present in my install and I couldn't work out how
to add it. So in the end I used libdv to extract the audio
from the DV frame. A frame contains 1920 samples
of audio and the MP2 encoder wants 1152 samples, it
took a while for the penny to drop but I have it all
working now, with nice clean audio and a very small
lag between the video and the audio.
The next task will be to add code to do special effects,
overlays, mixes, testcards even green screens. Once
the video is in memory it is very easy to manipulate.
Firewire port. The FFMPEG DV Audio decoder was
not present in my install and I couldn't work out how
to add it. So in the end I used libdv to extract the audio
from the DV frame. A frame contains 1920 samples
of audio and the MP2 encoder wants 1152 samples, it
took a while for the penny to drop but I have it all
working now, with nice clean audio and a very small
lag between the video and the audio.
The next task will be to add code to do special effects,
overlays, mixes, testcards even green screens. Once
the video is in memory it is very easy to manipulate.
Monday, 16 April 2012
Firewire or Firewon't
I am now trying to add Firewire support to the dvbqt program.
My version of Linux has the JuJu stack and the FW device
appears as /dev/fw0 . To access that I need to use libraw1394
unfortunately that appears to just be an interface to the
OHCI Firewire bus controller. So while I can detect I have a
camera connected I am no closer to obtaining an MPEG stream
to process.
I have been playing with Kino and that captures the video
from my Cannon XL1s camera very nicely over FW.
I have emailed the developers of that program to ask
for some suggestions as what I should do next as far as
Firewire support is concerned. Hopefully they will have
the time to respond.
In the meantime I must get back to doing my OU maths
course as I have fallen seriously behind with it because of
the time I have spent recently on dvbqt.
*********Stop press
I now have the Firewire interface working with dvbqt I
found a higher level library that can read DV frames from
the Firewire port then using the DV CODEC in FFMPEG
I was able to decode them into a picture and of course
re-encode them in MPEG2 ready for transmission.
The FFMPEG codec seems to produce a slightly more
blocky output than the PVR150 does (maybe my imagination).
My version of Linux has the JuJu stack and the FW device
appears as /dev/fw0 . To access that I need to use libraw1394
unfortunately that appears to just be an interface to the
OHCI Firewire bus controller. So while I can detect I have a
camera connected I am no closer to obtaining an MPEG stream
to process.
I have been playing with Kino and that captures the video
from my Cannon XL1s camera very nicely over FW.
I have emailed the developers of that program to ask
for some suggestions as what I should do next as far as
Firewire support is concerned. Hopefully they will have
the time to respond.
In the meantime I must get back to doing my OU maths
course as I have fallen seriously behind with it because of
the time I have spent recently on dvbqt.
*********Stop press
I now have the Firewire interface working with dvbqt I
found a higher level library that can read DV frames from
the Firewire port then using the DV CODEC in FFMPEG
I was able to decode them into a picture and of course
re-encode them in MPEG2 ready for transmission.
The FFMPEG codec seems to produce a slightly more
blocky output than the PVR150 does (maybe my imagination).
Saturday, 14 April 2012
FFMPEG Update
Just a quick update. I now have FFMPEG working inside my
DVB-S application (at least for video anyway). I have yet to add
code to do the audio. The only error I am getting from the decoder
is "too many b frames in sequence". I have told the PVR150 to send
less b frames but it makes no difference.
I noticed the PVR150 sends fixed length 2048 PES packets and because of
that has extra overhead. My transcoder sends much larger PES
packets and therefore I have been able to up the coding rate as there are
fewer overheads.
The CPU load is fairly low despite all the processing. I have tried 15 Mbit/s
in 3.2 Mbits/s out and the picture look good. What I am doing looks like this
MPEG2 stream (15M) -> Decode->Picture->Encode-> MPEG2 stream(3.2M)
DVB-S application (at least for video anyway). I have yet to add
code to do the audio. The only error I am getting from the decoder
is "too many b frames in sequence". I have told the PVR150 to send
less b frames but it makes no difference.
I noticed the PVR150 sends fixed length 2048 PES packets and because of
that has extra overhead. My transcoder sends much larger PES
packets and therefore I have been able to up the coding rate as there are
fewer overheads.
The CPU load is fairly low despite all the processing. I have tried 15 Mbit/s
in 3.2 Mbits/s out and the picture look good. What I am doing looks like this
MPEG2 stream (15M) -> Decode->Picture->Encode-> MPEG2 stream(3.2M)
Wednesday, 11 April 2012
My DVB TX App
Back to software, I am trying to use FFMPEG to decode/encode MPEG2
inside my DVB TX App. I managed to get it all to link but it is throwing
out error messages when I present it with a program stream.
The documentation on FFMPEG is a bit sparse and most of the help on
the Internet is for using FFMPEG as a standalone application not
embedded as a library in another application. I will get there!
The idea eventually is to allow me to input video using firewire
transcode it down to a data rate suitable for DATV then transmit it.
I will also be able to do loads of special effects on the video like
overlaying or even green screening. I am writing it as a C++ wrapper
around the FFMPEG calls, the Class is called Transcoder and
I will be able to handle multiple video streams provided my
4 core Linux box is fast enough only time will tell.
With my Transcoder class I tell it the required video and
audio bitrates and it takes the input MPEG2 data stream and
transcodes it to down to what I have requested (I hope).
In case you wondered the picture is of the current DATV antennas.
Sunday, 8 April 2012
24 cms Linear picture
This is a picture during construction of the 24 cms linear. The two XRF286S
devices have just been soldered down on to their heat spreader on each of
the two boards. I don't think I used quite enough solder on this first board
but for DATV operation these devices will have to be driven well below their
maximum outputs so I think they should be fine. Now I have the problem
that I don't have enough drive to drive the boards to their full output, still I
have two more XRF286S devices left so I can make a single device board to
drive them both.
Subscribe to:
Posts (Atom)