Audio encoding changed, truncated audio files

Vangelis forthnet northmedia1 at the.forthnet.gr
Mon Sep 12 11:37:14 PDT 2016


On Mon Sep 12 14:24:11 BST 2016, artisticforge . wrote:

> to rule out it being a ffmpeg issue
> I tried ffmpeg 2.6.7, 2.8.7 & 3.0.2
> under Debian Linux
> (snip)
> The audio downloads are all truncated under Debian Linux
> I have not tried get_iplayer-2.96 under windows 10
> (snip)
> I will post a verbose log file
> from one of the latest truncated downloads.

On Mon Sep 12 16:22:14 BST 2016, artisticforge . wrote:

> the Duration of this program should be close to 3 hours/10800 seconds
> the Duration of the truncated program is roughly 1/5 of 10800 seconds.
> (snip)
> Recording:   420.51MB / 419.43MB  1779kbps 100.3% 00:00:00 remaining
> INFO: Recorded: 420.75MB in 00:32:17 at  1779kbps to
> (snip) 
> /Rod_Whiting/Rod_Whiting_-_1362._2016-09-03_p045j35r_original.partial.m4a.m4a
> INFO: Begin converting file:
> (snip)
> ffmpeg version 3.1.3-static http://johnvansickle.com/ffmpeg/
> (snip)
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> '(snip) 
> /Rod_Whiting/Rod_Whiting_-_1362._2016-09-03_p045j35r_original.partial.m4a.m4a':
> Metadata:
>    major_brand     : iso6
>    minor_version   : 0
>    compatible_brands: iso6dash
>  Duration: 00:36:48.00, start: 0.000000, bitrate: 1598 kb/s
>  Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, 
> fltp, 320 kb/s (default)
> (snip)
> encoder         : Lavf57.41.100
> (snip)
> No more output streams to write to, finishing.
> size=   86656kB time=00:36:48.00 bitrate= 321.5kbits/s speed=1.67e+03x

... I checked your offending PID under my
Windows Vista SP2 32bit OS, using
my custom installation of the 2.96 main perl script;
the version of FFmpeg bundled with the latest
windows installer is 3.0 (x86), but to approximate
better your used FFmpeg version (3.1.3), I tried
the fetch with an FFmpeg 3.1.2 x86 win binary
kindly provided by "rogerdpack" here:

https://sourceforge.net/projects/ffmpegwindowsbi/files/2016-08-12-v3.1.2/

OT: The Zeranoe repo can't be used anymore
on Windows XP (last working build is
ffmpeg-20160227-git-5156578) and Windows Vista
(last working build is ffmpeg-20160714-git-f41e37b)
Current releases require Windows 7+.

I was not able to reproduce with FFmpeg 3.1.2;
command prompt window output follows:
=====================================
C:\Program Files\get_iplayer>perl 
get_iplayer-296w.pl --type=radio --pid=p045j35
r --radiomode=dashhigh1 --force
get_iplayer 2.96-windows.0, Copyright (C) 2008-2010 Phil Lewis
  This program comes with ABSOLUTELY NO WARRANTY; for details 
use --warranty.
  This is free software, and you are welcome to redistribute it under 
certain
  conditions; use --conditions for details.

INFO Trying to stream pid using type radio
INFO: pid found in cache
Matches:
19240:  Rod Whiting - 03/09/2016, BBC Radio Lincolnshire, p045j35r

INFO: 1 Matching Programmes
INFO: Checking existence of original version
INFO: dashhigh1 modes will be tried for version original
INFO: Trying dashhigh1 mode to record radio: Rod Whiting - 1362. 03/09/2016
INFO: File name prefix = Rod_Whiting_-_1362._2016-09-03_p045j35r_original

INFO: Begin recording file: D:\Vangelis\iPlayer 
Recordings\Rod_Whiting_-_1362._2
016-09-03_p045j35r_original.partial.m4a.m4a
INFO: Recorded: 421.58MB in 00:15:18 at  3762kbps to D:\Vangelis\iPlayer 
Recordi
ngs\Rod_Whiting_-_1362._2016-09-03_p045j35r_original.partial.m4a.m4a
INFO: Begin converting file: D:\Vangelis\iPlayer 
Recordings\Rod_Whiting_-_1362._
2016-09-03_p045j35r_original.partial.m4a.m4a
size=  431517kB time=03:03:15.20 bitrate= 321.5kbits/s speed= 682x
INFO: Converted file: D:\Vangelis\iPlayer 
Recordings\Rod_Whiting_-_1362._2016-09
-03_p045j35r_original.partial.m4a
INFO: Recorded file: D:\Vangelis\iPlayer 
Recordings\Rod_Whiting_-_1362._2016-09-
03_p045j35r_original.m4a

INFO: MP4 tagging M4A file

 Started writing to temp file.
 Progress: =============================================>100%|
 Finished writing to temp file.
=====================================

MediaInfo excerpt from end file:

File size                        : 421 MiB
Duration                         : 3h 3mn
Overall bit rate                 : 322 Kbps
> (snip)
Writing application              : Lavf57.41.100

The file plays fine with a 3hr long duration.

By examining your verbose log, I find that:
1. The downloaded file size (using mode
dashhigh - native perl downloader is used)
is 420.75MB (partial file before remuxing),
while in my test it was 421.58MB, i.e. slightly larger.
2. When your FFmpeg 3.1.3 is parsing
the input audio file, it is calculating its duration
to be 00:36:48.00, which is obviously wrong...
This partial input file is of the "iso6dash" brand,
so not a common m4a file that iTunes would
accept, so that is why a remux to a proper .m4a
file is mandatory...
It may be that some stream /container corruption
is introduced in the downloaded file (hence the
difference in file sizes between you and me)
that makes it impossible for FFmpeg to process
the whole audio stream, just the first 37min of it;
the end remuxed file of ~ 84Mb is consistent
with a 320kbps/37min long audio file.

Since I was not able to replicate your issue,
I fear I am not able to provide further help.
You've checked other FFmpeg versions on
your system, but your issue persists; in case
this is FFmpeg related, you could try
--radiomode=hafhigh (instead of dashhigh)
to see how that fares; the partial file in that
case is in the MPEG-TS type container,
so perhaps your Debian FFmpeg performs
better (???).

(And just for accuracy, FFmpeg is not acting as
an "encoder" in this case, i.e. it does not re-encode
(change of audio codec), it simply acts as a remuxer,
it just changes the container the original audio
stream is packaged in...)

Input from other Debian users could be
more useful, I guess...

> Is there a way to keep the raw
> downloaded file before conversion?

If by "conversion" you mean the remux to
the MP4 container (.m4a iTunes compatible
files), then employ switch "--raw",
but do consider the constraints mentioned
previously when that "raw" file comes
from dash modes

Kind regards,
Vangelis. 




More information about the get_iplayer mailing list