Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcoding the parameters are no longer set in the generated m3u8 file for recorded movies #891

Closed
anudanan opened this issue Jan 1, 2019 · 1 comment

Comments

@anudanan
Copy link
Contributor

anudanan commented Jan 1, 2019

As reported in this issue
#890
the parameter are also missing by streaming recordes movies

I think the function getTS needs the same fixes as getStream

I´ve testet that on my uno4kse and it work with the same fixes in getTS

		# INI use dynamic encoder allocation, and each stream can have diffrent parameters
		elif machinebuild in ('ew7356', 'formuler1tc', 'tiviaraplus'):
			if "device" in request.args:
				if request.args["device"][0] == "phone":
					portNumber = config.OpenWebif.streamport.value
					bitrate = config.plugins.transcodingsetup.bitrate.value
					# framerate = config.plugins.transcodingsetup.framerate.value
					args = "?bitrate=%s" % (bitrate)
		elif fileExists("/proc/stb/encoder/0/apply"):
			transcoder_port = 8001

		if fileExists("/proc/stb/encoder/0/apply"):
			if "device" in request.args:
				if request.args["device"][0] == "phone":
					try:
						bitrate = config.plugins.transcodingsetup.bitrate.value
						resolution = config.plugins.transcodingsetup.resolution.value
						(width, height) = tuple(resolution.split('x'))
						# framerate = config.plugins.transcodingsetup.framerate.value
						aspectratio = config.plugins.transcodingsetup.aspectratio.value
						interlaced = config.plugins.transcodingsetup.interlaced.value
						if fileExists("/proc/stb/encoder/0/vcodec"):
							vcodec = config.plugins.transcodingsetup.vcodec.value
							args = "?bitrate=%s?width=%s?height=%s?vcodec=%s?aspectratio=%s?interlaced=%s" % (bitrate, width, height, vcodec, aspectratio, interlaced)
						else:
							args = "?bitrate=%s?width=%s?height=%s?aspectratio=%s?interlaced=%s" % (bitrate, width, height, aspectratio, interlaced)
					except Exception:
						pass

		# When you use EXTVLCOPT:program in a transcoded stream, VLC does not play stream
		if config.OpenWebif.service_name_for_stream.value and sRef != '' and portNumber != transcoder_port:
			progopt = "%s#EXTVLCOPT:program=%d\n" % (progopt, int(sRef.split(':')[3], 16))

@jbleyel jbleyel closed this as completed Jan 3, 2019
@anudanan
Copy link
Contributor Author

anudanan commented Jan 4, 2019

great und thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants