Ticket #338 (closed Bugs: fixed)

Opened 7 months ago

Last modified 5 days ago

Check bounds for encoding parameters

Reported by: smimram Owned by: admin
Priority: 1 Milestone: 1.0 beta
Component: Liquidsoap Version:
Keywords: Cc:
Mac OSX: yes Linux: yes
NetBSD: yes Other Operating System: yes
FreeBSD: yes

Description (last modified by toots) (diff)

We should avoid bug reports like the one below: we should check that quality of encoding is between 0 and 1 and likewise that other parameters are within reasonable bounds.

I have a little problem using the output.icecast and the new syntax. Here my lines:

  output.icecast(%vorbis(quality=5), mount="hd.ogg", id="oxyOGG", 
  name="OxyRadio.net :: Respire et Ecoute!",
                  host=oxyHost, port=oxyPort, user=oxyUser, 
  password=oxyPassword, genre=oxyGenre, description=oxyDesc, url=oxyUrl,
                  restart=true,
                  radio)
  output.icecast(%vorbis(quality=0),mount="bd.ogg", id="oxyOGGLow", 
  name="OxyRadio.net :: Respire et Ecoute!",
                  host=oxyHost, port=oxyPort, user=oxyUser, 
  password=oxyPassword, genre=oxyGenre, description=oxyDesc, url=oxyUrl,
                  restart=true,
                  radio)

Icecast mountpoint's informations are correct, it prints Quality: 5. and Quality: 0. for these mountpoints. But when I'm listening to them, only the bd.ogg mountpoint has the correct quality (64kbps). I did some test and it seems that if I set a quality > 0 I get a 499kpbs bitrate.. And it's not ok according to the wikipedia page :  http://en.wikipedia.org/wiki/Vorbis#Technical_details Can you confirm this small bug ?

Afaik, the range Liquidsoap uses is 0.0 - 1.0, so quality 5 would be 0.5. A small test on my side confirms this; 0.5 gives 160Kbps streams.

Change History

Changed 7 months ago by mrpingouin

  • milestone set to 1.0 beta

I totally agree. It's easy to do so I'll just point where/how it should be done: in src/lang/lang_parser.mly we have dedicated parsers for each %xxx(...) syntax. We should simply check values there and raise a Syntax_error. Another exception with more info would be good, but then it should be caught and properly reported with position information like other errors in the toplevel parsing functions of lang.ml.

Changed 4 months ago by toots

  • description modified (diff)

Additionally, we may also use the official ranges, like 0-10 for vorbis...

Changed 4 months ago by toots

Sorry, it is -2..10

Changed 3 weeks ago by mrpingouin

We've dealt with vorbis and mp3, they seem fine now. WAV seems good too. So it only remains to check speex, vorbis and dirac (quality, bitrate, ..).

Changed 9 days ago by 太阳能

China is the world's commitment to implement energy-saving emission reduction targets, to enhance policy support the new energy economy strategy, accelerating the construction of solar photovoltaic technology in rural and urban areas of the application, the relevant state ministries launch solar roofs program. Solar roof planned efforts to break through the integration and solution architecture design of a lack of optical, optoelectronic products combined with low level of construction, optical and network problems, low market awareness of the problem. Solar Roofs Plan into consideration economic and social benefits and other factors, at this stage of economic development, industrial base cities to actively promote a better solar roofs, building integrated photovoltaic curtain wall and other optical model; actively support development in rural and remote areas from the net-generation, implementation of transmission to rural areas, the implementation of the national farmer-friendly policy. Solar roof planned to mobilize all sectors of society through the development of demonstration projects and promote the implementation of relevant national policies. Demonstration projects to strengthen advocacy, to expand its influence, increase market awareness, formation and development of solar photovoltaic products, a good social atmosphere; to promote the implementation of tariff and other Internet-sharing policy, the formation of policy together, amplifying the effect of policies; the optical construction applications as an important building energy efficiency content, in new construction, existing building energy-saving, actively promote the use of urban lighting. Policy limit sun roof demonstration project must be greater than 50kW, which requires at least 400 square meters of total floor area, construction is difficult to participate in the general population, eligible owners will focus on schools, hospitals and government and other public and commercial buildings. Ministry of Finance to consider subsidies, the cost of electricity can be reduced to 0.58 yuan / kWh. Whether PV electricity price electricity price in the thermal power given premium is not clear, but even without the premium, due to lower power generation cost sales price, the owners are still building solar power projects to generate electricity for personal use, replacement power purchased from power. Moreover, local governments can be expected to give additional subsidies, electricity costs will decline further  http://solar-poweronline.info/

Changed 5 days ago by toots

  • status changed from new to closed
  • resolution set to fixed

This is fixed in [7550]. I am closing now but this is in fact a "perpetual" ticket since those bounds should be added for each new format and perhaps revised regularly...

Note: See TracTickets for help on using tickets.