Added extra debug code to try to discover why, sometimes, it assign incorrect stream ids
This commit is contained in:
parent
9af06bab98
commit
7299168b15
6 changed files with 35 additions and 9 deletions
|
|
@ -1,5 +1,11 @@
|
|||
## History of versions ##
|
||||
|
||||
* version 4.3.2 (2015-11-07)
|
||||
* Added extra debug info in the log
|
||||
|
||||
* version 4.3.1 (2015-11-07)
|
||||
* Added manpage (thanks to Alession Treglia)
|
||||
|
||||
* version 4.3 (2015-10-26)
|
||||
* Now doesn't fail when creating a DVD without menu
|
||||
* Added help in html format
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -59,7 +59,7 @@ compile_translations()
|
|||
setup(
|
||||
name='devedeng',
|
||||
|
||||
version='4.3',
|
||||
version='4.3.2',
|
||||
|
||||
description='A video DVD creator',
|
||||
long_description = "A program that allows to create video DVDs",
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class avprobe(devedeng.avbase.avbase):
|
|||
stdout2 = stdout.decode("utf-8")
|
||||
except:
|
||||
stdout2 = stdout.decode("latin1")
|
||||
self.config.append_log("AVProbe JSON data: "+str(stdout2))
|
||||
self.config.append_static_log("AVProbe JSON data: "+str(stdout2))
|
||||
return self.process_json(stdout2, file_name)
|
||||
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ class avprobe(devedeng.avbase.avbase):
|
|||
stdout2 = stdout.decode("utf-8") + "\n" + stderr.decode("utf-8")
|
||||
except:
|
||||
stdout2 = stdout.decode("latin1") + "\n" + stderr.decode("latin1")
|
||||
self.config.append_log("Using avprobe human readable format: "+str(stdout2))
|
||||
self.config.append_static_log("Using avprobe human readable format: "+str(stdout2))
|
||||
for line in stdout2.split("\n"):
|
||||
line = line.strip()
|
||||
if line.startswith("Duration: "):
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ class configuration(GObject.GObject):
|
|||
|
||||
is_local = None
|
||||
self.log = ""
|
||||
self.static_log = ""
|
||||
self.disc_type = None
|
||||
|
||||
try:
|
||||
|
|
@ -174,6 +175,8 @@ class configuration(GObject.GObject):
|
|||
def set_disc_type(self,disc_type):
|
||||
|
||||
self.disc_type = disc_type
|
||||
self.clear_static_log()
|
||||
self.clear_log()
|
||||
self.emit('disc_type',disc_type)
|
||||
|
||||
|
||||
|
|
@ -228,12 +231,20 @@ class configuration(GObject.GObject):
|
|||
if (cr):
|
||||
self.log += "\n"
|
||||
|
||||
def append_static_log(self,data,cr = True):
|
||||
|
||||
self.static_log += data
|
||||
if (cr):
|
||||
self.static_log += "\n"
|
||||
|
||||
def clear_log(self):
|
||||
|
||||
self.log = ""
|
||||
|
||||
def clear_static_log(self):
|
||||
|
||||
self.static_log = ""
|
||||
|
||||
def get_log(self):
|
||||
|
||||
return self.log
|
||||
return self.static_log + "\n" + self.log
|
||||
|
|
|
|||
|
|
@ -69,8 +69,7 @@ class ffprobe(devedeng.executor.executor):
|
|||
stdout2 = stdout.decode("utf-8")
|
||||
except:
|
||||
stdout2 = stdout.decode("latin1")
|
||||
|
||||
self.config.append_log("FFProbe JSON data: "+str(stdout2))
|
||||
self.config.append_static_log("FFProbe JSON data: "+str(stdout2))
|
||||
return self.process_json(file_name,stdout2)
|
||||
|
||||
|
||||
|
|
@ -143,7 +142,7 @@ class ffprobe(devedeng.executor.executor):
|
|||
stdout2 = stdout.decode("utf-8") + "\n" + stderr.decode("utf-8")
|
||||
except:
|
||||
stdout2 = stdout.decode("latin1") + "\n" + stderr.decode("latin1")
|
||||
self.config.append_log("Using ffprobe human readable format: "+str(stdout2))
|
||||
self.config.append_static_log("Using ffprobe human readable format: "+str(stdout2))
|
||||
for line in stdout2.split("\n"):
|
||||
line = line.strip()
|
||||
if line.startswith("Duration: "):
|
||||
|
|
|
|||
|
|
@ -123,20 +123,28 @@ class mplayer(devedeng.executor.executor):
|
|||
|
||||
if command=="ID_VIDEO_BITRATE":
|
||||
self.original_videorate=int(int(parameter)/1000)
|
||||
self.config.append_static_log("ID_VIDEO_BITRATE: "+str(self.original_videorate))
|
||||
if command=="ID_VIDEO_WIDTH":
|
||||
self.original_width=int(parameter)
|
||||
self.config.append_static_log("ID_VIDEO_WIDTH: "+str(self.original_width))
|
||||
if command=="ID_VIDEO_HEIGHT":
|
||||
self.original_height=int(parameter)
|
||||
self.config.append_static_log("ID_VIDEO_HEIGHT: "+str(self.original_height))
|
||||
if command=="ID_VIDEO_ASPECT":
|
||||
self.original_aspect_ratio=float(parameter)
|
||||
self.config.append_static_log("ID_VIDEO_ASPECT: "+str(self.original_aspect_ratio))
|
||||
if command=="ID_VIDEO_FPS":
|
||||
self.original_fps=float(parameter)
|
||||
self.config.append_static_log("ID_VIDEO_FPS: "+str(self.original_fps))
|
||||
if command=="ID_AUDIO_BITRATE":
|
||||
self.original_audiorate=int(int(parameter)/1000)
|
||||
self.config.append_static_log("ID_AUDIO_BITRATE: "+str(self.original_audiorate))
|
||||
if command=="ID_AUDIO_RATE":
|
||||
self.original_audiorate_uncompressed=int(parameter)
|
||||
self.config.append_static_log("ID_AUDIO_RATE: "+str(self.original_audiorate_uncompressed))
|
||||
if command=="ID_LENGTH":
|
||||
self.original_length=int(float(parameter))
|
||||
self.config.append_static_log("ID_LENGTH: "+str(self.original_length))
|
||||
|
||||
if command=="ID_VIDEO_ID":
|
||||
self.video_streams+=1
|
||||
|
|
@ -144,16 +152,18 @@ class mplayer(devedeng.executor.executor):
|
|||
if (minimum_video == -1) or (minimum_video>video_track):
|
||||
minimum_video=video_track
|
||||
self.video_list.append(stream_number)
|
||||
self.config.append_static_log("ID_VIDEO_ID: "+str(stream_number))
|
||||
if command=="ID_AUDIO_ID":
|
||||
self.audio_streams+=1
|
||||
audio_track=int(parameter)
|
||||
if (minimum_audio == -1) or (minimum_audio>audio_track):
|
||||
minimum_audio=audio_track
|
||||
self.audio_list.append(stream_number)
|
||||
self.config.append_static_log("ID_AUDIO_ID: "+str(stream_number))
|
||||
|
||||
# increment the stream_number counter in this case to also count
|
||||
# subtitles and other stream types
|
||||
if (command[-3:] == "_ID"):
|
||||
if (command == "ID_VIDEO_ID") or (command == "ID_AUDIO_ID") or (command == "ID_SUBTITLE_ID"):
|
||||
stream_number += 1
|
||||
|
||||
if (check_audio):
|
||||
|
|
@ -170,4 +180,4 @@ class mplayer(devedeng.executor.executor):
|
|||
if (self.video_streams == 0):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue