Jump to content


Photo

DAB radio reception


  • Please log in to reply
412 replies to this topic

Re: DAB radio reception #361 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 23 May 2020 - 19:44

PS. I used ffmpeg to "mux" raw pcm into wav, because VLC cannot understand raw pcm, produced from dab-rtlsdr-sdgradio-pcm.

 

 

But VLC is playing slow pitch sound.....


Enigma is getting old....

 

Spoiler

Re: DAB radio reception #362 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 23 May 2020 - 19:59

ffmpeg -f s16le -channels 2 -r 48000 -i pipe:0 -f wav pipe:1

It's wrong.

 

 

It has to be :

ffmpeg -f s16le -channels 2 -ar 48000 -i pipe:0 -f wav pipe:1

Now sound is OK.


Enigma is getting old....

 

Spoiler

Re: DAB radio reception #363 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 23 May 2020 - 21:07

Thank! I will fix it.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DAB radio reception #364 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 23 May 2020 - 21:36

I didn't know it, but looking at help (ffmpeh -h) I found it.

Video options:
...............
-r rate             set frame rate (Hz value, fraction or abbreviation)
...............
                                                                                                       
Audio options:
..............
-ar rate            set audio sampling rate (in Hz)

Anyway after some minutes (5) playing, audio stops, using as a favourite on box, sf8008.

#SERVICE http://localhost:5237/dab/.....

You have to kill both dab-rtlsdr-sdg......  and ffmpeg processes to get audio again.


Edited by jpuigs, 23 May 2020 - 21:44.

Enigma is getting old....

 

Spoiler

Re: DAB radio reception #365 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 23 May 2020 - 21:48

Playing on VLC it stops too....


Enigma is getting old....

 

Spoiler

Re: DAB radio reception #366 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 23 May 2020 - 22:01

When audio stops, on dastreamer manualstart log it doesn't appear anything:

root@sf8008:~# dabstreamer manualstart                                                                                
Sat May 23 22:49:44 2020 Server Starts - :5237                                                                        
192.168.0.2 - - [23/May/2020 22:49:46] "GET /dab/8A/EFF9 HTTP/1.1" 200 -                                              
192.168.0.2 - - [23/May/2020 22:49:46] Parameters: /dab/8A/EFF9                                                       
192.168.0.2 - - [23/May/2020 22:49:46] Using command dab-rtlsdr-sdgradio-pcm -C 8A -p -2 -Q -S EFF9 | ffmpeg -f s16le -channels 2 -ar 48000 -i pipe:0 -f wav pipe:1

and that's all...

 

 

Sorry for posting so many times, but it's the worst problem in this forum, you can edit them within a few minutes..................


Enigma is getting old....

 

Spoiler

Re: DAB radio reception #367 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 23 May 2020 - 23:21

I notice that it stops too.

No idea why that happens, the SDGRadio uses same binary as well, but feeds the dvbaudiosink directly, no issues there.

The idea is simple, use a binary, produce stream, feed enigma2.

Maybe it's the ffmpeg, but we need to mux into wav.

Edited by athoik, 23 May 2020 - 23:21.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DAB radio reception #368 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 23 May 2020 - 23:28

No idea why that happens, the SDGRadio uses same binary as well, but feeds the dvbaudiosink directly, no issues there.

 

 

....and that binary works perfectly inside sdgradio.....so it has to be ffmpeg's fault....


Enigma is getting old....

 

Spoiler

Re: DAB radio reception #369 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 24 May 2020 - 10:21

I've read in several places that when ffmpeg stops converting after a few minutes is because buffer is overflowed.

Then it has to include option -re before input file

I've tried it, but then I get 2 seconds of good audio, and after that you have to stop it otherwise your ears will be damaged.........

 

 

Attached File  ffmpeg_broken.jpg   215.93KB   2 downloads


Edited by jpuigs, 24 May 2020 - 10:28.

Enigma is getting old....

 

Spoiler

Re: DAB radio reception #370 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 24 May 2020 - 11:08

I took another approach.
 
