Yet Another MP4 import screechy sound issue

Help for Audacity 2.x.x on Windows.
Forum rules
ImageThis forum is for Audacity 2.x.x on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
kozikowski
Forum Staff
Posts: 41330
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: OS X 10.9 Mavericks

Re: Yet Another MP4 import screechy sound issue

Post by kozikowski » Wed May 30, 2018 12:19 pm

I don't do anything in MP4. We'll need to wait for a different forum elf.

Koz

steve
Site Admin
Posts: 48679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Yet Another MP4 import screechy sound issue

Post by steve » Wed May 30, 2018 12:43 pm

GreyCoder wrote:5) If someone could point me to a known working MP4 file I'd be happy to test against it
Here's a 10 second test file:
test.m4a
(242.6 KiB) Downloaded 124 times
This is what MediaInfo says about it:

Code: Select all

Format                                   : MPEG-4
Format profile                           : Apple audio with iTunes info
Codec ID                                 : M4A  (isom/iso2)
File size                                : 243 KiB
Duration                                 : 10s 37ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 198 Kbps
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
Writing application                      : Lavf56.40.101

Audio
ID                                       : 1
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 10s 37ms
Duration_LastFrame                       : -18ms
Bit rate mode                            : Constant
Bit rate                                 : 196 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Frame rate                               : 43.066 fps (1024 spf)
Compression mode                         : Lossy
Stream size                              : 240 KiB (99%)
Default                                  : Yes
Alternate group                          : 1
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

GreyCoder
Posts: 9
Joined: Tue May 29, 2018 5:04 am
Operating System: Windows 8 or 8.1

Re: Yet Another MP4 import screechy sound issue

Post by GreyCoder » Fri Jun 01, 2018 7:40 am

ok I did some more experimenting. I downloaded some more YouTube videos and none of them worked.
I took some videos with my YI 4K (not plus) and they also didn't work.

All of them were too big to upload here. So I tried the following:
1) Used Audacity to generate a know tone (500hz). Took a video of it with my YI 4K (non plus). That didn't work with Audacity either. So I tried using FFmpeg with various settings to see if I could compress it down to a small enough file size so I could upload it here. To my surprise I came up with two files, one worked, one doesn't. I'm uploading them here.

For clarity: both of these MP4 files were compressed by FFmpeg from an original YI 4K video of Audacity playing a generated tone. 500hz

ffmpeg -i ydxj0020.mp4 -vf scale=-1:1080 -crf 21 -preset slow -c:a copy smaller-21.mp4 // doesn't work
ffmpeg -i ydxj0020.mp4 -vf scale=-1:1080 -crf 22 -preset slow -c:a copy smaller7-22.mp4 // Works

MediaPro gives the following information from the original YI 4K MP4 file:

Code: Select all

General
Complete name                            : G:\zz zz zz YI 4K- test\Test Batch 3\YDXJ0020.MP4
Format                                   : MPEG-4
Format profile                           : JVT
Codec ID                                 : avc1 (avc1/isom)
File size                                : 3.41 MiB
Duration                                 : 792 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 36.1 Mb/s
Encoded date                             : UTC 2014-01-01 19:21:42
Tagged date                              : UTC 2014-01-01 19:21:42

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 1 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 1 frame
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 792 ms
Bit rate mode                            : Variable
Bit rate                                 : 36.0 Mb/s
Maximum bit rate                         : 24.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.723
Stream size                              : 3.40 MiB (100%)
Title                                    : XiaoYi AVC   
Language                                 : English
Encoded date                             : UTC 2014-01-01 19:21:42
Tagged date                              : UTC 2014-01-01 19:21:42
Color range                              : Full
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 789 ms
Bit rate mode                            : Constant
Bit rate                                 : 132 kb/s
Nominal bit rate                         : 48.0 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 12.9 KiB (0%)
Title                                    : XiaoYi AAC   
Language                                 : English
Encoded date                             : UTC 2014-01-01 19:21:42
Tagged date                              : UTC 2014-01-01 19:21:42
Attachments
smaller7-21.mp4
Doesn't work
ffmpeg -i ydxj0020.mp4 -vf scale=-1:1080 -crf 21 -preset slow -c:a copy smaller7-21.mp4
(1.81 MiB) Downloaded 112 times
smaller7-22.mp4
Works
ffmpeg -i ydxj0020.mp4 -vf scale=-1:1080 -crf 22 -preset slow -c:a copy smaller7-22.mp4
(1.52 MiB) Downloaded 112 times
Last edited by steve on Fri Jun 01, 2018 8:40 am, edited 1 time in total.
Reason: code tags added to improve readability

