Yes, the warning about the bits per sample referenced and stored being different is ffmpeg's way of telling you you have the wbitspersample problem. Sorry, couldn't remember the exact message when I posted above.
<edit>
The message is in the form of:
[NULL @ 018C75C0] requested bits_per_coded_sample (16) and actually stored (0) differ</edit>
My understanding (and its by no means complete) is that the AVI container stores information about the bits per sample for the audio stream within the wbitspersample field in the AVI header. This value is either zero, in which case the decoder looks for the information in the audio stream, or if not zero, must be a multiple of 8 and must align to the codecs rules that particular audio type (eg. it must align to sample size, 8, 16, 32 bits etc).
For these problem files this information is not stored correctly in the header (ie. it is non-zero, hence the name of the issue, and the wrong value is stored). ffmpeg detects this when copying the audio stream, and displays the message you got. For some devices this results in un-playable AVI's while other devices have no problem (my guess is they either ignore this field and use the true value from the audio stream, or have some value they default to eg. 16 bits, that results in some files working, others not, depending on whether the default happens to align to the real value). Remuxing a file recreates the AVI container, fixing the wbitspersample field.
Anyway, the bigger question, did this fix the problem for those files that were not playing on the Xbox?
ps. I also have a drag-and-drop version of this file if you or others want it. To use this save in a folder and drag your files on top of this one.
- Code:
@echo off
set "src="%~nx1""
set "old="%~n1.old""
if exist %old% del %old%
rem The following creates a unique temporary filname
:getTempAVI
set tempavi=temp-%RANDOM%-%TIME:~6,5%.avi
if exist "%tempavi%" GOTO getTempAVI
"C:\Program Files\Serviio\lib\ffmpeg.exe" -i %src% -vcodec copy -acodec copy %tempavi%
rename %src% %old%
rename %tempavi% %src%
echo.
echo.
echo Finished remuxing %src%.
echo Previous version renamed to %old%.
echo.
echo
rem pause
set "src="
set "old="
set "tempavi="
I also have drag and drop batch files for "ffmpeg -i" and converting one video container to another (eg. convert to an AVI, convert to an MP4) if interested. All use ffmpeg that comes with Serviio.