I subscribe to various free music channels on YouTube and I'm looking to embed youtube-dl.exe in a .net program to monitor the channels and download and convert the songs as they are posted to the channels. I've gotten that part of the program working but there seems to be an issue with the mp3 files that are produced by youtube-dl. The files will play in VLC and Windows Media Player but if I try to open the files in an editor such as Audacity or Wavepad the files won't play and I've seen the following error when opening the file "Exception with MPEG Frame info: The data read as the MEPG header indicates a duration of zero". When played in the editor a blip of noise or distorted sound plays for a second to a few seconds depending on length of the song and the track will show as completed playing.
This issue also seems to affect ID3 tags. As soon as an ID3 tag is embedded the file will appear to play for a second then show completed in windows media player and will play with no sound in VLC. The ID3 tag info is picked up however so the file is not corrupted and removing the ID3 frames allows the song to play again but doesn't fix the other issues.
The arguments I'm using are: youtube-dl.exe videoURL-x --audio-format mp3 -o "path/filename.mp3"
I have the latest version at time of writing: 2015-03-24 and I've both used the --update flag and downloaded a fresh copy to rule out a corrupted exe
I've tried both the 32 and 64 bit versions of ffprobe.exe and ffmpeg.exe and downloaded fresh copies of each to rule out a corrupted exe
I've downloaded both through my program and using command line with the same results
I've tried various different songs so it's not just one video
I've tested the ID3 embedding software on songs produced from other software and it worked without issue
Any help you could offer on this issue would be appreciated.