MP4 from Youtube short-loaded using FFMPEG

2.1.0 from DMG with FFMPEG 2.2.2 from DL button short-loads this Youtube clip, after I download its 3.87Mib to my drive.

https://www.youtube.com/watch?v=awKGqT4g7q0

I only get 2:42 of it, while it’s 3:57 on YT.

Quite a number of other MP4s pulled from YT at the same time do not display this problem, some of them substantially longer than that, up to 9:00 – so I assume that this is not from some “long MP3 bug” which QLab sees fit to warn me about quite frequently (though I do not know what bug that is).

Any thoughts?

Does it run at the right speed? Does it get to the end too soon? How are you getting the files?
Koz

I posted a reply to this; dunno where it went.

The part of it that’s there plays at the proper speed. The audio segment on the timeline is shorter than the clip as it plays on YT; it plays right to the end of the segment and stops hard, but this is before the end of the music. I downloaded them all using the python youtube-dl script from (I think) github. This is the only one that’s ever displayed this problem in any version of Audacity on any platform. Youtube-dl, which is selfupdating, was updated to that day, and worked on the other video of that song, posted by a different person.

Weird…

I get 4.061.044 bytes from YT. When opened in Audacity, it plays in under a second.

Audio export from Quicktime Player is 2 min 43 sec too and plays OK.
Audio export from VLC contains no sound and is only about 58 Kbytes. When opened in Audacity, it opens with 4 channels, but still no sound.

Even weirder.

The file is corrupt as uploaded to YouTube, I would say.

2 mins 42 seconds is exactly where the playhead on YouTube stops moving, even though that is not the end of the file.

Gale

Not here; on my MBP with 10.10.2, and Firefox 37.0.2 (and flashplayer 17.0.0.69), it plays through there, to the end.

For me (also Firefox 37.02 and Shockwave Flash player 17.0.0.69), the file audibly plays to the end but the circular playhead/grabhandle stops moving at 2 minutes 42 seconds. The grabhandle should keep moving to the end of the file.

Gale

I wasn’t clear, sorry.

I downloaded the file with a php script I was testing at the time . First I watched it on Youtube. It plays perfectly with HTML5. No Flash.

Then I converted the file with Quicktime, Audacity and VLC. That’s when the weirdness started…

QT export played OK
Audacity got 4 tracks, but no audio.
VLC export was only about 58 Kbytes and no audio.

I’d say the headers are wrong. If that is an error form YT, or from downloading, I don’t know. I only seldom download stuff from YT.

I just had a big cleanup on my computer, so I tried to replicate my test on OSX 10.9.5, no browser involved:

downloaded with youtube-dl:
http://rg3.github.io/youtube-dl/
This is a python script that uses wget to get the file.

result: 4.1 MB mp4
Opened in QT Player. Plays OK stops at 2:44
Saved as mp4, 4.1 MB plays OK
Exported audio as m4a, result: 95 kbps 44.1, 2:44 2 MB, plays OK in iTunes

Opened mp4 in Audacity 2.1.0
Plays a short noise, length is 0.096 sec in Audacity
Imported mp4, same result
Opened and imported m4a, created by QT, same result

Sound Forge, Reaper and the Finder opened and played all three files.

There’s something in the headers that confuses Audacity or ffmpeg.

Sounds like; in case I didn’t already say, I loaded it directly into Audacity via FFMPEG.

I’ve been doing some more testing. Can’t seem to produce any audio output from video that doesn’t either crash Audacity or opens, but doesn’t play. My notes:

Import from 4K QuickTime mov
Audacity crashed with both test files
see Audacity crash report:
Audacity crash log.txt (58.9 KB)
Dolby AC3 5.1
Failed like YT downloads

HD1080 mp4
Failed like YT downloads
see Audacity crash report 2:
Audacity crash log 2.txt (58.9 KB)
AVCodec version 0x373466 - 55.52.102 (built against 0x373466 - 55.52.102)
AVFormat version 0x372164 - 55.33.100 (built against 0x372164 - 55.33.100)
AVUtil version 0x344264 - 52.66.100 (built against 0x344264 - 52.66.100)

path: /Library/Application Support/audacity/libs/./

Are you using a 2.1.0-alpha from 5th March? The crash reports seem to suggest that and/or that the MP3 importer (libmad) is getting involved.

Have you added any rules in Extended Import Preferences?

What happens if you quit Audacity, delete audacity.cfg then use 2.1.0 release?

