AddVideo filename syntax?

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
wmorrison
Senior
Posts: 165
Joined: Sat Dec 01, 2018 12:05 am
United States of America

AddVideo filename syntax?

Post by wmorrison »

https://www.mythtv.org/wiki/Video_Service#AddVideo

I'm trying to add a video with the Video Service. I am sending a POST as required, with FileName and HostName in the POST data.

It always returns a 500 error. mythbackend.log shows "Provided filename does not exist!"

The file is directly in my videos directory, no further subdirectories (until I figure it out.) For my system that's "/data2/videos". This is the value of my VideoStartupDir setting. All other videos (found with a full scan) work fine when I play them back.

Assuming a video filename of "video.mp4" I've tried the following values for FileName (ignoring the other required parameter HostName which seems to be working.)

FileName=video.mp4
FileName=%2Fdata2%2Fvideos%2Fvideo.mp4 (url encoded '/')
FileName=/data2/videos/video.mp4 (should be url encoded but I tried raw)

Always filename does not exist.

I've looked at the source for Video::AddVideo. It calls StorageGroup::FindFile to find the full path. There are logging statements in there, so I tried:

mythbackend --setloglevel debug

and tried again, but mythbackend.log doesn't show the log statements I see in StorageGroup::FindFile.

What am I doing wrong? (Looking for both path/file syntax and how to setup logging for future issues.)
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: AddVideo filename syntax?

Post by bill6502 »

For my system that's "/data2/videos". This is the value of my VideoStartupDir setting.
The API is looking for the Storage Group: Videos. I'd verify that that points to /data2/videos
too.

If you're looking for additional logging, make sure the LOG(...) macro has the component
you're interested in, for example: VB_FILE turns into -v file. Or for debugging on just that
component, -v file:debug. -v file, by the way is VERY noisy, be sure to turn it off. For
example use -v file:alert.
wmorrison
Senior
Posts: 165
Joined: Sat Dec 01, 2018 12:05 am
United States of America

Re: AddVideo filename syntax?

Post by wmorrison »

bill6502 wrote:
Sat Jan 18, 2020 9:27 pm
The API is looking for the Storage Group: Videos. I'd verify that that points to /data2/videos too.
Thanks. That must be it. I haven't defined a Videos storage group. mythutil --scanvideos works fine when automatically scanning for all videos, but I'm working on transcoding specific recordings with handbrakecli, adding them with AddVideo, and hopefully pulling existing metadata from recordings and adding it with UpdateVideoMetadata.
Post Reply