GreyCoder
Posts: 9
Joined: Tue May 29, 2018 5:04 am
Operating System: Windows 8 or 8.1

Re: Yet Another MP4 import screechy sound issue

Post by GreyCoder » Fri Jun 01, 2018 7:43 am

Thanks!

I downloaded the test file and it works ok in Audacity.
It plays ok in VLC but didn't have any video. I assume that's as intended.

GreyCoder
Posts: 9
Joined: Tue May 29, 2018 5:04 am
Operating System: Windows 8 or 8.1

Re: Yet Another MP4 import screechy sound issue

Post by GreyCoder » Fri Jun 01, 2018 7:47 am

I should have made this more clear in my last post.
Looking at the different FFmpeg command line parameters it appears that the key difference is in the
compression specifier.

The two different command lines were:
ffmpeg -i ydxj0020.mp4 -vf scale=-1:1080 -crf 21 -preset slow -c:a copy smaller7-21.mp4 // doesn't work
ffmpeg -i ydxj0020.mp4 -vf scale=-1:1080 -crf 22 -preset slow -c:a copy smaller7-22.mp4 // Works

-------------------------------------------------------^^---------------------------------------^^--------------------
ie the "-crf" parameter "21" didn't work
"22" Works

Not sure what this means but it seems like a good clue

Thanks!

steve
Site Admin
Posts: 48679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Yet Another MP4 import screechy sound issue

Post by steve » Fri Jun 01, 2018 8:42 am

GreyCoder wrote:Not sure what this means but it seems like a good clue
Documentation for FFmpeg is here: https://ffmpeg.org/ffmpeg.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

GreyCoder
Posts: 9
Joined: Tue May 29, 2018 5:04 am
Operating System: Windows 8 or 8.1

Re: Yet Another MP4 import screechy sound issue

Post by GreyCoder » Fri Jun 01, 2018 2:07 pm

Thanks, I had already googled to that link

What I meant was, I don't know why such a small difference in the value ("21" vs "22") would
cause the issue (Audacity not loading audio from MP4 file correctly)

Before I made the post I had experimented with various compression specifiers. So far, it appears that
on my test file:
any value <= 21 fails
any value >= 22 works

FFmpeg uses a default value of "23" (according to my reading of the documentation).

Apparently there's more involved than just the compression specifier, since I haven't found
a YouTube video that works (yet).

Here's a non-working example from YouTube. I
"The Good- the Bad and the Ugly Theme"
https://www.youtube.com/watch?v=h1PfrmCGFnk

If someone has a link to a working YouTube video, I'd be happy to test in on my system

Thanks

DVDdoug
Forum Crew
Posts: 3598
Joined: Fri Sep 10, 2010 11:30 pm
Operating System: Windows 10

Re: Yet Another MP4 import screechy sound issue

Post by DVDdoug » Fri Jun 01, 2018 10:10 pm

I downloaded The Good, The Bad, and The Ugly with ClipGrab and it opened fine in Audacity (with the default FFmpeg installation).

steve
Site Admin
Posts: 48679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Yet Another MP4 import screechy sound issue

Post by steve » Sat Jun 02, 2018 12:03 pm

Worked fine for me with 1-Click YouTube Video Download.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

GreyCoder
Posts: 9
Joined: Tue May 29, 2018 5:04 am
Operating System: Windows 8 or 8.1

Re: Yet Another MP4 import screechy sound issue

Post by GreyCoder » Sat Jun 02, 2018 3:16 pm

Thanks for posting!

Yes indeed I used ClipGrab and the MP4 file doesn't work on my installation! So somehow I screwed up the installation of Audacity/FFmepg...that's progress, 1,001 failures (apparently on my part) at a time!

Thanks again everybody for their responses, now that I have a known test case, that works for other ppl but not me, I can try various installation permutations until I to can have success...

Thanks again, having a know test case that works is very important, now I can spin my wheels trying to find out what I did wrong...

I assume Windows 8.1 is good for this? I'd hate to chase boogies that work on win 10 but not on win 8.1...

thanks again

Post Reply