If the problem persists please provide all the example files then we can test.

Thanks.


Gale

I used Audacity 2.1.0 on OSX 10.9.5. No rules. I opened up a new empty project for every test.

Test files: I couldn’t find any mp4 that imported correctly. Posting the test files isn’t really practical, as they are very big (and not publicly available). But any mp4 should do. I started out with Youtube downloads, downloaded with a python script.

I also have quit Audacity in between tests and restarted OSX. The error is consistent with any mp4 on my machine.

Most other imports work well (haven’t tested them all yet). And even audio exported by QuickTime player as m4a produces the same error when imported into Audacity.

Note: the same files work perfectly in the Finder (preview), Sound Forge, Reaper…

Here you can find one of my mp4 test files. It’s open…

https://mango.blender.org/download/

Unfortunately, it’s a 740 MB download.

Another one is “TEST.TOOL.Ac3 Dolby Digital 5.1Ch Sound Test.avi”. You can find it all over the net.

And to test YT downloaded files, I used this one:
https://www.youtube.com/watch?v=IFD4xK5p5Vo

And dozens of others.

I’ll pass on that until I’m convinced I need to download it. :wink:

I would suggest you test with the latest 2.1.1-alpha from the top of http://www.audacity.homerow.net/index.php?dir=mac/&sort=date&order=desc. 2.1.0 won’t be retrospectively fixed.

That imports fine for me in 2.1.1-alpha or 2.1.0 release using FFmpeg 2.2.2 from Audacity Manual .

If Audacity does not crash please provide the Audacity log after trying to import it into 2.1.1-alpha.

If 2.1.1-alpha crashes please provide another crash report, in case it’s different to the last two.

I tried a YouTube file that I downloaded on Windows using Internet Download Manager. It imported properly into 2.1.1-alpha using QuickTime (if FFmpeg was removed) or using FFmpeg (if that was available).

Obviously it will not import into 2.1.0 without FFmpeg due to the issue FFmpeg required for MP4/M4A/MOV/ALAC import that is now fixed in 2.1.1-alpha.

Again if Audacity does not crash, please provide the log from 2.1.1-alpha.

In 2.1.1-alpha I can reproduce importing MP4 as a few milliseconds of noise if I set an Extended Import rule to try the MP3 importer first. The MP3 importer should not be used to import MP4 files.

I suggest you look in Extended Import Preferences to make sure you have not set rules. Otherwise, QuickTime or FFmpeg should try the MP4 before the MP3 importer does. Here is my log from 2.1.1-alpha with FFmpeg removed, importing a YouTube video:

