News:

--

Main Menu

Problems with sound track encoding

Started by WellTell, August 15, 2015, 04:39:33 PM

Previous topic - Next topic

WellTell

Hello, I have a problem with sound files when encoding movies from my digital photocamera. I just cut the video if needed and encode it.
Video is always encoded with AVC x264.
For encoding audio track I tried several formats and none of them actually work well.

  • When encoding the sound to Vorbis, and mux it with AVI, the output bitrate of audio is 54,5 kbps, no matter value do what I set it up.
  • Sound to MP3 and mux it with AVI, the output bitrate is correct, however the lenght is increased due to the empty space at the end of the track. When playing the video, the empty space is just skipped. Or in other cases, the sliding bar showing the position of the video doesn't move and also I'm unable to go to a given position of the video (with MPC-HC player).
  • Sound to Vorbis and mux it with MKV, the output bitrate is lower than the setting. When set up to 160kbps, the output bitrate is only 92.8kbps. When set up at any higher value above the mentioned 160 kbps, the output file has bitrate 100kbps and won't go any higher, no matter the setting.
  • When I use AAC for audio and AVI muxer, the bitrate seems ok, but the length of sound track shortens. I encoded video of duration 1second and the audio track has only 253ms. The sound starts after those 3/4 duration of video. In other case, 5s video, 1,95s audio track, small delay at the beginning, can't handle the scroll button to move the position of the video - it is frozen on the start when using Media player classic home cinema. When playing with avidemux built-in player, there is small delay on the beginning and the sound mutes after that 1,95s or so.
  • When I use MP3 sound and MKV muxer, the MediaInfo can't show me the bitrate of audio track. Setting was 192kbps and quality 10 I think. After that, I found out that the quality 10 is the worst. Should this be the problem for MediaInfo to show me the bitrate? It has also for about half a second silent at the beginning but the sync is good I think. The lengths are ok.
I would like to give a try to Ogg muxer and Vorbis encoder, but I am unable to find the Ogg muxer.

The source file is:
- video format: jpeg, 30,2 Mbps
- audio format: PCM, 16bit, 256kbps
- muxer format: MPEG-4 QuickTime (MOV)

My operating system is:
MS Windows 7 32bit

Avidemux version:
2.6.10.150723

mean

Vorbis in avi is a bad idea
Stick to mkv if you use non industry standard format (i.e. ac3/mp3/AAC)

(i'm not saying vorbis is inferior in any way, just that is has not been normalized to be put in mp4 or similar afaik)

WellTell

#2
QuoteSound to Vorbis and mux it with MKV, the output bitrate is lower than the setting. When set up to 160kbps, the output bitrate is only 92.8kbps. When set up at any higher value above the mentioned 160 kbps, the output file has bitrate 100kbps and won't go any higher, no matter the setting.
I would like to, but this behaviour doesn't satisfy my needs. Why is that bitrate problem happening? Vorbis is said to be the best quality/filesize ratio for bitrates above 128kbps. I am unable to reach that bitrate.


WellTell

#4
Ok, thank you. And what about my problem with bitrates? Any idea? Or do I have to encode the sound separatedly using Audacity and then mux it with Avidemux? Why am I unable to encode it via Avidemux correctly?

Edit: I encoded the sound via Audacity to Ogg Vorbis format (setting Q5, 160kbps), the MediaInfo confirms it (vorbis, but only 64kbps), but Avidemux shows it is AC3 sound file with bitrate of 40kbps, and after muxing video and audio to MKV, the MediaInfo shows it is AC3 sound file with wice as high the sampling rate as the original audio track was (16kHz -> 32 kHz) and no info about bitrate - I'm quite confused

Edit2: video made from this soundfile and original video track doesn't play at all (in MPC-HC), in Avidemux there is no sound (I used a Copy mode)

Jan Gruuthuse

Drop MPC-HC, use VLC on your windows computer, is more forgiving on video files. Don't go to exotic on your video files.
Here some basic video files that should play, see what is most suited for your use.
3sathd sample 68MB download
arteHDresizedLAVCODEC 3.5 MB
how fast editing without re-encoding 34,8 MB

more info on avidemux can be found here: http://www.avidemux.org/admWiki/doku.php?id=using:quickstart

WellTell

#6
But I didn't mean to do such weird options like AC3 sound. I wanted to have a Vorbis sound, and encoded it into Vorbis via Audacity, but Avidemux recognised it as AC3 and somewhat damaged it so the output file had a non working AC3 sound, instead of intended Vorbis sound.

Those settings about Vorbis quality are quite clear to me, I had to read it once more and carefully.

Now I would like to encode the sound via Avidemux into Vorbis VBR, but the error pops up, saying that the sound encoder is not set up properly. Even though the Audacity was able to encode it into Vorbis VBR. However, when I set up Avidemux to encode the sound to Vorbis CBR, it works! But I want VBR, not only because Audacity is able to re-encode it to VBR. CBR sucks IMHO.
I would have used the sound from Audacity, but whenever I use Copy mode in Avidemux, the track is damaged. I have re-encode it.

edit: oh, but the MediaInfo says the sound track is in variable bitrate, even though it was encoded in CBR... now I don't understand absolutely anything

Jan Gruuthuse

QuoteI would have used the sound from Audacity, but whenever I use Copy mode in Avidemux, the track is damaged. I have re-encode it.
I don't use ogg or ogm. None of my media hardware (DLNA) players do support this. So I have no use of it, and never looked at it.

If you still have issues:
The audio track created with audacity, replace it afterwards in the saved avidemux mkv video with mkvtoolnix. Nothing else I can think of.
Use a small sample video file, approx. 1 minute duration, and test with that, if you insist on using vorbix ogm.

WellTell

It doestn't depent on ogg vorbis sound. No track in whatever format is correct when I use Copy mode. I always have to re-encode it.
But It's true that I didn't think of a playable format on any player. It was intended to play on computers only. I don't use TV very much and not for playing digital videos at all. Even I don't know what formats are supported by my Settopbox. I was able to play only audio file so far. And because of lack of any documentation available publicly for this dull box, I simply don't use it for these purposes. PCs are much more flexible.

Now I do encode both tracks, video and audio, via Avidemux. It works, even though the vorbis'es bitrate is somehow low compared to other formats, but it sounds ok. Maybe the 16kHz sample rate, 16bit depth, 256kbps PCM sound is usually compressed that much, beside if the ogg vorbis is behaving differently than e.g. mp3.

mean

The bitrate is unreliable with vorbis, meaning the value given could be wrong