LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   DVB-T tuner missing MPEG4-based channels (http://www.linuxquestions.org/questions/linux-hardware-18/dvb-t-tuner-missing-mpeg4-based-channels-769655/)

mafiltenborg 11-17-2009 06:40 AM

DVB-T tuner missing MPEG4-based channels
 
I've recently acquired an 'AGK' DVB-T tuner USB-stick, capable of receiving both MPEG2 and MPEG4 channels.
I,ve installed the relevant USB-driver-module, firmware and the whole setup works - but only with MPEG2 channels.

Anyone out there who can help me get the MPEG4 reception working?

HW:
  • AGK DVB-T tuner - USB2 & Afatech AF9015 chip
  • X86 pc

SW:
  • Debian Squeeze - kernel 2.6.30-2-686
  • firmware 'dvb-usb-af9015.fw' (v4.95)
  • dvb-usb module & relevant bits and pieces loaded, successfully forming a reception chain. Works fine with e.g. Kaffeine & MPEG2

Upon device insertion, /var/log/messages records this activity:
Nov 18 09:28:32 blackbox kernel: [1366586.280051] usb 1-3: new high speed USB device using ehci_hcd and address 36
Nov 18 09:28:32 blackbox kernel: [1366586.420552] usb 1-3: New USB device found, idVendor=15a4, idProduct=9016
Nov 18 09:28:32 blackbox kernel: [1366586.420559] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 18 09:28:32 blackbox kernel: [1366586.420564] usb 1-3: Product: DVB-T 2
Nov 18 09:28:32 blackbox kernel: [1366586.420569] usb 1-3: Manufacturer: Afatech
Nov 18 09:28:32 blackbox kernel: [1366586.420573] usb 1-3: SerialNumber: 010101010600001
Nov 18 09:28:32 blackbox kernel: [1366586.420740] usb 1-3: configuration #1 chosen from 1 choice
Nov 18 09:28:32 blackbox kernel: [1366586.449420] dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state, will try to load a firmware
Nov 18 09:28:32 blackbox kernel: [1366586.449430] usb 1-3: firmware: requesting dvb-usb-af9015.fw
Nov 18 09:28:32 blackbox kernel: [1366586.474235] dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
Nov 18 09:28:32 blackbox kernel: [1366586.563671] dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
Nov 18 09:28:32 blackbox kernel: [1366586.563765] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
Nov 18 09:28:32 blackbox kernel: [1366586.564347] DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
Nov 18 09:28:33 blackbox kernel: [1366586.983836] af9013: firmware version:4.95.0
Nov 18 09:28:33 blackbox kernel: [1366586.988344] DVB: registering adapter 0 frontend 0 (Afatech AF9013 DVB-T)...
Nov 18 09:28:33 blackbox kernel: [1366586.988675] tda18271 1-00c0: creating new instance
Nov 18 09:28:33 blackbox kernel: [1366586.994837] TDA18271HD/C1 detected @ 1-00c0
Nov 18 09:28:33 blackbox kernel: [1366587.281294] dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized and connected.
Nov 18 09:28:33 blackbox kernel: [1366587.294518] Afatech DVB-T 2: Fixing fullspeed to highspeed interval: 16 -> 8
Nov 18 09:28:33 blackbox kernel: [1366587.295094] input: Afatech DVB-T 2 as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.1/input/input150
Nov 18 09:28:33 blackbox kernel: [1366587.295288] generic-usb 0003:15A4:9016.0093: input,hidraw4: USB HID v1.01 Keyboard [Afatech DVB-T 2] on usb-0000:00:1d.7-3/input1

- no word about MPEG4.

lsusb:
Bus 001 Device 035: ID 15a4:9016 Afatech Technologies, Inc. AF9015 DVB-T USB2.0 stick


Doing 'scan ./DK-mymuxes -o zap channels.conf' reveals that the tuner finds 5 MUXes, broadcasting both MPEG2 and MPEG4 streams.

Doing channel scan in Kaffeine gives me only MPEG2 channels, no MPEG4 at all (e.g. danish DR HD, sent in 720p)...

The tuner works like a charm when used in Windows - MPEG4 reception included...

Init1993 08-02-2010 07:52 AM

DVB-T Hardware for reception of mpeg4 based channels?
 
I have a similar problem:

Can anyone recommend a PCI (or USB) based DVB-T tuner card for reception of DVB-T channels in mpeg4 format?

I'm running a Fedora Core 10 with a PCI based mpeg2 tuner which works just fine with Kaffeine here in Denmark.

I would prefer a PCI based DVB-T mpeg4 tuner, but I have had some trouble finding such a thing. Any hints and/or links to appropriate hardware will be appreciated.

/init1993

mafiltenborg 08-03-2010 01:43 AM

DVB-T tuner usable in Denmark
 
As it happens, i live in Denmark, and since my original post the issue has resolved itself - sort of.

Today, the USB tuner in question (an AGK model sold in Bilka for 299 DKR) does the job. It scans and finds any and all MUX'es in my area, including BoxerTV and DR HD. And it displays the nonencrypted ones just nicely in Kaffeine.
But without sound.

So i contacted a Kaffeine-developer, who explained to me that Kaffeine relies on Xine-libs for the actual decoding, and at that time, Xine didn't support the scandinavian choice of audio-codec; HE-AAC or something similar.
Apparently, Xine/Kaffeine still doesn't do this. Live TV is not an option.

But i've found a way round the problem that satisfies me. I record what i want to see, and play it back using VLC :)

The trick lies in avoiding Xine.
Actually, it's possible to use VLC for viewing live TV, but the user interface for channel selection is lousy, and there's no EPG at all. And my needs are primarily recording for later use. Thus Kaffeine fits the bill better.

Regarding TV-tuners i've learned this: It doesn't matter what the package says - if there's a driver module for the tuner chip, it will work. With any encoding format, because it's simply a raw data stream provider. I'm currently running my 24/7 DIY recorder with an ancient Asus MyCinema Hybrid PCI-card, designed for MPEG-2 only. But DR HD in glorious MPEG4 720p works just fine because the card is able to tune to 658 MHz and stream raw data :)
And there's more: Looking at how DVB-T works, i realized that all TV channels streamed on the same MUX (frequency...) were simply interleaved. Multiplexed. Thus, viewing one particular channel means sorting out only the bits related to that picture and put 'em onscreen with e.g. VLC. Now, if i could hook up multiple VLC's to the tuner device and have them sort out different channels; multichannel viewing with only ONE tuner device.
Or how about having VLC stream the chosen MUX to my LAN via multicast UDP - all channels at the same time. Yup! It works... I can pump all five public channls on e.g. MUX1 onto LAN and have as many VLC clients as i like pick up the broadcast stream. The clients even have individually independent channel selection menu-option. Network load scales linear with number of channels broadcast, not with number of clients. Cool.
Streaming and recording DVB-T has another advantage; since there's no decoding taking place, CPU load is almost nonexistent, and this leads to another funny thing. Kaffeine will happily record any combination of all five public channels on e.g. MUX1 SIMULTANEOUSLY, if the harddisk can keep up. Adding another tuner will allow for complete MUX2 handling. And so on. The CPU doesn't even have to be powerful - a NAS device may be sufficient... And my Synology NAS runs a variant of Linux, has builtin VLC and an USB port.
This has fostered a vague idea about being able to do a complete DVB-C TV channel range conversion/distribution onto LAN. Using my idea, one 'tuner PC/NAS' will feed a hundred VLC's - perfect for e.g. a college, where everyone already owns a PC. And with some coding, a LAN-based multi-user-PVR with web-based EPG is imaginable. You might find it interesting to read on here:
http://forum.synology.com/enu/viewtopic.php?f=3&t=18644

But let's return to the topic of tuner selection. IMHO, your best choice for a /new/ tuner will be to visit Bilka and buy the AGK USB-tuner on sale there. They've had the same model on stock for a year by now. It contains an afatech 9015 tuner, and drivers for that one are in recent kernel builds. You might need to get the tuner firmware to get it running. Please have a look at linuxtv.org for the details.

Or you could try to use your /existing/ PCI-card tuner. You say it works with Kaffeine, and my experience makes me guess that you just haven't set it up right. There's a file named dk-All somewhere, governing Kaffeine's channel search mechanism for Denmark, and most likely you just need to modify that one, enabling your local MUX frequencies and weeding out the ones not relevant. This will also help speeding up chnnel search quite dramatically! MUX frequencies can be found on
http://www.boxertv.dk/kundeservice/t...og-frekvenser/
You'll need MUX1 and MUX2. Nothing more, unless you subscribe to BoxerTV.

All this, provided your choice of Linux distro is reasonably recent.

And then you need to figure out which tv application to use.

Finally, it's possible - even a good idea, because you will then support linux-friendly business - to visit http://www.linuxshoppen.dk/ and see what they have to offer.

Init1993 08-03-2010 09:37 AM

Thanks.

Now I just need to find out if the Hauppage card I have can tune to 658 MHz. When I scan in Kaffeine I only find channels on 514 MHz so maybe it cannot do 658 MHz.

/Init1993

mafiltenborg 08-04-2010 06:24 AM

Aargh!
While fiddling with my Kaffeine setup, which has been running 24/7 for a year or so - with bi-monthly reboots just to be on the safe side - i managed to FUBAR the whole setup. Damn!
So i ended up purging Kaffeine altogether and reinstall it. No worky! The running Kaffeine code completely failed to see my homemade channel-settings-file (named dk-Aarhus). Aftr some more fiddling and grepping for text-clues, searching for files and tearing my hair out in despair, i discovered that today's version of Kaffeine uses one single channel-settings-file named scanfile.dvb. Various upgrades during the last year had failed to properly handle this, and thus the current install somehow kept falling flat on its face. Manually removing all traces of old settings + reinstalling cured the problem. But i wasn't satisfied with this, because i'd like to have my own shortlist back, thus avoiding the boxer-MUX'es. Easy. Here's how:

Locate scanfile.dvb (somewhere in your .kde directory).
Edit it. Add the entry

[dvb-t/dk-Aarhus]
T 514000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
T 658000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE


somewhere and restart Kaffeine. Now there's a new entry named dk-Aarhus in the DVB-T Source dropbox covering Århus FTA channels :)

Most likely this file will be updated regularly, so create a backup and use it when necessary.

Nothing on 658 MHz? I found that this MUX requires a better antenna. And how do you know you're at 658 MHz when scanning? - i only have a noninformative progress bar to look at. Using my 'dk-Aarhus' approach solves part of this problem by scanning only two frequencies, and then it's possible to follow the scanning process; first stop (514) finds some, last stop (658) finds the rest - or none.

Init1993 08-04-2010 08:25 AM

A Hauppage NOVA-T pci based card can be used to recieve/record the Danish mpeg4 channels
 
Ok; thanks for all your hints.

Here is what works here in DK for me with a Fedora Core 10 installation and a Hauppage NOVA-T pci card:

1) First: I installed w_scan (using yum in my case)
2) Then I did a w_scan -k -c DK >> channels.dvb
I ran this as root in ~root.
This gave me the mpeg4 channel setting for channels on 658MHz in the channels.dvb but not the mpeg2 channels on 514MHz. (I had expected to get them all)
3) Inspected and merged the ~/.kde/share/apps/kaffeine/channels.dvb with the ~root/channels.dvb. I did cat ~/.kde/share/apps/kaffeine/channels.dvb ~root/channels.dvb > channels.merge
And the edited channels.merge so that kaffeine can use it.
4) Exchanged the contents of ~/.kde/share/apps/kaffeine/channels.dvb with the newly created content of channels.merge

