GNOME Bugzilla – Bug 765731
dvbsrc: DVB-T2 tuning failure
Last modified: 2016-10-31 14:22:29 UTC
Created attachment 326949 [details] DVBv3 format channels file. As requested on the email list, a bug report :-) I have two USB adapters that support HD: WinTV-soloHD and PC-TV 292e. I am not sure what version information I can get and is appropriate. I have provided outputs for "BBC NEWS" (SD channel) and "BBC NEWS HD" (HD channel) for both of them to show they behave the same.
Created attachment 326950 [details] WinTV SD log
Created attachment 326951 [details] WinTV HD Log
Created attachment 326952 [details] PC-TV SD Log
Created attachment 326953 [details] PC-TV HD Log
The parsing logic is wrongly assuming DVB-T for your T2 channels (delsys property) and this is leading to a tuning failure for your hd ones. I will see whether I can add some logic to switch to T2 based on the parsed parameters, but in the mean time, you have a couple of options to help debug this further: 1.- Forcibly set delsys to 16 (DVB-T2) in your code, see if it flies :) 2.- Try with Thiago's dvbv5 parsing code from #764957 This will likely be pushed to master soon and we can really use some help testing different delivery system paths (you need to apply both patches and use a dvbv5 formated channels.conf file) 2.- Build a manual pipeline around dvbsrc setting delsys=16 and confirm we are on the right path. Thanks for your help!
Hey Russel, I pushed some improvements to the delsys autodetection logic today and included a rule to select DVB-T2 for QAM_256 (not supported by DVB-T). Can you give it a try and report back? Module: gst-plugins-bad Branch: master Commit: 5b1191cb4c08e17c56a097e9ed1ed58becb2bb93 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5b1191cb4c08e17c56a097e9ed1ed58becb2bb93 Author: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> Date: Wed May 4 16:32:19 2016 -0700 dvbsrc: smarten-up delsys autodetection logic
I rebuilt all the GStreamer repositories this morning (my script automatically pulls, so yes I am up to date :-), but no joy. Is there a way of knowing which plugin is being used so as to know that it is the newly built one and not the one from the system installation (which is not going to work until a new version is in Debian and Fedora). In the interim I will try forcing delsys to T2 and see what happens.
gst-inspect-1.0 dvbsrc | grep -i -e file -e date
|> gst-inspect-1.0 dvbsrc | grep -i -e file -e date Filename /home/users/russel/Built/lib/gstreamer-1.0/libgstdvb.so Source release date 2016-05-07 08:31 (UTC) |> gst-launch-1.0 playbin uri="dvb://BBC NEWS HD" Setting pipeline to PAUSED ... 0:00:10.032992139 12106 0x23cccf0 ERROR dvbsrc gstdvbsrc.c:1980:gst_dvbsrc_start:<dvbsrc0> Not able to lock on to the dvb channel ERROR: Pipeline doesn't want to pause. Setting pipeline to NULL ... Freeing pipeline ... (gst-launch-1.0:12106): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT (object)' failed Caught SIGSEGV
Sadly it is going to be fairly impossible to sensible test this with the Me TV code per se. So I guess using gst-launch-1.0 is the only way forward. Is there a place I can pick up a reasonable command line to run a dvbsrc plugin without letting playbin be in charge?
Hi Russel, thanks for trying out. Can you please attach a debug log for the playbin run you used on comment #9? I think it might still be selecting DVB-T but would like to confirm. Thank you.
Testing with a newly built GStreamer: |> gst-inspect-1.0 dvbsrc | grep -i -e file -e date Filename /home/users/russel/Built/lib/gstreamer-1.0/libgstdvb.so Source release date 2016-05-09 06:39 (UTC) and the log using the command in 9 but with lots more logging to be attached shortly.
Created attachment 327508 [details] PC-TV HD Log 2016-05-09 11:30 Using the newer version of dvbsrc, attempt to tune to an HD channel.
Created attachment 327669 [details] [review] dvb/parsechannels: do not guess delsys at zap parsing Can you give this one a try over an up-to-date copy of master and report back with a debug log please? Your last ones still show a wrong delsys auto selection being made. We might still need to tweak the T2 parameter set up so don't feel too bad if it still fails :) Thank you!
Applying the patch causes no channel to be tunable: SD channels fail to tune exactly as HD channels. Assuming I applied it correctly, I thought I had, the post application diff looked identical. Reverting the patch returns to SD tunability but no HD tunability.
OK, I know whats going on. I will work on an updated patch but in the mean time, it would be nice if you can attach a debug log of (at least) the failing SD tuning so I can confirm. Thank you.
Created attachment 327767 [details] [review] dvb: fix autodetection and tuning of DVB-T2 broadcasts Please try this new patch on top of -bad's current head, it has been squashed from separate changes on my local tree that aim to improve delsys autodetection. Make sure you try both your SD and HD broadcasts and attach debug logs of both runs here for further inspection. Your problem is two folded, misdetection of DVB-T2 broadcasts as DVB-T and quite probably a malformed FE_SET_PROPERTY ioctl for the former. This patch mostly deals with the misdetection so while it might not solve your problem completely it should bring us an step closer.
With the Git repository fully up to date SD works and HD fails as previously. Apply only 327767 and not the early patch results in HD working and SD failing. So there is clearly an indicator here of something that will result in both SD and HD working! Log files will be appended shortly.
Created attachment 327856 [details] PC Tv 292e HD 2016-05-14
Created attachment 327857 [details] PC TV 292e SD 2016-05-14
Created attachment 327917 [details] [review] dvb: fix autodetection and tuning of DVB-T2 broadcasts Hi, thanks for testing. Attached patch should sort out the issue. The main problem here is some DVB-T parameter-sets also describe perfectly valid DVB-T2 broadcasts. Approach is to set the delivery system to DVB-T in those cases and only set delsys to DVB-T2 when we are absolutely sure it can't be the former (like when QAM_256 is required). Please test and report back, make sure to include debug logs for sd and hd channels if further debugging ends up being required. Remember to apply the patch over a fresh master head.
Looks like both BBC NEWS and BBC NEWS HD play fine with this patch applied to master 044ed50190a756a83f2b7c26bfd2d49c4b5e448e using gst-launch-1.0 playbin anyway… Building Me TV and running it, SD fails and HD works. I am not sure how best to sort this out. I need first to ensure correct libraries being used and if the problem persists, get appropriate debugging logs. I'll report back with more news when I have it.
Seems to have been a glitch of unattributable cause. From what I can tell Me TV is now handling HD as well as SD. However I think there is an indication that GStreamer is not handling low signals strengths as well as dvbv5-zap: dvbsrc is failing to lock at signal strengths dvbv5-zap is happy to lock. This is though a completely different issue and so belongs elsewhere. What might be connected is that dvbsrc is not always able to lock when changing from one channel to another whereas is it can when trying for the first time. Again though this is not directly connected to the problem of this bug report. I'd say this change should be committed and this bug closed.
Thanks for trying this out and confirming it works. I will be pushing these soon. Regarding unstable locking / tuning problems please open a new bug report as you see fit, I'm currently working on this code so I should be able to react quick enough. Again, Thanks for your help in getting this fixed.
Review of attachment 327917 [details] [review]: Pushed a modified patch as a part of the changeset that prepared this solution to be possible: commit 10b020095ba4a11834f919dfcaa5b154c6ea7bdf Author: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> Date: Sun May 15 00:41:12 2016 -0700 dvbsrc: special case detection when DVB-T and T2 seem valid There is no way to tell one over the other when parameters seem valid for DVB-T and DVB-T2 and the adapter supports both. Reason to go with the former here is that, from experience, most DVB-T2 channels out there seem to use parameters that are not valid for DVB-T, like QAM_256
This is working now but we need to keep in mind that autodetecting the delivery system is not 100% accurate and we need to move to (additionally) support dvbv5 channels.conf format so autodetection becomes unnecessary. There's a patch for this already: https://bugzilla.gnome.org/show_bug.cgi?id=764957
Just to confirm some success: Me TV (which is really just a playbin-based application can now show DVB-T and DVB-T2 channels. However, there is usually what is reported as a tuning lock fail, if the playbin is "retuned", i.e. the playbin is stopped, an new mrl set, and the playbin started. This could be bad use of playbin, or it could be a problem in playbin or dvbsrc. This cannot be investigated using gst-play-1.0, and Me TV is not an appropriate test for this, so a small C application has to be written to show the error and be the test. Once this test code is written and the problem can be reliably reproduced I'll post a bug report.
Hi Russel, thanks for the follow up. I'd suggest starting by writing a gst-validate scenario over dvbsrc (writing to fakesink) to change channels, see how that works and iterate over by adding the rest of the elements we are interested in. This should make a lot easier to isolate where the problem is.
It turns out the problem is very simple. Switching from one SD channel to another is fine, switching from one HD channel to another is fine. Switching from SD to HD or HD to SD causes a tuning fail and crash. I guess it is now time for a new bug report.
Re Comment 29 I have created https://bugzilla.gnome.org/show_bug.cgi?id=766501