I manage to compile the welle-cli (https://github.com/AlbrechtL/welle.io).
 
There is an option to start a streaming server using welle-cli.
 
root@osmio4kplus:~# cd /usr/share/welle-io/html && welle-cli -c 12C -w 5238 -g -1
Hello this is welle-cli v2.1-0-g8fc5739
InputFactory:Input device:auto
RTL_SDR:Open rtl-sdr
RTL_SDR:Found 1 devices. Uses the first working one
Found Rafael Micro R820T tuner
RTL_SDR: Opening rtl-sdr device0
[R82XX] PLL not locked!
RTL_SDR: Supported gain values29
RTL_SDR: gain 49.6
RTL_SDR: gain 48
RTL_SDR: gain 44.5
RTL_SDR: gain 43.9
RTL_SDR: gain 43.4
RTL_SDR: gain 42.1
RTL_SDR: gain 40.2
RTL_SDR: gain 38.6
RTL_SDR: gain 37.2
RTL_SDR: gain 36.4
RTL_SDR: gain 33.8
RTL_SDR: gain 32.8
RTL_SDR: gain 29.7
RTL_SDR: gain 28
RTL_SDR: gain 25.4
RTL_SDR: gain 22.9
RTL_SDR: gain 20.7
RTL_SDR: gain 19.7
RTL_SDR: gain 16.6
RTL_SDR: gain 15.7
RTL_SDR: gain 14.4
RTL_SDR: gain 12.5
RTL_SDR: gain 8.7
RTL_SDR: gain 7.7
RTL_SDR: gain 3.7
RTL_SDR: gain 2.7
RTL_SDR: gain 1.4
RTL_SDR: gain 0.9
RTL_SDR: gain 0
Start RTLSDR thread
OFDM-processor: reset (0)
OFDM-processor:start
ofdm-processor: Lost coarse sync (coarseCorrector: 0; fineCorrector: 0)
ofdm-processor: SyncOnPhase failed
ofdm-processor: SyncOnPhase failed
ofdm-processor: SyncOnPhase failed
ofdm-processor: SyncOnPhase failed
ofdm-processor: SyncOnPhase failed
ofdm-processor: Found sync (coarseCorrector: 0; fineCorrector: 0 after 44 frames)
...
 
Then from web UI you can play the radio you like (assuming that you are using your computer), watch spectrum, constellation etc.

Attached File  welle-cli.png   424.21KB   2 downloads


Using the url http://localhost:5238/mp3/4098 you can play radio on the receiver as well.


I think welle-cli needs a small change in order to allow frequency change from GET.

https://github.com/A...erface.cpp#L477

Something like http://localhost:5238/mp3/12C/4098 that will retune and setup channel, so no access to web would required to switch to another frequency.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DAB radio reception #371 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 24 May 2020 - 11:59

I don't understand exactly why you say that welle-cli needs a small change in order to allow frequency change from GET.

When you launch welle-cli binary from cmd, you can pass frequency and program

 

http://localhost:5238/mp3/12C/4098

 

elif tool == "mp3":

_, channel, program = parameters

cmd = "welle-cli -c %s -p %s " % (channel, program)

 

 

Doesn't it work ?

 

Is it (welle-cli) on any SDG feed ?


Enigma is getting old....

 

Spoiler

Re: DAB radio reception #372 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 24 May 2020 - 14:32

Welle CLI already offers a streaming server. Also it doesn't offer a way to stream wav/pcm directly on output (Or I didn't find it yet).

 

So in order this to work from bouquets, it should have the option to change the current frequency.

 

Otherwise you need to use the web UI to switch to another channel.

 

So i made a patch to handle the channel change, also to send the index.html/index.js from the installed path.

