Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: athiril on January 20, 2017, 08:28:00 AM

Title: Wrong audio length when opening videos
Post by: athiril on January 20, 2017, 08:28:00 AM
Was trying to figure out why my output videos always have garbled audio, then I noticed the audio only plays for half the length, checked avidemux and the input information is always half the audio length of what it should be on all my videos captured via an A7s.

I cant remember this happening on previous versions.



http://i.imgur.com/J9xMWS0.jpg

Also is there any way to get AviDemux to not alter the colour and dull it down when opening and exporting a video? Converting with VLC and Premiere Pro doesnt seem to have this issue, but I like to use AviDemux for convenient transcoding, and sometimes output of final videos as compression is usually relatively quicker than most other programs.

Colour should be more like this
http://i.imgur.com/s0Hy5cy.jpg

If I take a video and export from Premiere Pro, its much more normal but still looks like a slight mismatch
http://imgur.com/a/GQnXy
Title: Re: Wrong audio length when opening videos
Post by: Jan Gruuthuse on January 20, 2017, 10:28:36 AM
provide 10 seconds videoclip  from A7s with
- one png what it should look like?
- one png what it should not look like?

lpcm audio seems to give some issues recently?

info: upload (http://avidemux.org/smif/index.php/topic,17418.msg79001.html#msg79001)
Title: Re: Wrong audio length when opening videos
Post by: athiril on January 20, 2017, 12:04:03 PM
Bottom in each image is what it should look like, top is AviDemux screenshot - which is the same result as its encoded output
http://imgur.com/a/N0THh
http://imgur.com/a/jDYCY

Its obvious in the volcano clip and landscape images, but I dont want to just release those like that or have them online yet, and I cant find my passport checker, so this'll have to do.

Now that I compare it, it looks like input levels are being applied to the blacks and shifting them up into greys, which washes everything out.



clip:
https://www.dropbox.com/s/p8z8ijzq2jpfh1u/C0055.MP4?dl=0
Title: Re: Wrong audio length when opening videos
Post by: Jan Gruuthuse on January 20, 2017, 04:24:49 PM
Don't know what developers will tell?
Possibilities: bit depth is changing between source video and transcoded video:
8bit pixel formats; colorspace supports 10/12bit, device-dependent ââ,¬â€¹Bt-601, ââ,¬â€¹Bt-709 & Bt-2020
Filter using
- colormatrix supports only 8bit pixel formats
- colorspace supports 10/12bit content also

Your digital photo camera shoots video probably in another colorspace: YUV, RGB, linearized RGB,  sRGB, Adobe RGB, device-independent XYZ colorspace. Sometimes selectable.

So visual judgement is hard to make, suggest you wait for reply of one of the developers.

Is it required to re-encode the video? when using  for Video Output [Copy] the video should not be touched (imagewise)
Title: Re: Wrong audio length when opening videos
Post by: Jan Gruuthuse on January 20, 2017, 04:27:44 PM
checking the properties of source video and recoded video could give some clues: MediaInfo (https://mediaarea.net/en/MediaInfo). compare against each other.
Title: Re: Wrong audio length when opening videos
Post by: athiril on January 21, 2017, 02:18:43 AM
The second screen grabs are the same frame from video source not from a photo. Copy video works, but often I like to make small files for uploading to the web.

Checking a screen grab from AviDemux or a screen grab from its re-encoded video file, its definitely the black levels, you open up the levels and the black levels have been shifted up towards grey.
Title: Re: Wrong audio length when opening videos
Post by: Jan Gruuthuse on January 21, 2017, 06:19:59 AM
that is a visual observation, not a technical one.
Title: Re: Wrong audio length when opening videos
Post by: eumagga0x2a on January 21, 2017, 07:50:00 PM
Quote from: athiril on January 20, 2017, 08:28:00 AM
Was trying to figure out why my output videos always have garbled audio, then I noticed the audio only plays for half the length, checked avidemux and the input information is always half the audio length of what it should be on all my videos captured via an A7s.

Have you tried a recent nightly (http://avidemux.org/nightly/) (from Jan 13 and later)? This works for me with Avidemux built from the current git and the sample you've uploaded. The duration of both video and audio is detected as ~12.5s.
Title: Re: Wrong audio length when opening videos
Post by: athiril on January 22, 2017, 01:12:42 AM
Quote from: Jan Gruuthuse on January 21, 2017, 06:19:59 AM
that is a visual observation, not a technical one.
It is quite clearly the problem, I opened both up in Photoshop to inspect the levels, the black point has been raised. Correcting the black point (using only the luma black point slider) restores the image to its original look, no hue or saturation difference etc, of course being an 8-bit space some in between steps in the tonal scale will have been lost compressing the histogram like that.

Quote from: eumagga0x2a on January 21, 2017, 07:50:00 PM
Quote from: athiril on January 20, 2017, 08:28:00 AM
Was trying to figure out why my output videos always have garbled audio, then I noticed the audio only plays for half the length, checked avidemux and the input information is always half the audio length of what it should be on all my videos captured via an A7s.

Have you tried a recent nightly (http://avidemux.org/nightly/) (from Jan 13 and later)? This works for me with Avidemux built from the current git and the sample you've uploaded. The duration of both video and audio is detected as ~12.5s.

I haven't yet, I shall give that a go.

edit: Audio appears more or less correct now, just the slightest discrepancy in reported length - is that normal?
http://i.imgur.com/jKU2NhL.jpg
Title: Re: Wrong audio length when opening videos
Post by: eumagga0x2a on January 24, 2017, 07:40:31 AM
Quote from: athiril on January 22, 2017, 01:12:42 AM
edit: Audio appears more or less correct now, just the slightest discrepancy in reported length - is that normal?

Yes, it is.