Author Topic: Recordings sometimes don't have sound  (Read 407 times)

jrnorman

  • Newbie
  • *
  • Posts: 3
Recordings sometimes don't have sound
« on: August 27, 2018, 01:00:24 PM »
I am new to Avidemux. I installed Avidemux 2.7.1 - Release on MacOS 10.13.6. I am recording broadcast films in the UK using Plex. I want to edit out adverts. Avidemux seems to work perfectly for most films, but sometimes the audio is lost in the output. I have got as far as realising that the audio is not available when the original recording first opens in Avidemux.  When I open the the file in Avidemux and click play, I hear no sound. For the files with an audio problem, I occasionally get the music but no voices. I attach two MediaInfo reports on a file where I have background music and no voice sound. 'Original' is as recorded by Plex and 'AfterCutandSave' is after I chopped off the frames before the actual movie starts (in case the previous programming is of a different format). I have voice in the tail end of the previous programme, which is chopped off in the file corresponding to the second MediaInfo report.

Any advice?

TIA John
« Last Edit: August 27, 2018, 01:05:43 PM by jrnorman »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2296
Re: Recordings sometimes don't have sound
« Reply #1 on: August 27, 2018, 05:35:07 PM »
Avidemux can't handle channel layout changes midstream. The only exception: the a52dec based audio decoder plugin for AC3 will automatically downmix to stereo if it detects a switch from stereo to 5.1 surround (but not the other way round).

If you encounter a sample where Avidemux can't detect an audio track while e.g. vlc or mpv can, please provide a sample.

jrnorman

  • Newbie
  • *
  • Posts: 3
Re: Recordings sometimes don't have sound
« Reply #2 on: August 27, 2018, 06:05:56 PM »
Thanks for responding. I had heard about challenges with format changes (deliberately using non-technical language because I don't fully understand what I'm talking about), but I thought chopping off the section before the film starts would help with that. I notice the description in MediaInfo didn't change though. Perhaps the audio format is captured/encoded when Avidemux first opens the file? What I can say is that without curtailing the file, VLC handles the audio change (if that is what is going on) while Avidemux doesn't seem to. I found a page that describes using dd to create a sample and have managed to follow the instructions successfully. The film I have goes a long time before dialogue actually starts so I would need to make the sample bigger than 20M. Is that OK? Should I put it on Dropbox and send you a link by direct message?

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2296
Re: Recordings sometimes don't have sound
« Reply #3 on: August 27, 2018, 07:16:31 PM »
Thank you for the sample. Indeed, Avidemux can't handle it well (and the stream is full of defects, I have to disable VideoToolbox hw accel in Avidemux in order to play it). As a workaround, you could save it starting with 3:17 in copy mode with ffmpeg

Code: [Select]
ffmpeg -i sample.ts -ss 3:17 -c copy sample-cut-with-ffmpeg.ts
and then feed the resulting "sample-cut-with-ffmpeg.ts" to Avidemux.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2296
Re: Recordings sometimes don't have sound
« Reply #4 on: August 27, 2018, 07:18:39 PM »
Perhaps the audio format is captured/encoded when Avidemux first opens the file?

Yes, it is detected by the demuxer and never changed afterwards.

jrnorman

  • Newbie
  • *
  • Posts: 3
Re: Recordings sometimes don't have sound
« Reply #5 on: August 27, 2018, 08:48:02 PM »
Thanks. I can confirm that worked.

For anyone as green as me following this thread. I didn't have FFmpeg and the help suggested I needed some additional files to make FFmpeg run on MacOS, which could be found in various programs including Homebrew. I chose to install Homebrew from https://brew.sh and it was very easy. With the help of YouTube I found the terminal command 'brew install ffmpeg'. Then when I ran your FFmpeg command it executed and the resulting file opened fine in Avidemux.

Can I further trouble you to share how you determined the start point? I found the film started at 3:17.000 which according to Avidemux was a black frame, but the output had a preceding frame with the BBC2 logo. When I arbitrarily set the cut point to 3:18 I didn't get a clean start. I tried picking a start point using the 'go to keyframe' buttons, but when I trimmed using 3:17.240 in FFmpeg I got an error on loading the output into Avidemux. The error was 'PTS presentation time stamp missing or monotonically increasing'

So I guess there is a technique to finding the right cut point. How did you do it? If the answer is in FFmpeg help, then feel free to tell me to find out for myself and I will put the answer in this thread if/when I find it.

Thanks for all your help. I am learning a lot.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2296
Re: Recordings sometimes don't have sound
« Reply #6 on: August 28, 2018, 09:06:11 AM »
When in copy mode, the start of the cut absolutely must be on an IDR (called I-frame in Avidemux). I used approx. the time displayed by Avidemux for the first suitable I-frame near the start of the movie.