Issue 10: fricorder cannot record the radio
Status:  Accepted
Owner: ----
Reported by mjul...@free.fr, Oct 12, 2008
What steps will reproduce the problem?
1. choose a radio instead of a TV channel
2. wait until the time arrives
3. observe that fricorder has created an empty file

What is the expected output? What do you see instead?
  Expected: a file with audio from the recorded radio
  Seen instead: an empty file

What version of the product are you using? On what operating system?
0.7.37 on Linux i386 (Ubuntu)

Please provide any additional information below.

The playlist format is special for the radio channels: some options are
contained and are required (because the same stream is actually used for
transmitting several radios)

Example for TV:
#EXTINF:0,2 - France 2
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=sd

Example for Radio:
#EXTINF:0,10003 - France Inter
#EXTVLCOPT:ts-es-id-pid
#EXTVLCOPT:no-video
#EXTVLCOPT:audio-track-id=1001
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=100006

fricorder expects that the line after #EXTINF is the stream: this is
correct for the TV, not for the radio.

So the "at" job that is created is like this:

  /usr/share/fricorder/fricorder_record.sh #EXTVLCOPT:ts-es-id-pid 4200
direct "/home/myname/tv/[France Inter][2008-10-14_09-00][70]"

It would work if each "#EXTVLCOPT:" was replaced by "--", with all option
lines taken into account and separated by spaces, until the actual stream,
like this:

  /usr/share/fricorder/fricorder_record.sh "--ts-es-id-pid --no-video
--audio-track-id=1001
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=100006"
4200 direct "/home/myname/tv/[France Inter][2008-10-14_09-00][70]"

Oct 12, 2008
#1 mjul...@free.fr
Et voilà la solution (here is the solution):

dans /usr/lib/fricorder/fricorder/fbx.py, lignes 23 et suivantes, code actuel:

            if chaine:
                list.append( (num,chaine,ligne) )
                chaine=None
            if ligne[:7]=="#EXTINF":
                line=ligne.split(" - ")
                chaine = line[-1]
                num=int(line[0].split(",")[-1])

Code modifié pour pouvoir enregistrer les radios:

            if ligne[:11]=="#EXTVLCOPT:":
                opt=opt+"--"+ligne[11:]+" "
            elif chaine:
                list.append( (num,chaine,opt+ligne) )
                chaine=None
            if ligne[:8]=="#EXTINF:":
                line=ligne.split(" - ")
                chaine = line[-1]
                opt=""
                num=int(line[0].split(",")[-1])

Tâche "at" générée:

/usr/share/fricorder/fricorder_record.sh "--ts-es-id-pid --no-video
--audio-track-id=1006
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=100005" 4200 direct
"/home/myname/tv/[RFI][2008-10-14_09-00][70]"

Ci-joint, fichier fbx.py modifié


fbx.py
2.0 KB   View   Download
Oct 15, 2008
Project Member #2 manat...@gmail.com
excellent ! merci, faut que je le fasse
Status: Accepted
Labels: -Priority-Medium Priority-High