× Warning! This forum is in archival status. New contributions may not work.
Crossfade Causes Stream Buffering
  • Hello everyone,

    first of all, I'd like to thank you for this great product. Coming from Sam Broadcaster I'm impressed about this new concept and the things you can achieve with Airtime.

    I'm facing a problem with stream buffering between two songs when I enable crossfading in Airtime (by entering a value other than 0 into the "Default Crossfade Duration (s)" field). Stream clients start to buffer when a new song starts, resulting in a interrupted play back, i.e. Winamp is showing "Buffering.." until the stream settles back to normal.

    I'm running Airtime 2.5.1 on a Ubuntu 12.04.5, an airtime-check-system returned "Your installation of Airtime looks OK!", Airtime's services are using less than 2% of the CPU and less than 2% of the server's memory. I had a look into the ls_script.log and found the following entries, I'm not sure if they might be connected to the problem:

    2014/11/13 12:59:39 [stdout:3] #########################################
    2014/11/13 12:59:39 [stdout:3] #           *** pypo  ***               #
    2014/11/13 12:59:39 [stdout:3] #     pypo notification gateway         #
    2014/11/13 12:59:39 [stdout:3] #########################################
    2014/11/13 12:59:48 [server:3] New client: localhost.localdomain.
    2014/11/13 12:59:48 [server:3] Client localhost.localdomain disconnected.
    2014/11/13 12:59:58 [server:3] New client: localhost.localdomain.
    2014/11/13 12:59:58 [server:3] Client localhost.localdomain disconnected.
    2014/11/13 12:59:59 [cue_cut_5472:3] Cueing out...
    2014/11/13 12:59:59 [s0:3] Finished with "/var/tmp/airtime/pypo/cache/scheduler/1547.mp3".
    2014/11/13 12:59:59 [amplify_5476:3] End of the current overriding.
    2014/11/13 12:59:59 [schedule_noise_switch:3] Switch to map_metadata_5847 with forgetful transition.
    2014/11/13 12:59:59 [lang:3] transition called...
    2014/11/13 12:59:59 [dummy(dot)2:3] Source failed (no more tracks) stopping output...
    2014/11/13 12:59:59 [dummy(dot)1:3] Source failed (no more tracks) stopping output...
    2014/11/13 12:59:59 [shoutcast_stream_1:3] Metadata update may have failed with error: bad answer
    2014/11/13 13:00:00 [server:3] New client: localhost.localdomain.
    2014/11/13 13:00:00 [decoder:3] Method "MAD" accepted "/var/tmp/airtime/pypo/cache/scheduler/1574.mp3".
    2014/11/13 13:00:00 [lang:3] vars.show_name
    2014/11/13 13:00:00 [server:3] Client localhost.localdomain disconnected.
    2014/11/13 13:00:00 [s0:3] Prepared "/var/tmp/airtime/pypo/cache/scheduler/1574.mp3" (RID 5).
    2014/11/13 13:00:00 [cue_cut_5472:3] Cueing in...
    2014/11/13 13:00:00 [cue_cut_5472:2] Could not seek to cue point!
    2014/11/13 13:00:00 [amplify_5476:3] Overriding amplification: 0.601174.
    2014/11/13 13:00:00 [lang:3] /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --media-id=32120 &
    2014/11/13 13:00:00 [switch_5838:3] Switch to insert_metadata_5824.
    2014/11/13 13:00:00 [lang:3] Using stream_format 1
    2014/11/13 13:00:00 [lang:3] Using stream_format 1
    2014/11/13 13:00:00 [schedule_noise_switch:3] Switch to map_metadata_5840 with transition.
    2014/11/13 13:00:00 [lang:3] transition called...
    2014/11/13 13:00:00 [lang:3] Using stream_format 1
    2014/11/13 13:00:00 [shoutcast_stream_1:3] Metadata update may have failed with error: bad answer
    2014/11/13 13:00:00 [shoutcast_stream_1:3] Metadata update may have failed with error: bad answer
    2014/11/13 13:00:00 [stdout:3]


    I'd appreciate your thoughts.
    Kai

  • 5 Comments sorted by
  • Ok, I've narrowed it down a bit. It seems the 'pypo' process is eating up to 75% of the available CPU when fading to the next song. The process is going down to about 23% after a few seconds. Is there any way make the life a bit easier for the pypo process?

    Kai
  • Anyone?
    • What are the codecs of the songs you have
    • What bit-rates
    • How many channels on each playable items (mono or stereo)

    In any event the excessive CPU usage may or may not be related to the above but if you have an hyper-thread machine it may trigger by some clock processing or other application.


    Cross fade (relates to how songs join as they are played) and Streams are two items on different end of the spectrum and so more than likely not related.

    • Give more details on when this occurs.
    • what are the status of the media monitor
    • etc.

    VOISSES

    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Hi Viosses,

    Thanks for your feedback, here are the answers to your questions:

    1. What are the codecs of the songs you have
    Answer: All codecs are MPEG1 Layer III

    2. What bit-rates
    Answer: Bit-rates vary between 128 and 320 kBit/s

    3. How many channels on each playable items (mono or stereo)
    Answer: All tracks are recorded in stereo

    4. Give more details on when this occurs.
    Answer: It occurs exacly at the time when a new track starts. During a transition phase this means, the old track is not completely finished yet (remaining play time is 3 seconds, fade out time 1.5 seconds) when the new song is fading in (for 1.5 seconds).

    5. what are the status of the media monitor
    Answer: I had a look into the log file. These messages are continously repeating for different tracks:
    2014-11-09 13:43:44,803 INFO - [Thread-1] [events.py : __init__()] : LINE 96 - did not match path: /2010s/Taylor Swift - Mine.mp3
    2014-11-09 13:43:44,803 INFO - [Thread-1] [watchersyncer.py : handle()] : LINE 65 - Received event 'ModifyFile'. Path: '/2010s/Taylor Swift - Mine.mp3'
    2014-11-09 13:43:44,804 INFO - [Thread-1] [watchersyncer.py : push_queue()] : LINE 97 - Added event into queue

    I've turned off the crossfading to see what happens - without crossfading there's no buffering, everything is playing fine. So might crossfading effect the server in a way, there's not CPU power left to run the stream? It's not the most powerful server, but as the airtime-check-system script returned eveything is OK, I thought it must be something else.

    Thans for your support.
    Kai
    Post edited by Kai Tillmann at 2014-11-23 17:58:15