RE: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-15 Thread bat guano
rtmpdump produces FLV files, which have nowhere to put a value for the average bit rate. So this isn't something that rtmpdump could fix. I think ffmpeg is the right place to handle this. When ffmpeg runs (using -acodec copy), it displays a

Re: Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-15 Thread richard
On Fri Apr 15 bat guano wrote: Simon wrote: rtmpdump produces FLV files, which have nowhere to put a value for the average bit rate. So this isn't something that rtmpdump could fix. I think ffmpeg is the right place to handle this. When ffmpeg runs (using -acodec copy), it displays a

Re: Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-14 Thread richard
On Tue Apr 12 11:20:00 EDT 2011 dinkypumpkin wrote: I see that bufferSizeDB (max sample size) is also zero. That would be a bit unfortunate if either of those fields is the cause. I don't think ffmpeg will ever fill in those fields in this case, as you're just copying streams (i.e., using

Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-14 Thread Andy Bircumshaw
On 14/4/2011, at 2:15pm, richard wrote: ... when the avgBitrate (average bit rate) in the DecoderConfigDescriptor of the esds atom is zero, a m4a file will not play in the Marantz CD6003. Both EasyTag and mp4tags makes a m4a file playable by changing the average bitrate from zero to a non

Re: Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-14 Thread richard
On Tue Apr 12 17:38 dinkypumpkin wrote: If you're on ubuntu and you have mp4tags, then you've probably installed the mpeg4ip-utils package (or similar - that's what it's called on Maverick). If so, you'll have utility called mp4dump which can print out a more-or-less readable

Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-13 Thread Simon Nash
dinkypumpkin wrote: On 12/04/2011 21:40, richard wrote: I'm struggling to understand all this analysis of atoms etc. What software are you using to carry out your tests and determine what is going on? If you're on ubuntu and you have mp4tags, then you've probably installed the mpeg4ip-utils

Re: Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-13 Thread richard
On Tue Apr 12 Simon Nash wrote: dinkypumpkin wrote: When mp4tags rewrites the MP4 metadata on save, the underlying MP4 library does the arithmetic to calculate the necessary values and fill in the esds atom. From perusing the ffmpeg code, it looks like the required logic could be added,

Re: Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-12 Thread richard
On Tue Apr 12 Simon Nash wrote: I'm puzzled by this. There is definitely no video in this file, and it plays OK on my Linn DS. Have you tried renaming the file to test1.m4a? When I renamed the test1.mp4 file with a .m4a extension it plays OK on the Marantz. The file has to have a .m4a

Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-12 Thread dinkypumpkin
On 12/04/2011 21:40, richard wrote: I'm struggling to understand all this analysis of atoms etc. What software are you using to carry out your tests and determine what is going on? If you're on ubuntu and you have mp4tags, then you've probably installed the mpeg4ip-utils package (or similar -

Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-12 Thread Andy Bircumshaw
On 12/4/2011, at 5:08pm, Simon Nash wrote: I'm puzzled by this. There is definitely no video in this file, and it plays OK on my Linn DS. The Linn DS is happy with both .mp4 and .m4a file extensions so I had been thinking that these are equivalent for MPEG-4 files with audio and no video.

Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-10 Thread Simon Nash
richard wrote: On Sat Apr 9 10:08 Simon Nash wrote: There has been a recent change to ffmpeg to use the 4-byte length format(see http://ffmpeg.org/pipermail/ffmpeg-cvslog/2011-March/035858.html). This is included in the 0.6.90-rc0 release of ffpmeg, according to the changelog

Re: Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-10 Thread richard
On Sun Apr 10 02 Simon Nash wrote: I would be interested in trying these on my Linn DS. I will send you three m4a files off list of Bells on Sunday (2.8Mb each) downloaded with get_iplayer for you to try. The 3 files are: Bells1_noscript.m4a This file does not use Jon's script. The file does

Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-10 Thread Simon Nash
richard wrote: On Sun Apr 10 02 Simon Nash wrote: I would be interested in trying these on my Linn DS. I will send you three m4a files off list of Bells on Sunday (2.8Mb each) downloaded with get_iplayer for you to try. The 3 files are: Bells1_noscript.m4a This file does not use Jon's

Re: Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-09 Thread Simon Nash
Jon Davies wrote: dinkypumpkin did some great work putting together a patch which makes mpeg4/m4a the default file format for aac sources, rather than raw aac. This works for most people but ... On 1 April 2011 21:15, richard rich...@richsim900.plus.com wrote: The m4a file did not play in the

Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-08 Thread Jon Davies
dinkypumpkin did some great work putting together a patch which makes mpeg4/m4a the default file format for aac sources, rather than raw aac. This works for most people but ... On 1 April 2011 21:15, richard rich...@richsim900.plus.com wrote: The m4a file did not play in the Marantz CD

RE: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-04-01 Thread bat guano
This does not work for my Marantz player. I still think the problem with ffmpeg has not been completely solved:- @ Richard In the ffmpeg git commit, it says:- In ipod/mov/mp4 muxer, always write esds descriptor length using 4 bytes, ipod shuffle

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-31 Thread Shevek
On 30 March 2011 20:07, geoff.getiplayer_l...@alphaworks.co.uk wrote: On 25/03/2011 01:36, Shevek wrote: re-sending previous patch email as text attachment in case gmail mungs the line endings Could we have a beginners' guide on how to take all this great work and get it running? At the

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-31 Thread Shevek
On 30 March 2011 23:34, bat guano batguano...@hotmail.com wrote: Hi The patch has been committed to FFmpeg git. Information is here:- http://git.videolan.org/?p=ffmpeg.git;a=commit;h=93dfda88968c5e4d3f596f35a446fb7c238e96b2 I've compiled FFmpeg again, everything's hunkydory. Great! I'll

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-31 Thread Shevek
On 31 March 2011 09:14, Vangelis forthnet northmed...@the.forthnet.gr wrote: The FFmpeg patch was committed on Mar 30th...You can also find daily Win x86 builds from the git repo here, courtesy of bizzeh: http://www.bizzeh.com/ffmpeg/free/static/ If you end up with a fully working patched

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Shevek
On 31 March 2011 14:35, richard rich...@richsim900.plus.com wrote: Sorry to spoil things, but the patch to ffmpeg has not solved the problem with my Marantz CD6003. These are the tests I've done. I am also finding the new version of ffmpeg doesn't work with iTunes - it reports an incorrect

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Shevek
On 31 March 2011 14:55, Nick Ludlam n...@recoil.org wrote: On 31 Mar 2011, at 14:43, Shevek wrote: On 31 March 2011 14:35, richard rich...@richsim900.plus.com wrote: Sorry to spoil things, but the patch to ffmpeg has not solved the problem with my Marantz CD6003. These are the tests I've

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Jon Davies
On 31 March 2011 14:35, richard rich...@richsim900.plus.com wrote: Sorry to spoil things, but the patch to ffmpeg has not solved the problem with my Marantz CD6003. These are the tests I've done. ...snip We seem to have established that ffmpeg isn't generating entirely valid mpeg4 files, I

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Shevek
On 31 March 2011 15:34, Jon Davies j...@hedgerows.org.uk wrote: On 31 March 2011 14:35, richard rich...@richsim900.plus.com wrote: Sorry to spoil things, but the patch to ffmpeg has not solved the problem with my Marantz CD6003. These are the tests I've done. ...snip We seem to have

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread dinkypumpkin
On 31 Mar 2011, at 16:01, Shevek wrote: This is possibly a stupid question, but can ffmpeg pipe to itself to do both things separately but in one command? This worked for me: ffmpeg -i test.flv -vn -acodec copy -f adts - | ffmpeg -i - -vn -acodec copy -absf aac_adtstoasc -y test.m4a I

RE: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread bat guano
Subject: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek) From: rich...@richsim900.plus.com To: get_iplayer@lists.infradead.org Date: Thu, 31 Mar 2011 14:35:54 +0100 Sorry to spoil things, but the patch to ffmpeg has not solved the

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Shevek
On 31 March 2011 16:21, dinkypumpkin dinkypump...@gmail.com wrote: On 31 Mar 2011, at 16:01, Shevek wrote: This is possibly a stupid question, but can ffmpeg pipe to itself to do both things separately but in one command? This worked for me: ffmpeg -i test.flv -vn -acodec copy -f adts - |

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Roger Burton West
On Thu, Mar 31, 2011 at 08:22:26PM +0100, Shevek wrote: What am I doing wrong? You can't use shell functions (such as pipe) with the list-form invocation of system(). Easiest option (though it's vulnerable to shellmetas showing up in filenames) is probably to do it all in one string: set $cmd

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread dinkypumpkin
On 31 Mar 2011, at 20:33, Roger Burton West wrote: On Thu, Mar 31, 2011 at 08:22:26PM +0100, Shevek wrote: What am I doing wrong? You can't use shell functions (such as pipe) with the list-form invocation of system(). Sorry, Shevek - I should have warned you about that beforehand.

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Shevek
On 31 March 2011 20:33, Roger Burton West ro...@firedrake.org wrote: On Thu, Mar 31, 2011 at 08:22:26PM +0100, Shevek wrote: What am I doing wrong? You can't use shell functions (such as pipe) with the list-form invocation of system(). I thought it would be something like that. Thanks for the

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Shevek
On 31 March 2011 20:36, dinkypumpkin dinkypump...@gmail.com wrote: On 31 Mar 2011, at 20:33, Roger Burton West wrote: On Thu, Mar 31, 2011 at 08:22:26PM +0100, Shevek wrote: What am I doing wrong? You can't use shell functions (such as pipe) with the list-form invocation of system().

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Shevek
On 31 March 2011 20:33, Roger Burton West ro...@firedrake.org wrote: On Thu, Mar 31, 2011 at 08:22:26PM +0100, Shevek wrote: What am I doing wrong? Easiest option (though it's vulnerable to shellmetas showing up in filenames) is probably to do it all in one string: set $cmd instead of @cmd

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Shevek
On 31 March 2011 20:49, dinkypumpkin dinkypump...@gmail.com wrote: On 31 Mar 2011, at 20:44, Shevek wrote: On 31 March 2011 20:33, Roger Burton West ro...@firedrake.org wrote: On Thu, Mar 31, 2011 at 08:22:26PM +0100, Shevek wrote: What am I doing wrong? Easiest option (though it's

RE: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread bat guano
OK, this is what I came up with and it works: @cmd = ( $bin-{ffmpeg} . ' -i ' . $file_tmp . ' -vn -acodec copy -f adts - | ' . $bin-{ffmpeg} . ' -i - -vn -acodec copy -absf aac_adtstoasc -y ' . $prog-{filepart} . '', ); does anyone have any

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread dinkypumpkin
On 31 Mar 2011, at 20:52, Shevek wrote: On 31 March 2011 20:49, dinkypumpkin dinkypump...@gmail.com wrote: Path to ffmpeg exe might have spaces, so should be quoted as well. good spot... it's odd, because up till now none of the paths have been quoted, but it has always worked,

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread Roger Burton West
On Thu, Mar 31, 2011 at 08:56:59PM +0100, dinkypumpkin wrote: Yes. Perl pros here should correct me, but I think now that you effectively passing a list of length = 1 to system() or open3 (under the hood of main::run_cmd), you need to handle all internal quoting yourself. Yes. The array form

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-31 Thread dinkypumpkin
On 31 Mar 2011, at 20:54, bat guano wrote: OK, this is what I came up with and it works: @cmd = ( $bin-{ffmpeg} . ' -i ' . $file_tmp . ' -vn -acodec copy -f adts - | ' . $bin-{ffmpeg} . ' -i - -vn -acodec copy -absf aac_adtstoasc -y ' . $prog-{filepart} . '', ); does anyone have any

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-31 Thread geoff . getiplayer_list
On 31/03/2011 08:06, Shevek wrote: On 30 March 2011 20:07,geoff.getiplayer_l...@alphaworks.co.uk wrote: On 25/03/2011 01:36, Shevek wrote: re-sending previous patch email as text attachment in case gmail mungs the line endings Could we have a beginners' guide on how to take all this great

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-31 Thread Shevek
On 31 March 2011 21:12, geoff.getiplayer_l...@alphaworks.co.uk wrote: On 31/03/2011 08:06, Shevek wrote: On 30 March 2011 20:07,geoff.getiplayer_l...@alphaworks.co.uk  wrote: On 25/03/2011 01:36, Shevek wrote: re-sending previous patch email as text attachment in case gmail mungs the line

RE: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-31 Thread bat guano
No they do not play, but no 'header error' or 'time out' error. They play OK (with no delay) if I use EasyTag and change a tag. OK Well the FFmpeg update fixed it for the Shuffle. The m4a files play straight off without needing EasyTAG any more.

RE: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-30 Thread bat guano
So, currently in my version of get_iplayer: 1 rtmpdump downloads flv 2 ffmpeg remuxes flv to aac 3 ffmpeg remuxes aac to m4a and removes ADTS 4 atomicparsley tags the m4a Your testing shows that ffmpeg at least is causing a problem with it's m4a handling and that EasyTag corrects this

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-30 Thread Shevek
On 30 March 2011 15:18, bat guano batguano...@hotmail.com wrote: 1 rtmpdump downloads flv 2 ffmpeg remuxes flv to m4a and removes ADTS 3 atomicparsley tags the m4a I will wait and see whether the patch is going to be included in git. This is an ideal solution. I await a win32 build of

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-30 Thread geoff . getiplayer_list
On 25/03/2011 01:36, Shevek wrote: re-sending previous patch email as text attachment in case gmail mungs the line endings Could we have a beginners' guide on how to take all this great work and get it running? At the moment I'm running 2.79 which was installed using the Windows installer.

RE: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-30 Thread bat guano
This is an ideal solution. I await a win32 build of ffmpeg and then I'll update my get_iplayer patch Excellent! Hi The patch has been committed to FFmpeg git. Information is here:-

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-28 Thread Jon Davies
On 28 March 2011 13:59, richard rich...@richsim900.plus.com wrote: I've done some tests with MediaInfo and AtomicParsley to try and find why EasyTag makes the m4a file playable on my Marantz cd player. ... 2. Bells_after.m4a :- This is the default file after amending in EasyTag (deleting album

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-27 Thread Shevek
I'll see if I can update my patch to remove that tag... Sent from my iPhone On 27 Mar 2011, at 14:11, richard rich...@richsim900.plus.com wrote: Neither Shevek's patch to output as m4a (or Nick Ludlam's) play on my hifi CD player (Marantz CD6003) via the USB port. It gives a header error.

RE: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-27 Thread bat guano
From: she...@o2.co.uk Subject: Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek) Date: Sun, 27 Mar 2011 14:16:35 +0100 To: rich...@richsim900.plus.com CC: get_iplayer@lists.infradead.org I'll see if I can update my patch to

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-27 Thread James Cook
On Sun, 27 Mar 2011 14:05:17 +, you wrote: In my opinion, ffmpeg handles aac/m4a files in a way that isn't friendly with some players. It's not just the BBC files either. When I convert other files to m4a using ffmpeg like this:- ffmpeg -i foo -acodec libfaac foo.m4a they won't play in the

RE: [PATCH] Output AAC as M4A for iTunes with metadata tags (Shevek)

2011-03-27 Thread bat guano
Which version of ffmpeg are you using? I'm using this version with Ubuntu Karmic:- FFmpeg version git-N-28651-gf55dd6c, Copyright (c) 2000-2011 the FFmpeg developers   built on Mar 26 2011 11:51:58 with gcc 4.4.1   configuration: --enable-gpl

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-27 Thread dinkypumpkin
On 27 Mar 2011, at 17:48, richard wrote: Shevek wrote: Which version of ffmpeg are you using? I'm using the same version as bat guano on Ubuntu Hardy 8.04:- FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers built on Mar 17 2011 21:35:57 with gcc 4.2.4 (Ubuntu

Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

2011-03-27 Thread dinkypumpkin
On 27 Mar 2011, at 23:12, richard wrote: dinkypumpkin wrote: FWIW, you can go to the git repo where you cloned ffmpeg and run: git describe --tags --match N which gives something like: N-28671-g3ea031b The address of the repository is:- git://git.videolan.org/ffmpeg.git and