20:45:10: Audacity 2.1.1-alpha-May  5 2015
20:45:10: Trying to load FFmpeg libraries...
20:45:10: mLibAVFormatPath ('libavformat.55.dylib') is not empty. Loading from it.
20:45:10: Checking for monolithic avformat from 'libavformat.55.dylib'.
20:45:10: Error: dlopen(libavformat.55.dylib, 1): image not found
20:45:10: Loading avutil from ''.
20:45:10: Error: dlopen(.bundle, 1): image not found
20:45:10: Loading avcodec from ''.
20:45:10: Error: dlopen(.bundle, 1): image not found
20:45:10: Loading avformat from 'libavformat.55.dylib'.
20:45:10: Error: dlopen(libavformat.55.dylib, 1): image not found
20:45:10: Error: Failed to load FFmpeg libraries.
20:45:10: Trying to load FFmpeg libraries from default path, '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
20:45:10: Checking for monolithic avformat from '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
20:45:10: Error: dlopen(/Library/Application Support/audacity/libs/libavformat.55.dylib, 1): image not found
20:45:10: Loading avutil from ''.
20:45:10: Error: dlopen(.bundle, 1): image not found
20:45:10: Loading avcodec from ''.
20:45:10: Error: dlopen(.bundle, 1): image not found
20:45:10: Loading avformat from '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
20:45:10: Error: dlopen(/Library/Application Support/audacity/libs/libavformat.55.dylib, 1): image not found
20:45:10: Error: Failed to load FFmpeg libraries.
20:45:10: Trying to load FFmpeg libraries from legacy path, '/usr/local/lib/audacity/libavformat.55.dylib'.
20:45:10: Checking for monolithic avformat from '/usr/local/lib/audacity/libavformat.55.dylib'.
20:45:10: Error: dlopen(/usr/local/lib/audacity/libavformat.55.dylib, 1): image not found
20:45:10: Loading avutil from ''.
20:45:10: Error: dlopen(.bundle, 1): image not found
20:45:10: Loading avcodec from ''.
20:45:10: Error: dlopen(.bundle, 1): image not found
20:45:10: Loading avformat from '/usr/local/lib/audacity/libavformat.55.dylib'.
20:45:10: Error: dlopen(/usr/local/lib/audacity/libavformat.55.dylib, 1): image not found
20:45:10: Error: Failed to load FFmpeg libraries.
20:45:10: Trying to load FFmpeg libraries from system paths. File name is 'libavformat.55.dylib'.
20:45:10: Checking for monolithic avformat from 'libavformat.55.dylib'.
20:45:10: Error: dlopen(libavformat.55.dylib, 1): image not found
20:45:10: Loading avutil from ''.
20:45:10: Error: dlopen(.bundle, 1): image not found
20:45:10: Loading avcodec from ''.
20:45:10: Error: dlopen(.bundle, 1): image not found
20:45:10: Loading avformat from 'libavformat.55.dylib'.
20:45:10: Error: dlopen(libavformat.55.dylib, 1): image not found
20:45:10: Error: Failed to load FFmpeg libraries.
20:45:10: Error: Failed to find compatible FFmpeg libraries.
20:45:10: Looking for FFmpeg libraries...
20:45:10: mLibAVFormatPath ('libavformat.55.dylib') is not empty.
20:45:12: User-specified path = 'libavformat.55.dylib'
20:45:12: Error: User-specified file does not exist. Failed to find FFmpeg libraries.
20:45:12: Trying to load FFmpeg libraries...
20:45:12: mLibAVFormatPath ('libavformat.55.dylib') is not empty. Loading from it.
20:45:12: Checking for monolithic avformat from 'libavformat.55.dylib'.
20:45:12: Error: dlopen(libavformat.55.dylib, 1): image not found
20:45:12: Loading avutil from ''.
20:45:12: Error: dlopen(.bundle, 1): image not found
20:45:12: Loading avcodec from ''.
20:45:12: Error: dlopen(.bundle, 1): image not found
20:45:12: Loading avformat from 'libavformat.55.dylib'.
20:45:12: Error: dlopen(libavformat.55.dylib, 1): image not found
20:45:12: Error: Failed to load FFmpeg libraries.
20:45:12: Trying to load FFmpeg libraries from default path, '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
20:45:12: Checking for monolithic avformat from '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
20:45:12: Error: dlopen(/Library/Application Support/audacity/libs/libavformat.55.dylib, 1): image not found
20:45:12: Loading avutil from ''.
20:45:12: Error: dlopen(.bundle, 1): image not found
20:45:12: Loading avcodec from ''.
20:45:12: Error: dlopen(.bundle, 1): image not found
20:45:12: Loading avformat from '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
20:45:12: Error: dlopen(/Library/Application Support/audacity/libs/libavformat.55.dylib, 1): image not found
20:45:12: Error: Failed to load FFmpeg libraries.
20:45:12: Trying to load FFmpeg libraries from legacy path, '/usr/local/lib/audacity/libavformat.55.dylib'.
20:45:12: Checking for monolithic avformat from '/usr/local/lib/audacity/libavformat.55.dylib'.
20:45:12: Error: dlopen(/usr/local/lib/audacity/libavformat.55.dylib, 1): image not found
20:45:12: Loading avutil from ''.
20:45:12: Error: dlopen(.bundle, 1): image not found
20:45:12: Loading avcodec from ''.
20:45:12: Error: dlopen(.bundle, 1): image not found
20:45:12: Loading avformat from '/usr/local/lib/audacity/libavformat.55.dylib'.
20:45:12: Error: dlopen(/usr/local/lib/audacity/libavformat.55.dylib, 1): image not found
20:45:12: Error: Failed to load FFmpeg libraries.
20:45:12: Trying to load FFmpeg libraries from system paths. File name is 'libavformat.55.dylib'.
20:45:12: Checking for monolithic avformat from 'libavformat.55.dylib'.
20:45:12: Error: dlopen(libavformat.55.dylib, 1): image not found
20:45:12: Loading avutil from ''.
20:45:12: Error: dlopen(.bundle, 1): image not found
20:45:12: Loading avcodec from ''.
20:45:12: Error: dlopen(.bundle, 1): image not found
20:45:12: Loading avformat from 'libavformat.55.dylib'.
20:45:12: Error: dlopen(libavformat.55.dylib, 1): image not found
20:45:12: Error: Failed to load FFmpeg libraries.
20:45:12: Error: Failed to find compatible FFmpeg libraries.
20:45:22: File name is /Users/gale/Downloads/If This Is Our Last Dance Lene Siel.mp4
20:45:22: Mime type is *
20:45:22: Opening with libav
20:45:24: Opening with libsndfile
20:45:24: Opening with liboggvorbis
20:45:24: Opening with libflac
20:45:24: Opening with lof
20:45:24: Opening with quicktime
20:45:25: Open(/Users/gale/Downloads/If This Is Our Last Dance Lene Siel.mp4) succeeded