After this I started Kaffeine and now have full EPG for all mpeg2 and mpeg4 channels, and can start timers, instant recording etc.

As you pointed out, I will have to keep a copy of the my merged channel setup since kaffeine probably will overwrite it.

Since this is a hardware forum let me repeat:

Hauppage NOVA-T (pci based) can be used as reciever for both mpeg2 and mpeg4 channels.

Init1993 08-04-2010 10:26 AM

Hauppage NOVA-T PCI and recording of mpeg4
 
Just a follow up the thread:

The NOVA-T will let me record mpeg4 channels through kaffeine. The contents of the recorded files can be played with what?

I tried out VLC on Windows, but that seems not to work. Any hints?

The Hauppage Nova-T I use give the following 'lspci -v' output:

00:08.0 Multimedia video controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)
Subsystem: Hauppauge computer works Inc. Device 9002
Flags: bus master, medium devsel, latency 32, IRQ 19
Memory at e7000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Kernel driver in use: cx8800
Kernel modules: cx8800

00:08.2 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)
Subsystem: Hauppauge computer works Inc. Nova-T DVB-T Model 909
Flags: bus master, medium devsel, latency 32, IRQ 19
Memory at e8000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: [4c] Power Management version 2
Kernel driver in use: cx88-mpeg driver manager
Kernel modules: cx8802

