egr
6th October 2019, 11:40
I demux media files down to just their pure audio side so I can transfer the smaller and less intense file to be played back on a portable device but I notice sometimes FFMPEG adds random silence to the end of the file. For example, a 5 minute demuxed file, will show having only 3 minutes of actual audio with the other two minutes being silence when played back under windows media player. With MPC-HC, it thinks it's only got 2 minutes of playback length but the file plays over the two minute mark and thus isn't the true representation of the playback length which is in fact 5 minutes and not 2 minutes as touted by MPC-HC or 3 minutes played back by windows media player but having 2 minutes of silence at the end of the file. Pot Player seems to have red it more correctly and shows the full length file and plays it back as well fine as well as being able to navigate to different time stamps fine too. This is just for the one file....
Any ideas what this is caused by and how to fix this through FFMPEG? Perhaps my demux lines are incorrect? Check below for line:
::Demux AAC from M4A:
for %%f in (*.m4a) do ffmpeg -i "%%f" -vn -acodec copy "%%~nf.aac"
::Demuxes audio from mp4 files
for %%f in (*.mp4) do ffmpeg -i "%%f" -vn -acodec copy "%%~nf.aac"
::Demuxes audio from mkv files
for %%f in (*.mkv) do ffmpeg -i "%%f" -vn -acodec copy "%%~nf.opus"
I use dBpoweramp to convert the OPUS to AAC which I then use FFMPEG to demux that from the m4a container so I get a consistent file format across my files and thus better playback compatibility.
Any ideas what this is caused by and how to fix this through FFMPEG? Perhaps my demux lines are incorrect? Check below for line:
::Demux AAC from M4A:
for %%f in (*.m4a) do ffmpeg -i "%%f" -vn -acodec copy "%%~nf.aac"
::Demuxes audio from mp4 files
for %%f in (*.mp4) do ffmpeg -i "%%f" -vn -acodec copy "%%~nf.aac"
::Demuxes audio from mkv files
for %%f in (*.mkv) do ffmpeg -i "%%f" -vn -acodec copy "%%~nf.opus"
I use dBpoweramp to convert the OPUS to AAC which I then use FFMPEG to demux that from the m4a container so I get a consistent file format across my files and thus better playback compatibility.