Yes, Moodle should have made correct adjustments and the backup file size should be reduced ... that's logical thinking. However, it's not the case. Now the task at hand it to find out why? Just that one course or are there others affected thusly?
Since the SuperUser/Admin in Moodle has no real tool to browse all files in all areas and have any controls over removing/moving, etc. about the only ways to investigate is as suggested ... inspect the backup unzipped OR DB queries to find references to those same videos and further investigation as to where they are linked (if anywhere).
Have a course containing not only embed YouTube but copies of the same video linked locally (yes, not same as your situation, however, similar I think). Here's a query to find all files that have mimetype containing 'video':
select * from `mdl_files` where `mimetype` like "%video%"
The Video I have:
Congressman blames U S unemployment crisis on iPad ZDNet.flv
In the output of the query shows what content area they are in, but NO course ID ... context ID, file area (shows either intro or content). No where is there an indication that 2 of them are embedded.
Used the label to embed the video twice. Search of the mdl_label table thusly:
select * from `mdl_label` where `intro` like "%youtube%"
shows both.
Now what does all mean? Well, if one cannot find them in the courses ... the only way to see how they were referenced is in a backup inspection of the moodle_backup.xml and files.xml. Yep, realize no on has time to do so ... if things are working as they should but in this case, aren't.
Come to think of it ... if you notice the filename for the video above has spaces in it's name. Wonder if that has an affect on things here.
When I backed up that course ... this message:
"File references to external contents included in backup package, they won't work on other sites."
appeared at the completion of the backup.
Downloaded the backup ... and inspected the files.xml file.
All references to the .flv were NOT the same.
Two had these tags:
<repositorytype>local</repositorytype>
<repositoryid>1</repositoryid>
<reference>YTo2OntzOjk6ImNvbnRleHRpZCI7aTozMztzOjk6ImNvbXBvbmVudCI7czoxMjoibW9kX3Jlc291cmNlIjtzOjY6Iml0ZW1pZCI7aTowO3M6ODoiZmlsZWFyZWEiO3M6NzoiY29udGVudCI7czo4OiJmaWxlcGF0aCI7czoxOiIvIjtzOjg6ImZpbGVuYW1lIjtzOjYzOiJDb25ncmVzc21hbiBibGFtZXMgVSBTICB1bmVtcGxveW1lbnQgY3Jpc2lzIG9uIGlQYWQgICBaRE5ldC5mbHYiO30=</reference>
Two had:
<repositorytype>$@NULL@$</repositorytype>
<repositoryid>$@NULL@$</repositoryid>
<reference>$@NULL@$</reference>
'spirit of sharing', Ken