Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: MikeHarding on January 05, 2017, 01:07:57 AM

Title: Sony XAVC S audio problem
Post by: MikeHarding on January 05, 2017, 01:07:57 AM
First: *Thank You* to the author and all contributors for producing such an excellent piece of software AND making it freely available - your efforts are appreciated by a great many people.

I have recently purchased a new camcorder, a Sony HDR-CX405 (excellent device for the money btw) which, at its top quality setting, produces files in XAVC S format and MP4 and whilst these files load into Avidemux and their video is playable their audio is seemingly not recognised by the codec and a random series of electronic noises produced instead.

I'm running Windows 7 Pro, 32 bit and Avidemux V2.6.16 (15 did the same).

MH
Title: Re: Sony XAVC S audio problem
Post by: mean on January 05, 2017, 05:11:51 AM
a 10 sec sample would help
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 05, 2017, 10:40:15 PM
>a 10 sec sample would help

No problem :)

17 seconds of Sony HDR-CX405 XAVC S video/audio (C0001.mp4 - 108MB):

http://bit.ly/2igHAJc

MH


Title: Re: Sony XAVC S audio problem
Post by: eumagga0x2a on January 05, 2017, 11:33:41 PM
big-endian PCM, again (http://avidemux.org/smif/index.php/topic,17148.0.html).
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 06, 2017, 01:45:10 AM
>big-endian PCM, again.

My guess is not. If it were I would expect to hear audio throughout the track, albeit garbled, but after a few seconds of rubbish things go silent.

Additionally; VLC, WMP and Potplayer all play the file correctly - could be luck of course...?
Title: Re: Sony XAVC S audio problem
Post by: mean on January 06, 2017, 07:50:47 AM
It seems only half the audio is seen, hence it stops when reaching mid course
Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 06, 2017, 08:25:06 AM
Plays correctly on VLC, interesting VLC reports the audio as: Pcm s16 be (twos) codec  (https://docs.google.com/document/d/1kMkhyA3CCKJujcnvhGGjlp0xIu71J2OdE8RqsEcivU0/edit) <= Google docs info on this codec
Title: Re: Sony XAVC S audio problem
Post by: eumagga0x2a on January 06, 2017, 05:43:26 PM
Convert audio with ffmpeg losslessly to little-endian and remux it into a MKV (neither ffmpeg nor Avidemux would mux LPCM into MP4)

Code: [Select]
ffmpeg -i C0001.mp4 -c:v copy -c:a pcm_s16le C0001-s16le.mkv
and Avidemux will gladly play the audio in C0001-s16le.mkv. Remux the sample video with ffmpeg in copy mode into MKV (keeping it big-endian) and Avidemux will fail to play the audio while flooding the console with errors similar to

Code: [Select]
[getPCMPacket] 16:28:15-726  [Composer::getPCMPacket] Track 0:392c1a0 : codec failed failed
  [fillIncomingBuffer] 16:28:15-726  [Bridge] End of stream

I'm pretty sure this is the same old issue with big-endian LPCM.

Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 07, 2017, 02:46:35 AM
>and Avidemux will gladly play the audio in C0001-s16le.mkv

Not on my system.

Using the latest version of FFMPEG and your command line I can produce a mkv file which plays correctly in both VLC and Potplayer. However in Avidemux the audio is correct for the first 10 seconds but is then muted for the remainder of the video, whereas I actually talk for 16 seconds of the 17 second video.

Currently 38C (100F) here in Melbourne, Australia - phew!
Title: Re: Sony XAVC S audio problem
Post by: dosdan on January 07, 2017, 06:11:26 AM
>and Avidemux will gladly play the audio in C0001-s16le.mkv

Not on my system.

Using the latest version of FFMPEG and your command line I can produce a mkv file which plays correctly in both VLC and Potplayer. However in Avidemux the audio is correct for the first 10 seconds but is then muted for the remainder of the video, whereas I actually talk for 16 seconds of the 17 second video.


Mike, works here on Win10 - sound for the full duration of the file. Using my recent (yesterday) build of FFMPEG and ADM 2.6.18 64-bit.

Try playing my converted MKV in ADM. Hopefully, it will work for you. R-click and save:

https://dl.dropboxusercontent.com/s/4ugj6pi2dgz5b37/C0001.mkv (https://dl.dropboxusercontent.com/s/4ugj6pi2dgz5b37/C0001.mkv)


BTW, the FFMPEG command line mentioned does not preserve either the internal metadata (e.g. creation date as shown in MediaInfo) or the external date/time as shown by Windows  Here's a FFMPEG batchfile that you can put on your Windows desktop and drag-and-drop 1 or more XAVC S MP4s onto.  It will create a "Converted" subdirectory under the directory where the XAVC S files are located.  It also preserves both the inner and the outer date/time, but I had to use a free 3rd party Windows version of touch:  http://www.binarez.com/touch_dot_exe/

Convert_XAVC_S_to_MKV.bat
Code: [Select]
@echo off

cls
set filename=""

:FILES_LOOP
for %%F in (%1) do (
set filename=%%F 
echo Processing %%~fF to %%~dpFconverted\%%~nF.mkv
if not exist "%%~dpFconverted\" md "%%~dpFconverted\"
ffmpeg.exe -i %%F -c:v copy -c:a pcm_s16le  -y -hide_banner -loglevel error -map_metadata 0 "%%~dpFconverted\%%~nF.mkv
if errorlevel 1 goto ERROR_OCCURRED
rem Next line sets the MKV's file date/time to the same as the original MP4 file
touch.exe -r "%%~fF" "%%~dpFconverted\%%~nF.mkv"
rem Next line shows the MKV after it has been created, so with
        rem multiple MP4s it acts as a sort of progress indicator.
dir "%%~dpFconverted\%%~nF.mkv" | find "/"
rem Remove REM from the start of the next line if you wish to
rem delete the original file if no error occurred in the conversion.
REM del %%F
echo.
shift
)
if not "%1"=="" goto FILES_LOOP
goto FINISHED

:ERROR_OCCURRED
echo.
echo An error occurred when trying to process %filename%
echo Aborting...

:FINISHED
echo.
echo.
pause

Conversion run on 3 MP4 files, all created from C0001.MP4, but I've touched C0003.MP4 so it has a different date/time:

Code: [Select]
Processing D:\test1\C0001.MP4 to  D:\test1\converted\C0001.mkv
06/01/2017  04:37 PM       112,934,391 C0001.mkv

Processing D:\test1\C0002.MP4 to  D:\test1\converted\C0002.mkv
06/01/2017  04:37 PM       112,934,391 C0002.mkv

Processing D:\test1\C0003.MP4 to  D:\test1\converted\C0003.mkv
07/01/2017  03:05 PM       112,934,391 C0003.mkv



Press any key to continue . . .

Dan, from Brisbane.


Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 07, 2017, 07:20:08 AM
Hi Dan

Thank you for taking the time to do that.

>Try playing my converted MKV in ADM

I did and with the same result; the audio died at about 10s - odd.

Something to do with the 32/64 bit compiles maybe? When I can work up the energy I shall reformat this system to Win 7/64 - the disk is glaring at me from my desk... but you know the deal, it's not the Windows upgrade which is the issue it's all the utilities et al one uses :(

6.20pm - Temperature has now plummeted to 37C - I'll need to put a jumper on soon! :)
Title: Re: Sony XAVC S audio problem
Post by: Aspirant on January 11, 2017, 05:25:43 PM
Hello,

I am experiencing the same audio playback problem with XAVC-S from a Sony RX100 V digital camera.
I am a beginner, with very small experience with video editing/codecs, but I'm able to learn ;) I was previously able to read out the "Pcm s16 be (twos) codec" from VLC, but that was it for me...

For my own file the "ffmpeg -i C0001.mp4 -c:v copy -c:a pcm_s16le C0001-s16le.mkv" did the job for correct audio playback in Avidemux (windows 8, 64bit). It seems to play correct for the whole 27 minutes.
eumagga0x2a - thank you :)
I will look for the dosdan's solution in the future too (thanks again).

I am now able to cut the C0001-s16le.mkv file without loosing the audio; "copy" is still not supported, but a try with first chosen audio codec mp3 (lame) worked perfect.
I took the mp4v2 Muxer with default settings, hope this is correct for my XAVC-S files.

Could you please advise, give a recommendation, for good Audio-Codec option for my further reco(r)dings/ trims?
 
I will use my files for general Windows playback and I'm going to video-edit the files in the future, so I am looking for a tip for a good general purpose audio codec.


PS As we are speaking of temperatures: as I recorded my home trip last weekend, there was -14.5C in Poland. Now it's comfy +1C in Germany.
Title: Re: Sony XAVC S audio problem
Post by: mean on January 11, 2017, 08:35:39 PM
It's not an endianness issue
It's a timestamp issue

The clock is advancing at 2x the normal pace, and it swallows half of the audio track
Title: Re: Sony XAVC S audio problem
Post by: mean on January 12, 2017, 06:47:02 AM
Should be okay now
The win64 nightly is being built
Title: Re: Sony XAVC S audio problem
Post by: dosdan on January 12, 2017, 08:20:55 AM
The clock is advancing at 2x the normal pace, and it swallows half of the audio track

Mean, what was causing the 2x clock speed with an XAVC S MP4 file, but not with other MP4s?

Dan.

Title: Re: Sony XAVC S audio problem
Post by: eumagga0x2a on January 12, 2017, 09:39:21 AM
It's not an endianness issue
It's a timestamp issue

The clock is advancing at 2x the normal pace, and it swallows half of the audio track

Thank you very much, confirming also that the playback of the sample from http://avidemux.org/smif/index.php/topic,17148.0.html (http://avidemux.org/smif/index.php/topic,17148.0.html) is fixed now.
Title: Re: Sony XAVC S audio problem
Post by: Aspirant on January 12, 2017, 11:18:25 AM
Works for me too.

Any chance to use "copy" audio for trimming the video files in near future? Now I'm forced to recode to aac/ac3/mp3?
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 13, 2017, 10:11:08 AM
Thank you very much for looking at the issue. Unfortunately there is still a timing problem.

Take a look at:

http://bit.ly/2jeNw8P

C0002.mp4 - 133MB

This is a test video shot on XAVC S from my Sony camcorder.

It shows a kitchen timer and me doing a commentary for the duration of the video - VLC plays the video correctly.

Whilst Avidemux now plays the audio correctly it appears to double the length of the video. Like much of my life... it's all a bit confusing :)

20C and humid here in Melbourne and the cicadas are damn noisy.
Title: Re: Sony XAVC S audio problem
Post by: dosdan on January 13, 2017, 11:00:36 AM

Whilst Avidemux now plays the audio correctly it appears to double the length of the video.


Not on my machine.

 MediaInfo shows durations in C0002.MP4 of:

General: 20.160s
Video: 20.160s
Audio: 20.160s

Now I load it into ADM.
ADM's File | Information shows a Video Total Duration of 20.160s  @50fps  and an Audio Total Duration of 20.149s.
The timeline shows a 20.160s duration.
The sound goes all the way to the end and does not sound rushed.
The timer on screen shows 20s at the end of the clip.
My own stopwatch shows that the clip plays for 20s.

Tested with ADM 2.6.18 Win 64 nightly builds 170112 (12 Jan 2017) & 170113. Using Video:Copy, Audio:Copy, MP4v2 Muxer.

I also changed the audio to AAC (FDK) and resaved it as C0002_AAC.MP4.  MediaInfo shows durations in the new clip of:

General: 20.160s
Video: 20.160s
Audio: 20.139s

If I reload this AAC version, ADM's File | Information shows the original video duration, but the audio duration has now dropped to 20.117s.

Dan.
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 13, 2017, 08:40:32 PM
Hi Dan

I agree with all your numbers from both MediaInfo and Avidemux.

However, on my 32 bit system the video takes a real 36s to complete with the audio stopping at a real 20s. It is quite clear that both the kitchen timer and Avidemux's own running time counter are incrementing at closer to 2s than to 1s.

Producing a copy using your settings above produces the same incorrect result time.

Iam using:
http://www.avidemux.org/nightly/win32/avidemux_2.6.18_r170113_win32.exe
on Windows 7 Pro.


Title: Re: Sony XAVC S audio problem
Post by: dosdan on January 13, 2017, 09:58:36 PM
However, on my 32 bit system the video takes a real 36s to complete with the audio stopping at a real 20s.
Iam using:
http://www.avidemux.org/nightly/win32/avidemux_2.6.18_r170113_win32.exe
on Windows 7 Pro.


I installed the 32-bit version of 170113 on my Win 10 64-bit system. It did not have this problem.

What video frame rate is ADM's File | Information reporting? Mine shows 50fps. Hence, the 1008 video frames in this clip take 20.16s to play at 50fps. If the video is taking 36s to play in your ADM, that's an effective video playback rate of 28fps.

Dan.
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 13, 2017, 11:48:01 PM
Hi Dan

My ADM's "File/Information" report shows the same as yours; 20.16s at 50fps.

Further real time measurements using a manual stopwatch and averaged over six runs indicate a video duration of 35.70s which at 21.60s at 50fps does indeed equate to a frame rate of 28?

Just to confirm both VLC and WMP play the video correctly and produce the expected stopwatch time.
Title: Re: Sony XAVC S audio problem
Post by: eumagga0x2a on January 14, 2017, 12:37:27 AM
Unfortunately there is still a timing problem.

Take a look at:

http://bit.ly/2jeNw8P

C0002.mp4 - 133MB

This is a test video shot on XAVC S from my Sony camcorder.

It shows a kitchen timer and me doing a commentary for the duration of the video - VLC plays the video correctly.

This video is played perfectly in Avidemux built from [mp4/demux] Handle LPCM like PCM (https://github.com/mean00/avidemux2/commit/30e8ceae134056cd8fd0b01d53bff4c9a003d7ae) on Linux using the VDPAU as decoder and as video output driver.

Which video decoder and output are you using? Could you please compress (with 7zip or zip) and attach the admlog.txt file from Avidemux loading and playing the video?
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 14, 2017, 01:11:22 AM
The video decoder is; Lavcodec RGB - this seems to be selected automatically and I cannot see a way to change that.
Video output = Copy
Audio output = Copy
Output format = Dummy muxer

Changing the above does not make a difference.

I can paste the log file in-line but it doesn't look very useful:
----
*************************
  Avidemux v (ADM_SUBVERSION)
*************************
 http://www.avidemux.org
 Code      : Mean, JSC, Gruntster
 GFX       : Nestor Di , nestordi@augcyl.org
 Design    : Jakub Misak
 FreeBSD   : Anish Mistry, amistry@am-productions.biz
 Audio     : Mihail Zenkov
 MacOsX    : Kuisathaverat
 Win32     : Gruntster

Compiler: GCC 4.9.4
Build Target: Microsoft Windows (x86)
Operating System: Microsoft Windows 7 Business (6.1.7600; 32-bit)
Initializing WinSock
WinSock ok
Directory C:\Users\Ford Prefect\AppData\Roaming\avidemux\ exists.Good.
Using C:\Users\Ford Prefect\AppData\Roaming\avidemux\ as base directory for prefs, jobs, etc.
[jobInit] 01:00:05-250 Initializing database (C:\Users\Ford Prefect\AppData\Roaming\avidemux\jobs.sql)
[ADM_jobCheckVersion] 01:00:05-250 Db version 3, our version 3
[ADM_jobCheckVersion] 01:00:05-250 Same version, continuing..
[jobInit] 01:00:05-250 Successfully connected to jobs database..
[createBindAndAccept] 01:00:05-265 Binding on 127.0.0.1:31135192
[createBindAndAccept] 01:00:05-265 Socket bound to port 5592
[jobWindow] 01:00:05-265 Socket bound to 5592
[refreshList] 01:00:05-281 Found 0 jobs
[close] 01:00:08-666 [ADMSocket]Error when socket shutdown  -1 (socket 272)
Normal exit
Cleaning up
[jobShutDown] 01:00:08-666 Shutting down jobs database
[onexit] 01:00:08-666
Goodbye...
----
Title: Re: Sony XAVC S audio problem
Post by: Aspirant on January 14, 2017, 01:53:27 AM
OK Mike, I can confirm the audio plays faster in your video. Guys hear what he is talking about in his video...

PS interestingely, if u start at e.g. 18s the sound starts there correct...

I also checked my dogs (4k 30fps 100mbits) video and she starts to bark far earlier than the video shows it...

BTW I repeat my question: any chance to get copy audio feature for these files in the near future?
Title: Re: Sony XAVC S audio problem
Post by: dosdan on January 14, 2017, 02:27:13 AM
The video decoder is; Lavcodec RGB - this seems to be selected automatically and I cannot see a way to change that.

I can't replicate your problem, running the 32-bit version under Win 10 64-bit.

The only way I can get ADM to show "Lavcodec RGB" with that clip is to select "Qt" for the video display. 

Instead, see if you can use my settings which shows "DXVA2 DXVA2". This requires:
1. Video Display set to "DXVA2 (best)"
2. HW Accel | tick box "Decode video using DXVA2 (windows)"

Perhaps DXVA2 isn't available under Win 7?

Dan.



Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 14, 2017, 05:16:53 AM
Hi Dan

It was set to Qt, probably from my previous camera - an option to return all settings to default would be useful.

>1. Video Display set to "DXVA2 (best)"
>2. HW Accel | tick box "Decode video using DXVA2 (windows)"

Done - no difference. I also tried opengl and one other.

Via the Windows control panel I deleted Avidemux and its directory. I then re-installed the latest nightly 32 bit build but it seems Avidenux has some settings stored in the Windows registry or somewhere as it picked up my previous settings.

Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 14, 2017, 06:24:13 AM
Use file manager and search for config2, config3 and defaultSettings.py. Delete these, if found in a avidemux related folder!
Before doing so, you better you take note of your Avidemux: Edit: Preferences: [Audio], [Display] and [HW Accel]. You have to set your Preferences again.
Title: Re: Sony XAVC S audio problem
Post by: eumagga0x2a on January 14, 2017, 08:24:39 AM
I can confirm that on my outdated hardware, any decoder other than DXVA2* is uncapable to decode (and thus Avidemux uncapable to play) this 1080p video in real time on Windows 7. The video output driver is not that crucial in this case (choosing DXVA2 is better, of course).

Tested on Windows 7 with 32bit Avidemux cross-compiled from the current trunk for Windows.

*) edit: In other words, the sample plays perfectly in sync in Avidemux 32bit on Windows 7 (64bit) as far as the decoding via DXVA2 is available and enabled. Of course, DXVA2 is supported on Windows 7.

Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 14, 2017, 09:16:38 AM
>8 >8
Output format = Dummy muxer

Dummy Muxer is not producing any file output! You should use MKV muxer, MP4v2 muxer, ...
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 14, 2017, 10:06:36 PM
I am aware the dummy muxer does not produce an output file. Before I get to that stage I need the video/audio to play correctly within the application. In addition, I have tried a number of other decoders and output settings and the same fault occurs with them all.

I have now found the Avidemux preferences file:
C:\Users\Ford Prefect\AppData\Roaming\avidemux\defaultSettings.py
I "uninstalled" Avidemux, deleted the above directory and reinstalled for a totally fresh start - same problem.

I can only repeat: both VLC and WMP play this video correctly on my system.

Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 15, 2017, 06:19:12 AM
>8 >8 Before I get to that stage I need the video/audio to play correctly within the application >8 >8.

You are sure your hardware is up to the task? You're not an on a netbook running avidemux. Avidemux is not intended as mediaplayer. We are aware the player has issues.
Close all none essential programmes down: see if that changes the situation.

Quote
>8>8 I have now found the Avidemux preferences file:
C:\Users\Ford Prefect\AppData\Roaming\avidemux\defaultSettings.py >8 >8
Did you find a config2 or config3 file, this one should be deleted to.

In the same folder where that video is, delete the .idx2 file with the same name as that video.
User expectation can be different to what avidemux does.
Change your workflow. Leave video content untouched. Correct audio content 1st. Save Video and work with the new video.
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 15, 2017, 07:54:40 AM
>You are sure your hardware is up to the task?
>You're not an on a netbook running avidemux.
>Avidemux is not intended as mediaplayer.

I know very little of video editing.
I don't know much about desktop PCs.
However I do have 40 years experience as an embedded systems design engineer designing hardware and writing real-time software mainly in C and assembler. My last project, a military software defined radio, involved a Xilinx SoC with dual ARM Cortex A9 processors so I do have some idea about these computer things.

Here is a video of my monitor playing the previously uploaded sample (C0002.mp4) on WMP, VLC and Avidemux - I really don't know what else to tell you?

Except perhaps to add that I have owned this PC system for some years and have never had a problem running any software.

http://bit.ly/2iysgdu

"Video of a Video.mp4" - 17MB.
Title: Re: Sony XAVC S audio problem
Post by: mean on January 15, 2017, 08:23:43 AM
If you save as mkv, do you have the complete video ?
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 15, 2017, 09:55:46 AM
>If you save as mkv, do you have the complete video ?

I'm sorry, I don't understand what you are asking.

The camera produces C0002.mp4 as a native.

The "Video of a Video.mp4" was shot at low resolution and then fed through Avidemux to reduce its size.

Will you please expand your question?
Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 15, 2017, 10:04:27 AM
set Output Format to [Mkv Muxer] @ bottom left hand of avidemux GUI
save the loaded video. (creates a new video)

------------
These tools could provide you more info on your computer:
CPU-Z is a freeware that gathers information on some of the main devices of your system : Processor name and number, codename, process, package, cache levels
http://www.cpuid.com/softwares/cpu-z.html

Process Explorer v16.20 By Mark Russinovich
should give you an insight of processes runing on your computer.
https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx

I'm on dated hardware myself:

Intel Core i7-3770K @ 3.50GHz (4 Cores/8 Threads)
Launch Date    Q2'12
Status    End of Life
with 32 GB ram

and stopped using windows (XP, 32-bit, ages ago and now using ubuntu, 64-bit, exclusively), so I'm no longer a big help concerning windows usage.
Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 15, 2017, 11:00:53 AM
LPCM audiotrack:while using [copy] for audio:
Code: [Select]
[FF] Muxer opened
[FF] Using 122 bytes for video extradata
 [initVideo] 10:52:44-624  Video has extradata and muxer requires globalHeader, assuming it is done so.
 [FF] Video initialized
[MP3] TimeBase for video 1000/50000
[FF] Bitrate 1536
[FF]: Unsupported audio
 [open] 10:52:44-624  [Mkv] Failed to init audio

Select Output Format: [Mkv Muxer]
Select Audio Output: [MP2 (lav)] or [AAC (FDK))
Leave Video Output: [Copy]

this should have produced these 2 video clips, you
need to provide the name.

Files (245 MB total) c0002aac(fdk).mkv  & c0002mp2(lav).mkv
Will be deleted on 22 January, 2017
Download link https://we.tl/UTPecxKtzs
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 16, 2017, 03:22:01 AM
>If you save as mkv, do you have the complete video ?

OK, I think I now understand what you are asking.

If I save the video C0002.mp4 as:
Video decoder - Lavcodec DXVA2
Video output = Mpeg4 AVC (x264)
Audio output = AAC (lav)
Output format = Mkv Muxer

The resultant mkv file is correct - the audio is in sync with the video and the whole thing plays as it should.
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 16, 2017, 11:52:35 PM
No, sorry, ignore my post above - I think I must have played the resultant mkv file with the default player rather than Avidemux.

The mkv file is *not* correct when played under Avidemux however it is a little less incorrect in that the audio now ends when the kitchen timer reads 15s as opposed to the mp4 file where the audio ends at 11s.
Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 17, 2017, 07:30:17 AM
Load the newly saved mkv into avidemux.
Avidemux Menu: Audio: Save Audio: C0002.mp2
When you play C0002.mp2 with VLC, you should find the audio duration is exactly 20 seconds.

Leaving the suspicion you hardware does not have enough power to play 1920x1080 AVC in avidemux?
With the new mkv loaded, press keyboard
- nummeric 3 (zoom 1:2), press play,  is this improving playback
- nummeric 4 (zoom 1:4), press play,  is this improving playback
Title: Re: Sony XAVC S audio problem
Post by: eumagga0x2a on January 17, 2017, 07:50:24 AM
With the new mkv loaded, press keyboard
- nummeric 3 (zoom 1:2), press play,  is this improving playback
- nummeric 4 (zoom 1:4), press play,  is this improving playback

This could help a bit, but I wouldn't expect much because the non-accelerated decoding is the performance bottleneck, not the display part.

Really, there is no need for furher discussion here. The only thing we must check is whether decoding via DXVA2 is enabled, and when it is enabled, why it can't be used.
Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 17, 2017, 07:56:28 AM
Still need to establish if the saved audio has the correct duration! This would confirm a bottleneck.
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 17, 2017, 09:07:17 AM
>Load the newly saved mkv into avidemux.
>Avidemux Menu: Audio: Save Audio: C0002.mp2
>When you play C0002.mp2 with VLC, you should find the audio duration is exactly 20 seconds.

I confirm that the resultant audio file takes 20s to play on VLC. ie. the stripped audio is correct.  Interestingly, WMP refuses to play the file.

>With the new mkv loaded, press keyboard
>- nummeric 3 (zoom 1:2), press play,  is this improving playback
>- nummeric 4 (zoom 1:4), press play,  is this improving playback

I load the mkv and press numeric 3 (no feedback) - I then press play, nothing happens for a few seconds then the position slider immediately shoots to end of play (20s) but no video or audio has played.

I load the mkv and press numeric 4 (no feedback) - I then press play, the video plays in its usual incorrect manner.

The above happens irrespective of whether numlock is on or off.

>Really, there is no need for furher discussion here.

I am of the same mind.

Thank you for all you help and interest gentlemen but my moral fortitude is lagging and I fear my interest in shooting in XAVC S is rapidly following it :)

I really appreciate the time and effort you guys put into this software - thank you.

Mike
Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 17, 2017, 09:15:57 AM
Weird
You can select the zoom from Avidemux Menu: View
- Zoom 1:2
- Zoom 1:4
the displayed video should show decreased in size in avidemux GUI
Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 17, 2017, 09:23:13 AM
FYI - Windows Control panel - System reports my hardware as being:
3.0 Windows Experience Index (whatever that is!?)
AMD Athlon II X2 250 processor 3.0GHz
8GB RAM but only 2.87 usable ('cause we're 32 bit - which is why I need to upgrade to 64 bit in order to do Android development)

----

Selecting 1:2 zoom from the view menu seems to do nothing, the video plays in its normal incorrect way.
Selecting 1:4 zoom from the view menu produces a smaller image which plays in its normal incorrect way.

Time to eat the lasagne I have cooked after a 35C day and then go to bed :)

 
Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 17, 2017, 09:56:14 AM
FYI - Windows Control panel - System reports my hardware as being:
3.0 Windows Experience Index (whatever that is!?)
Windows Experience Index (WEI) score (https://en.wikipedia.org/wiki/Windows_System_Assessment_Tool)

Quote
AMD Athlon II X2 250 processor 3.0GHz
8GB RAM but only 2.87 usable ('cause we're 32 bit)
dual core (http://www.cpubenchmark.net/compare.php?cmp%5B%5D=198&cmp%5B%5D=2)

probably there is a videocard issue to.

Title: Re: Sony XAVC S audio problem
Post by: MikeHarding on January 18, 2017, 02:43:45 AM
>probably there is a videocard issue to.

I can only repeat:
WMP and VLC play the video correctly - they seem to find the hardware satisfactory.

Going to see Twelfth Night performed by the Australian Shakespeare Company in the Melbourne Botanic Gardens tonight accompanied by my younger son, a picnic and some good wine.

No playback issue with the actors I suspect - a pox on all this new-fangled computer rubbish :)
Title: Re: Sony XAVC S audio problem
Post by: Jan Gruuthuse on January 18, 2017, 05:59:59 AM
Yep and avidemux is not a media player.
Title: Re: Sony XAVC S audio problem
Post by: eumagga0x2a on January 18, 2017, 07:44:46 AM
AMD Athlon II X2 250 processor 3.0GHz
8GB RAM but only 2.87 usable ('cause we're 32 bit - which is why I need to upgrade to 64 bit in order to do Android development)

We have almost identical hardware (mine is just the next more powerful CPU in this line) :)

On Linux like on Windows, enabling hardware accelerated decoding in Avidemux, which decodes video on the GPU instead of CPU, is a requirement to be able to play the video in sync. mpv manages to play it in sync with software-only decoding at 150% CPU (~75% for each of the cores), so the margin is not that big even if Avidemux is clearly not very efficient here. The video being 50 fps surely doesn't help. Reencoding with the resample filter at 25 fps allows Avidemux to decode the resulting 1080p video real-time without assistance by hwaccel.

You need a graphics card with a hardware h264 decoder to play this at a reasonably low CPU load.