00:08.4 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [IR Port] (rev 05)
Subsystem: Hauppauge computer works Inc. Nova-T DVB-T Model 909
Flags: bus master, medium devsel, latency 32, IRQ 10
Memory at e9000000 (32-bit, non-prefetchable) [size=16M]
Capabilities: [4c] Power Management version 2

mafiltenborg 08-05-2010 01:08 AM

Kaffeine-generated MPEG4-recordings
 
I assume your Kaffeine generates files postfixed .m2t.

Viewing these files with VLC on Fedora is no problem, right?
It should not be a problem to view them with VLC on Windows. AFAIK it's just a dump of the chosen stream, formatted in either mpeg2 or mpeg4.

Does your WinVLC play recordings from an mpeg2-station like e.g. DR1, but not from an mpeg4-station? I suspect something not right with your windows codec install.

Actually, to have my SO G-stream mediaplayer play the Kaffeine-recordings on my bedroom TV, all i need to do is rename them to .mpg, select and press 'Play'...

friotto 11-17-2010 02:56 PM

Transforming .m2t data under Linux (actually Sqeeze)
 
Different DVB-T or DVB-C usb-Tuners allways produce with kaffeine pretty well .m2t data. I would like to translate these data to other formats. Googling I finde few suggestions. Unfortunately I only find .exe or .bat programs which I`m not able to use with Debian Squeeze.

mafiltenborg 11-18-2010 02:55 AM

@ friotto:

Yes, Kaffeine always produces .m2t files.
Since Kaffeine does no transcoding on its own, those m2t-files contain whatever format is broadcast; mpeg2 or mpeg4 with varying audio formats.
But for DVB-C and DVB-T we at least know it's some sort of mpeg-formatted stream. Thus renaming a file from .m2t to .mpg will probably work. No transcoding necessary. Your mpeg-capable player of choice will decode the file just fine.
Should you want to transcode from the relatively 'big' formats mpeg2/4 to something 'smaller' like h264 or do a complete resize/crop/aspect-ratio-reformat, observe that VLC plays the file! And if VLC can play it, VLC can transcode it!

You don't need any .exe or .bat programs. You have VLC - right there on your Debian :)

Try googling for 'VLC transcode' and see what comes up.

friotto 11-18-2010 03:23 AM

Thankyou for your reply mafiltenborg!
Sometimes I want to adjust the file: Cut the entrance or the tail. How to do that?

mafiltenborg 11-18-2010 04:42 AM

Dunno.
Perhaps OpenMovieEditor (http://www.openmovieeditor.org/)?
Or Cinelerra (http://www.heroinewarrior.com/cinelerra.php)?

I have a feeling that those are overkill, but have no other suggestions to make at this time. Actually you ask a very relevant question, as my default recording plan makes recordings start 2 minutes ahead of time to allow for TV-provider 'slack'. Should i wish to keep any recording, i'll need a similar functionality.
Will investigate.

In the meantime, check your repo for suitable applications.

mafiltenborg 11-23-2010 12:55 AM

Have been investigating. Successfully edited a Kaffeine-recording (renamed to*.mpg) with the AviDemux application.
AviDemux manages to recognize mpeg-content (mpeg2...), display video, mark up sections, cut them out and re-save in mpeg-TS. All this on a tiny EeePC 901 netbook, and without the tedious waiting.

AviDemux exists in both Debian- and Ubuntu-repositories, ready for install. Enjoy.


Hmmm... Does AviDemux handle mpeg4 (HD-channel-recordings)?

And how does Kaffeine - as a DVR - hold up to the tvheadend-project (http://www.lonelycoder.com/hts/tvhea...verview.html)?
Must investigate.

a.l 11-26-2010 08:19 AM

Hi

ALDI in Denmark has next week an AGK DVB-C and DVB-T USB tuner (all in one) on sale for 279,- DKR.

It must be this one when comparing to the ALDI adv.:
w w w.agknordic.com/new/index.php?side_id=496

(since it is my first post I'm not allowed to post 'complete' links.)

The ALDI adv. says it supports even HD channels. However the adv. for the usb stick is not currently online on the ALDI page but only on the printed adv.: aldi.dk/OFFER_DK_COMP/index48.shtml

Now to the question:
Does anyone know if it is supported in Linux and whether it supports 720p and 1080i/p ?

a.l 11-26-2010 05:36 PM

Well, I did some search through the manual.

If you go to page 6 (or p. 13 in Danish section) step 5 of the pdf ( http://www.agknordic.com/new/filer/496/10508_manual.pdf ) then you'll notice that it says:
REALTEK DTV Filter_DVB-C
and
REALTEK DTV Filter_DVB-T.

Now when doing a google search on DVB-C and Realtek the following page is in the results: http://www.realtek.com.tw/products/p...Level=4&Conn=3 that points to http://www.realtek.com.tw/products/p...n=3&ProdID=148 which gives the RTL2840 that is a QAM demodulator.

When doing a google search for RTL2840 and linux not so many results show up, however http://geexbox.org/sympa/arc/devel/2.../msg00037.html shows up. I can see that the RTL2840 for DVB-C and RTL2832 (and RTL2830) for DVB-T are defined.

Now it seems that RTL2832 somehow should work for dvb-t ( http://forum.ubuntuusers.de/topic/dv.../#post-2683760 ) and I hope also RTL2840 - but only time in my case will tell.
It is of course not sure what the ICs are that AGK makes use of. But I am somewhat optimistic :-) since it seems that those two ICs are the only 2 modern Realtek possibilities if you look here: http://218.210.127.131/products/prod...Level=3&Conn=2

I am a totally newbie in this video 4 linux area (I literally know nothing!), but in case that (only) geexbox supports these ICs then I guess that it should be possible that the linux kernel sooner or later supports it as well.

But I guess I'll take the chance and buy the ALDI/AGK usb stick and see what happens :-)
Currently I run Ubuntu 10.10 with the default Ubuntu 2.6.35-22 kernel.

But maybe some of you know whether RTL2840 has been integrated into V4L or the Linux kernel?


All times are GMT -5. The time now is 01:53 PM.