If the problem is specific to the python script, please provide a short MP4 video (pop song length) from YouTube downloaded using that script.

Thanks,

Gale

Tested with Audacity 2.1.1-alpha-May 5 2015
Used import function in new, unsaved, empty project. MP3/wav import ok. All files play OK in the Finder and VLC.

  • TEST.TOOL.Ac3 Dolby Digital 5.1Ch Sound Test.avi
    Imports, but plays way too fast.

  • ToS-4k-1920.mov
    Crashed Audacity, crash report:
    Audacity crash log 3.txt (60.1 KB)
    Log after opening Audacity:

23:13:00: Audacity 2.1.1-alpha-May  5 2015
23:13:00: Error: dlopen(.bundle, 2): image not found
23:13:01: Trying to load FFmpeg libraries...
23:13:01: Trying to load FFmpeg libraries from default path, '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
23:13:01: Checking for monolithic avformat from '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
23:13:01: avformat not monolithic
23:13:01: Loading avutil from '/Library/Application Support/audacity/libs/./libavutil.52.dylib'.
23:13:01: Loading avcodec from '/Library/Application Support/audacity/libs/./libavcodec.55.dylib'.
23:13:01: Loading avformat from '/Library/Application Support/audacity/libs/libavformat.55.dylib'.
23:13:01: Actual avutil path /Library/Application Support/audacity/libs/./libavutil.52.dylib
23:13:01: Actual avcodec path /Library/Application Support/audacity/libs/./libavcodec.55.dylib
23:13:01: Actual avformat path /Library/Application Support/audacity/libs/libavformat.55.dylib
23:13:01: Importing symbols...
23:13:01: All symbols loaded successfully. Initializing the library.
23:13:01: Retrieving FFmpeg library version numbers:
23:13:01:    AVCodec version 0x373466 - 55.52.102 (built against 0x373466 - 55.52.102)
23:13:01:    AVFormat version 0x372164 - 55.33.100 (built against 0x372164 - 55.33.100)
23:13:01:    AVUtil version 0x344264 - 52.66.100 (built against 0x344264 - 52.66.100)
23:13:01: FFmpeg libraries loaded successfully.
  • 10 - David Elias - Hawaiian Meditations - Big Island - HD 1080p.mp4
    Hangs on import after 10 seconds. Chrashes eventually, after 20 min. Last log line:
    23:17:40: Open(/Users/wim/Desktop/Test files audio & video/10 - David Elias - Hawaiian Meditations - Big Island - HD 1080p.mp4) succeeded

  • The m4a Quicktime export of the OP’s Youtube I made earlier opened, but produced a hell of a high pitched noise. The volume of this noise is 100%, no matter what system volume is set to (or RME’s TotalMix).

  • The original downloaded mp4 behaved the same as above.

One observation: when i zoom in on the wave form, it doesn’t get longer. The zoom works, but there’s no horizontal scrollbar appearing.

It changed a bit, but this bug seems to be something else.

Next, I’ll try installing ffmpeg 2.2.2, just in case mine’s not so recent.

Installed ffmpeg 2.2.2 no change.
Did a restart no change.

Finally, tested with system audio only. Same result.

Might have saved some tweeters…

Did you delete audacity.cfg? If not, please quit Audacity then do so.

How long is it supposed to be? The version I obtained was just over 48 seconds long in VLC and that’s its length after importing into Audacity and that is how long it takes to play there.

I don’t know what that file is but it appears to show the same problem that libmad is attempting the file.

Please provide a log after incorrectly importing a file.

Please provide the log starting from “File name is” so that I can see what importer(s) attempted the file.

Please provide those files as they are short. I will try them if they are still problematic for you after you have quit Audacity and deleted audacity.cfg.

Is that with all files or just the misbehaving ones?

Make sure you obtain it from the buanzo “lame” site.


Gale