forked from LBRYCommunity/lbry-sdk
ffmpeg now invoked via stream update
This commit is contained in:
parent
bea94ce8ac
commit
bb1978d976
2 changed files with 14 additions and 1 deletions
|
@ -3174,12 +3174,13 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
self, claim_id, bid=None, file_path=None,
|
self, claim_id, bid=None, file_path=None,
|
||||||
channel_id=None, channel_name=None, channel_account_id=None, clear_channel=False,
|
channel_id=None, channel_name=None, channel_account_id=None, clear_channel=False,
|
||||||
account_id=None, wallet_id=None, claim_address=None, funding_account_ids=None,
|
account_id=None, wallet_id=None, claim_address=None, funding_account_ids=None,
|
||||||
preview=False, blocking=False, replace=False, **kwargs):
|
preview=False, blocking=False, replace=False, validate_file=False, optimize_file=False, **kwargs):
|
||||||
"""
|
"""
|
||||||
Update an existing stream claim and if a new file is provided announce it to lbrynet.
|
Update an existing stream claim and if a new file is provided announce it to lbrynet.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
stream_update (<claim_id> | --claim_id=<claim_id>) [--bid=<bid>] [--file_path=<file_path>]
|
stream_update (<claim_id> | --claim_id=<claim_id>) [--bid=<bid>] [--file_path=<file_path>]
|
||||||
|
[--validate_file] [--optimize_file]
|
||||||
[--file_name=<file_name>] [--file_size=<file_size>] [--file_hash=<file_hash>]
|
[--file_name=<file_name>] [--file_size=<file_size>] [--file_hash=<file_hash>]
|
||||||
[--fee_currency=<fee_currency>] [--fee_amount=<fee_amount>]
|
[--fee_currency=<fee_currency>] [--fee_amount=<fee_amount>]
|
||||||
[--fee_address=<fee_address>] [--clear_fee]
|
[--fee_address=<fee_address>] [--clear_fee]
|
||||||
|
@ -3199,6 +3200,11 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
--claim_id=<claim_id> : (str) id of the stream claim to update
|
--claim_id=<claim_id> : (str) id of the stream claim to update
|
||||||
--bid=<bid> : (decimal) amount to back the claim
|
--bid=<bid> : (decimal) amount to back the claim
|
||||||
--file_path=<file_path> : (str) path to file to be associated with name.
|
--file_path=<file_path> : (str) path to file to be associated with name.
|
||||||
|
--validate_file : (bool) validate that the video container and encodings match
|
||||||
|
common web browser support or that optimization succeeds if specified.
|
||||||
|
FFmpeg is required and file_path must be specified.
|
||||||
|
--optimize_file : (bool) transcode the video & audio if necessary to ensure common
|
||||||
|
web browser support. FFmpeg is required and file_path must be specified.
|
||||||
--file_name=<file_name> : (str) override file name, defaults to name from file_path.
|
--file_name=<file_name> : (str) override file name, defaults to name from file_path.
|
||||||
--file_size=<file_size> : (str) override file size, otherwise automatically computed.
|
--file_size=<file_size> : (str) override file size, otherwise automatically computed.
|
||||||
--file_hash=<file_hash> : (str) override file hash, otherwise automatically computed.
|
--file_hash=<file_hash> : (str) override file hash, otherwise automatically computed.
|
||||||
|
@ -3327,6 +3333,10 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
if fee_address:
|
if fee_address:
|
||||||
kwargs['fee_address'] = fee_address
|
kwargs['fee_address'] = fee_address
|
||||||
|
|
||||||
|
file_path = await self._video_file_analyzer.verify_or_repair(
|
||||||
|
validate_file, optimize_file, file_path, ignore_non_video=True
|
||||||
|
)
|
||||||
|
|
||||||
if replace:
|
if replace:
|
||||||
claim = Claim()
|
claim = Claim()
|
||||||
claim.stream.message.source.CopyFrom(
|
claim.stream.message.source.CopyFrom(
|
||||||
|
|
|
@ -305,6 +305,9 @@ class VideoFileAnalyzer:
|
||||||
if not validate and not repair:
|
if not validate and not repair:
|
||||||
return file_path
|
return file_path
|
||||||
|
|
||||||
|
if ignore_non_video and not file_path:
|
||||||
|
return file_path
|
||||||
|
|
||||||
await self._verify_ffmpeg_installed()
|
await self._verify_ffmpeg_installed()
|
||||||
try:
|
try:
|
||||||
scan_data = await self._get_scan_data(validate, file_path)
|
scan_data = await self._get_scan_data(validate, file_path)
|
||||||
|
|
Loading…
Reference in a new issue