Skip to content

Commit

Permalink
Better error reports for missing files. Fixed typos in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Nov 7, 2017
1 parent 4b3fa7b commit 9c01c59
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
6 changes: 3 additions & 3 deletions python/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ need to be run directly from the source tree.
Major tools
-----------

**dash-batch-encoder** (dash_tools.bache_encoder)
**dash-batch-encoder** (dash_tools.batch_encoder)
* Uses *ffmpeg* to create multi-variant mp4 content with fixed
GoP duration
* Output is suitable for transforming into DASH ABR content
Expand All @@ -16,7 +16,7 @@ Major tools
* Uses *MP4Box* to transform the output of dash-batch-encoder into
DASH OnDemand content.
* Postprocesses audio tracks to get segment alignment with video
* Configured via JSON recipy
* Configured via JSON recipe

**dash-ondemand-verifier** (dash_tools.ondemand_verifier)
* Performs checks on (trees of) DASH OnDemand asset and reports issues
Expand All @@ -28,7 +28,7 @@ Major tools
These above tools are exported as scripts starting with prefix dash-.
There corresponding names in the source code does not have that part.

**dashtools.ts**
**dash_tools.ts**
* This is a competent MPEG-2 TS parser

For more details, see online documentation_.
Expand Down
2 changes: 1 addition & 1 deletion python/dash_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.8.1'
__version__ = '0.8.2'
15 changes: 10 additions & 5 deletions python/dash_tools/ondemand_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ def get_media_type(rep, adaptation_set):

def check_dash_manifest(manifest_path, verbose):
"""Check that DASH manifest is OnDemand with side-loaded subtitles."""
if not os.path.exists(manifest_path):
raise IOError("IOError: Manifest %s does not exist" % manifest_path)
tree = ET.parse(manifest_path)
root = tree.getroot()
if root.attrib['type'] != 'static':
Expand Down Expand Up @@ -281,7 +283,10 @@ def check_alignment(manifest_path, verbose):
sidx_timescale = None
for i, track_path in enumerate(track_group):
name = os.path.basename(track_path)
data = open(track_path, 'rb').read()
try:
data = open(track_path, 'rb').read()
except IOError as e:
raise e
track = CMAFTrack(name, data)
segment_data = track.segment_data
if i == 0: # Take one segment timeline per group
Expand Down Expand Up @@ -480,16 +485,16 @@ def check_asset(mpd_path, verbose):
check_dash_manifest(mpd_path, verbose)
except BadManifestError, e:
badness = BAD_MANIFEST
log.error(e.message)
log.error(e)
if verbose:
print(e.message)
print(e)
traceback.print_tb(sys.exc_traceback)
else:
badness |= check_alignment(mpd_path, verbose)
except Exception, e:
log.error(e.message)
log.error(e)
if verbose:
print(e.message)
print(e)
traceback.print_tb(sys.exc_traceback)
badness |= BAD_OTHER
if badness != 0:
Expand Down
6 changes: 3 additions & 3 deletions python/doc/dash_tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ more described:
Major Tools
===========

**dash-batch-encoder** (dash_tools.bache_encoder)
**dash-batch-encoder** (dash_tools.batch_encoder)
* Uses *ffmpeg* to create multi-variant mp4 content with fixed
GoP duration
* Output is suitable for transforming into DASH ABR content
Expand All @@ -25,7 +25,7 @@ Major Tools
* Uses *MP4Box* to transform the output of dash-batch-encoder into
DASH OnDemand content.
* Postprocesses audio tracks to get segment alignment with video
* Configured via JSON recipy
* Configured via JSON recipe

**dash-ondemand-verifier** (dash_tools.ondemand_verifier)
* Performs checks on (trees of) DASH OnDemand asset and reports issues
Expand All @@ -37,7 +37,7 @@ Major Tools
These above tools are exported as scripts starting with prefix dash-.
There corresponding names in the source code does not have that part.

**dashtools.ts**
**dash_tools.ts**
* This is a competent MPEG-2 TS parser

Minor tools
Expand Down
3 changes: 3 additions & 0 deletions python/doc/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ VERSIONS

0.8.1 - Nov. 6 2017
Added check that there is exactly one trun box in each subsegment

0.8.2 - Nov. 7 2017
Better error reports for missing files. Fixed typos in documentation

0 comments on commit 9c01c59

Please sign in to comment.