diff --git a/src/welle-cli/webradiointerface.cpp b/src/welle-cli/webradiointerface.cpp
index 1372b94..c533461 100644
--- a/src/welle-cli/webradiointerface.cpp
+++ b/src/welle-cli/webradiointerface.cpp
@@ -439,10 +439,10 @@ bool WebRadioInterface::dispatch_client(Socket&& client)
     else {
         if (req.is_get) {
             if (req.url == "/") {
-                success = send_file(s, "index.html", http_contenttype_html);
+                success = send_file(s, "/usr/share/welle-io/html/index.html", http_contenttype_html);
             }
             else if (req.url == "/index.js") {
-                success = send_file(s, "index.js", http_contenttype_js);
+                success = send_file(s, "/usr/share/welle-io/html/index.js", http_contenttype_js);
             }
             else if (req.url == "/mux.json") {
                 success = send_mux_json(s);
@@ -474,9 +474,38 @@ bool WebRadioInterface::dispatch_client(Socket&& client)
                 const regex regex_slide(R"(^[/]slide[/]([^ ]+))");
                 std::smatch match_slide;

+                const regex regex_tune_mp3(R"(^[/]mp3[/]([56789][A-D]|1[123][A-D]|13[EF]|L[A-P])[/]([^ ]+))");
                 const regex regex_mp3(R"(^[/]mp3[/]([^ ]+))");
                 std::smatch match_mp3;
-                if (regex_search(req.url, match_mp3, regex_mp3)) {
+                if (regex_search(req.url, match_mp3, regex_tune_mp3)) {
+                    cerr << "GET channel: " << match_mp3[1] << endl;
+                    try {
+                        const auto freq = input.getFrequency();
+                        const auto chan = channels.getChannelForFrequency(freq);
+                        const auto newchan = match_mp3[1];
+                        if (newchan != chan) {
+                            retune(newchan);
+                            this_thread::sleep_for(chrono::seconds(2));
+                            success = send_mp3(s, match_mp3[2]);
+                            for (auto i=0; i<10 && !success; i++) {
+                                cerr << "Not yet synced, delaying to reply..." << endl;
+                               success = send_mp3(s, match_mp3[2]);
+                                this_thread::sleep_for(chrono::seconds(2));
+                            }
+                            if (success) {
+                                return true;
+                            }
+                        }
+                        else {
+                            cerr << "Retune not required..." << endl;
+                        }
+                    }
+                    catch (const out_of_range& e) {
+                        cerr << "Failed to retune " << e.what() << endl;
+                    }
+                    success = send_mp3(s, match_mp3[2]);
+                }
+                else if (regex_search(req.url, match_mp3, regex_mp3)) {
                     success = send_mp3(s, match_mp3[1]);
                 }
                 else if (regex_search(req.url, match_slide, regex_slide)) {

Start the service...

root@osmio4kplus:~# welle-cli -w 5238
Hello this is welle-cli v2.1-0-g8fc5739
....

Use url in the following way:

 

http://localhost:5238/mp3/12C/4099

or

http://localhost:5238/mp3/12C/0x1001

 

Use url http://IP_OF_RECEIVER:5238/ to access the web server of welle-cli.

 

Use the following in bouquets:

#SERVICE http://localhost:5238/mp3/12C/0x1001

Attached Files


Edited by athoik, 24 May 2020 - 14:34.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DAB radio reception #373 littlesat

  • PLi® Core member
  • 57,475 posts

+708
Excellent

Posted 24 May 2020 - 14:58

Sounds we also need a plugin that can scan and add services in a userbouquet...

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: DAB radio reception #374 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 24 May 2020 - 15:21

Webserver works, and I can hear them using red play button from there.

 

But I don't know if now VLC should work , because it stops just after starting, no time to hear anything... and I have no audio on enigma box (sf8008) too.


Enigma is getting old....

 

Spoiler

Re: DAB radio reception #375 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 24 May 2020 - 15:53

What URL did you use?
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DAB radio reception #376 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 24 May 2020 - 16:10

VLC  http://192.168.0.14:5238/mp3/8A/0xEFF9

 

userbouquet:

#NAME DAB
#SERVICE http://localhost:5238/mp3/8A/0xEFF9
#SERVICE http://localhost:5238/mp3/8A/0xEFF6
#SERVICE http://localhost:5238/mp3/8A/0xEFED
#SERVICE http://localhost:5238/mp3/11B/0xEFF3


Edited by jpuigs, 24 May 2020 - 16:14.

Enigma is getting old....

 

Spoiler

Re: DAB radio reception #377 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 24 May 2020 - 16:15

URL seems fine, is there an error on console?

PS. Try also the URL with decimal number.

Eg 0xEFF9 is 61433.

Or hex to lower case.

Edited by athoik, 24 May 2020 - 16:20.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DAB radio reception #378 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 24 May 2020 - 16:20

fixed.

 

service id have to be in lowercase

 

#NAME DAB
#SERVICE http://localhost:5238/mp3/8A/0xeff9
#SERVICE http://localhost:5238/mp3/8A/0xeff6
#SERVICE http://localhost:5238/mp3/8A/0xefed
#SERVICE http://localhost:5238/mp3/11B/0xeff3


Edited by jpuigs, 24 May 2020 - 16:20.

Enigma is getting old....

 

Spoiler

Re: DAB radio reception #379 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 24 May 2020 - 16:21

Nice!
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: DAB radio reception #380 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 24 May 2020 - 17:10

Althought it works, frequency change needs finetuning......

 

Zapping from one frequency to another isn't fine.

I've added one favourite program more to make tests between frequencies.

#NAME DAB
#SERVICE http://localhost:5238/mp3/8A/0xeff9
#SERVICE http://localhost:5238/mp3/8A/0xeff6
#SERVICE http://localhost:5238/mp3/8A/0xefed
#SERVICE http://localhost:5238/mp3/11B/0xeff2
#SERVICE http://localhost:5238/mp3/11B/0xeff3

As you see, 1 to 3 are on block 8A, and 4 and 5 are on 11B.

 

 

If I'm listening to any 8A program and I zap to another 8A program, it zaps instantly and no problem at all...

 

But If I'm on 8A and I zap to a 11B program (4), it doesn't work.  I have to zap again to the other one on 11B (5) and then it works, and after that I can zap continously from 4 to 5 ,,,,,

 

Same applies back to 8A.

If I'm in 11B and I want to zap to a programm on 8A, I have to zap twice, and after that, no problem at all among all on 8A.

 

Here the full log:

 

after starting comandline and waiting for some seconds....

 

I tune to first favourite 8A eff9 (61433)

 

my comments start with ****

GET channel: 8A                                    ****selecting favourite 1 program 61433 8A  
Retune to 195936000                                                                                                    
Kill programme handler195936000                                                                                        
ofdm-processor: SyncOnPhase failed                                                                                     
Take ownership of RX                                                                                                   
Destroy RX                                                                                                             
OFDM-processor: closing down                                                                                           
OFDM-decoder:closing down now                                                                                          
Set frequency                                                                                                          
End RTLSDR thread                                                                                                      
Start RTLSDR thread                                                                                                    
Restart RX                                                                                                             
OFDM-processor: reset (0)                                                                                              
OFDM-processor:start                                                                                                   
Start programme handler                                                                                                
ofdm-processor: Lost coarse sync (coarseCorrector: 0; fineCorrector: 0)                                                
ofdm-processor: SyncOnPhase failed                                                                                     
ofdm-processor: SyncOnPhase failed                                                                                     
Not yet synced, delaying to reply...                                                                                   
ofdm-processor: SyncOnPhase failed                                                                                     
ofdm-processor: Found sync (coarseCorrector: 0; fineCorrector: 0 after 30 frames)                                      
Not yet synced, delaying to reply...                                                                                   
Could not setup mp3 sender for 61433: map::at                                                                          
Not yet synced, delaying to reply...                                                                                   
Registering mp3 sender                                                                                                 
MP2Decoder: using decoder 'NEON'.                                                                                      
Failed to send audio for Removing mp3 sender                                                                           
61433                                                                                                                  
GET channel: 8A                      ****I get no audio after 15seconds so I zap to favourite 2 61430 8A 
Retune not required...               
Registering mp3 sender                                                                                                 
MP2Decoder: using decoder 'NEON'.    ****Audio from fav. 2 appears instantly....                                                                                  
GET channel: 8A                      ****I zap to favourite 3 61421 8A, audio appears instantly too... 
Retune not required...                                                                                                 
Registering mp3 sender                                                                                                 
Removing mp3 sender                                                                                                    
Failed to send audio for 61430                                                                                         
SuperframeFilter: Superframe sync started...                                                                          
SuperframeFilter: Superframe sync succeeded after 3 frame(s)                                                           
AACDecoder: using decoder 'FAAD2'                                                                                      
GET channel: 8A                    ****I zap again to favourite 2 61430 8A, audio appears instantly too...
Retune not required...                                                                                                 
Registering mp3 sender                                                                                                
MP2Decoder: using decoder 'NEON'.                                                                                      
Removing mp3 sender                                                                                                    
Failed to send audio for 61421                                                                                         
Failed to send audio for 61433                                                                                         
Removing mp3 sender                                                                                                    
GET channel: 8A                    ****I zap again to favourite 1 , no problems at all...
Retune not required...                                                                                                 
Registering mp3 sender                                                                                                 
MP2Decoder: using decoder 'NEON'.                                                                                      
GET channel: 8A                    ****I zap again to favourite 2 , no problems at all...
Retune not required...                                                                                                 
Registering mp3 sender                                                                                                 
Failed to send audio for Removing mp3 sender                                                                           
61430                                                                                                                  
SuperframeFilter: Superframe sync started...                                                                           
SuperframeFilter: Superframe sync succeeded after 4 frame(s)                                                           
AACDecoder: using decoder 'FAAD2'                                                                                      
GET channel: 11B                  ****Now I zap to favourite 4, 61426 11B.....                                                                                     
Retune to 218640000                                                                                                    
Kill programme handler218640000                                                                                        
Failed to send audio for 61421                                                                                         
Removing mp3 sender                                                                                                    
Take ownership of RX                                                                                                   
Destroy RX                                                                                                             
OFDM-processor: closing down                                                                                           
OFDM-decoder:closing down now                                                                                          
Set frequency                                                                                                          
End RTLSDR thread                                                                                                      
Start RTLSDR thread                                                                                                    
Restart RX                                                                                                             
OFDM-processor: reset (0)                                                                                              
OFDM-processor:start                                                                                                   
Start programme handler                                                                                                
ofdm-processor: Lost coarse sync (coarseCorrector: 0; fineCorrector: 0)                                                
ofdm-processor: SyncOnPhase failed                                                                                     
ofdm-processor: SyncOnPhase failed                                                                                     
ofdm-processor: Found sync (coarseCorrector: 0; fineCorrector: 0 after 18 frames)                                      
Could not setup mp3 sender for 61426: map::at                                                                          
Not yet synced, delaying to reply...                                                                                   
Could not setup mp3 sender for 61426: map::at                                                                          
Not yet synced, delaying to reply...                                                                                   
Failed to send response HTTP/1.0 200 OK                                                                                
                                                                                                                       
Failed to send mp3 headers                                                                                             
Not yet synced, delaying to reply...                                                                                   
Failed to send response HTTP/1.0 200 OK                                                                                 
                                                                                                                     
Failed to send mp3 headers                                                                                             
GET channel: 11B                ****As I get no audio after several seconds, I zap to favourite 5 61427 11B 
Retune not required...                                                                                                 
Registering mp3 sender                                                                                                 
MP2Decoder: using decoder 'NEON'.                                                                                      
Not yet synced, delaying to reply...                                                                                   
Failed to send response HTTP/1.0 200 OK                                                                                     
                                                                                                                  
Failed to send mp3 headers                                                                                            
Not yet synced, delaying to reply...                                                                                   
Failed to send response HTTP/1.0 200 OK                                                                  
                                                                                                                                     
Failed to send mp3 headers                                                                                             
Not yet synced, delaying to reply...          ****Although you see this errors, I get audio perfectly from fav 5
Failed to send response HTTP/1.0 200 OK                                                                                    
                                                                                                                   
Failed to send mp3 headers                                                                                             
Not yet synced, delaying to reply...                                                                                   
Failed to send response HTTP/1.0 200 OK                                                                                        
                                                                                                               
Failed to send mp3 headers                                                                                             
Not yet synced, delaying to reply...                                                                                   
Failed to send response HTTP/1.0 200 OK                                                                                
                                                                                                                          
Failed to send mp3 headers                                                                                             
GET channel: 11B                            ****I zap to favourite 4 61426 11B, audio appears instantly...
Retune not required...                                                                                                 
Registering mp3 sender                                                                                                 
MP2Decoder: using decoder 'NEON'.                                                                                      
Removing mp3 sender                                                                                                    
Failed to send audio for 61427                                                                                         
Failed to send response HTTP/1.0 200 OK                                                                                    
                                                                                                                   
Failed to send mp3 headers                                                                                             
Failed to send response HTTP/1.0 404 Not Found                                                                          
Could not understand request.                                                                                           
                                                                                                                     
GET channel: 11B                         **** I zap again to favourite 5 61427 11B, audio appears instantly...
Retune not required...                                                                                                 
Registering mp3 sender                                                                                                 
Failed to send audio for 61426                                                                                         
Removing mp3 sender                                                                                                    
MP2Decoder: using decoder 'NEON'.

Edited by jpuigs, 24 May 2020 - 17:13.

Enigma is getting old....

 

Spoiler


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users