Re: [FFmpeg-user] Naming an audio track
On Mon, Nov 03, 2014 at 01:47:23 +, Carl Eugen Hoyos wrote: $ HandBrakeCLI [...] --aname Name of audio track 1,Name of audio track 2 If somebody could now either upload a small sample or provide an actual command line, we could try to implement the missing feature... Sorry, I was quite tired and didn't know what I was thinking. I'm attaching an artificially created file, as it's smaller than most log files. ;-) Created as such: $ ffmpeg -y -f lavfi -i testsrc -f lavfi -i sine=f=880 -f lavfi -i sine=f=1000 -map 0 -map 1 -map 2 -t 0.5 in.mkv $ HandBrakeCLI -i in.mkv -o out.mp4 --audio 1,2 --aname 880 Hz sine wave,1 kHz sine wave Sorry, my HandBrake is really old and has problems with the video, but the point is moot: VLC shows the two audio tracks of out.mp4 exactly as I tagged them with the HandBrake command line. BTW, using ffmpeg, I notice that when I use '-metadata:s:a:0 name=880 sine', the file creation process shows me: Stream #0:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 44100 Hz, mono, s16, 96 kb/s (default) Metadata: name: 880 sine encoder : Lavc56.10.100 libfdk_aac yet ffprobe fails to display the name metadata in the resulting file. This field - if it is a metadata field - does not seem to be supported by the MP4 muxer, and again ffmpeg is lying ;-) about its metadata creation - similar to the thread I started recently. Moritz P.S.: I can actually see the tags in a hexdump of the HandBrake created file: -21E0: A6 00 00 00 1C 73 74 73 - 63 00 00 00 00 00 00 00 .stsc... -21F0: 01 00 00 00 01 00 00 00 - 17 00 00 00 01 00 00 00 -2200: 14 73 74 63 6F 00 00 00 - 00 00 00 00 01 00 00 05 .stco... -2210: 56 00 00 00 20 75 64 74 - 61 00 00 00 18 6E 61 6D V... udtanam -2220: 65 38 38 30 20 48 7A 20 - 73 69 6E 65 20 77 61 76 e880 Hz sine wav -2230: 65 00 00 02 2F 74 72 61 - 6B 00 00 00 5C 74 6B 68 e.../trak...\tkh -2240: 64 00 00 00 02 D0 7C F6 - 53 D0 7C F6 53 00 00 00 d.|.S.|.S... -2250: 03 00 00 00 00 00 00 5C - 00 00 00 00 00 00 00 00 ...\ I do not know, though, whether name is a header such as stco or udta. out.mp4 Description: Binary data ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[FFmpeg-user] gas-preprocessor.pl unknown arch: 'ppc'
Hi, I am trying to (re)build recent ffmpeg master (63e62cfbe23de8b362d94f783668620a2cd2b571) on OSX 10.5 ppc. I have installed latest (2014-08-12) gas-preprocessor.pl from http://git.libav.org/?p=gas-preprocessor.git When configuring the build it still complains and asks to install/update gas-preprocessor. I am not sure whether this is a gas-preprocessor problem, or an ffmpeg build configuration problem. This used to work. I don't know when it broke because configuring without gas-preprocessor is non-fatal, so it may have been broken for months and I haven't noticed. One thing I've noticed is that -arch ppc doesn't work, but -arch powerpc does: $ gas-preprocessor.pl -arch ppc -as-type apple-gas -- gcc -v unknown arch: 'ppc' $ gas-preprocessor.pl -arch powerpc -as-type apple-gas -- gcc -v Using built-in specs. Target: powerpc-apple-darwin9 Configured with: /var/tmp/gcc_42/gcc_42-5577~1/src/configure --disable-checking --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --program-prefix= --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5577) Here is an excerpt from config.log: # /nfs/scratch/Developer/ffmpeg-git-src/configure --prefix=/Developer/ppc --disable-debug --disable-shared --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-l ibtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-pthreads --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-am rwb --enable-postproc --enable-libx264 --enable-libxvid --enable-libass --enable-gnutls --enable-runtime-cpudetect --extra-cflags=-I/opt/local/include --extra-ldflags='-headerpad_max_install_names -L/opt/loca l/lib' ... gas-preprocessor.pl -arch ppc -as-type apple-gas -- gcc -v unknown arch: 'ppc' check_gas using 'gcc' as AS check_as BEGIN /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S 1 .macro m n, y:vararg=0 2 \n: .int \y 3 .endm 4 m x END /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/opt/local/include -force_cpusubtype_ALL -mdynamic-no-pic -c -o /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.tRd1aGKd.o /var/fold ers/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S:4:Junk character 92 (\). /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S:4:Rest of line ignored. 1st junk character valued 110 (n). check_gas using 'gcc' as AS check_as BEGIN /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S 1 .macro m n, y:vararg=0 2 \n: .int \y 3 .endm 4 m x END /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/opt/local/include -force_cpusubtype_ALL -mdynamic-no-pic -c -o /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.tRd1aGKd.o /var/fold ers/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S:4:Junk character 92 (\). /var/folders/zc/zcLuFx8PGxWB0xQUmne1nU+++yU/-Tmp-//ffconf.dZICFXiM.S:4:Rest of line ignored. 1st junk character valued 110 (n). WARNING: GNU assembler not found, install/update gas-preprocessor ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Naming an audio track
[Replying to self] On Mon, Nov 03, 2014 at 10:21:39 +0100, Moritz Barsnick wrote: I do not know, though, whether name is a header such as stco or udta. So apparently we're looking as MPEG4/MOV containers here. That's what Tomáš was using as well, and where I managed to reproduce. Using AtomicParsley, I managed to see that the tag in use is an atom trak.udta.name: Atom trak @ 8193 of size: 560, ends @ 8753 Atom tkhd @ 8201 of size: 92, ends @ 8293 Atom mdia @ 8293 of size: 428, ends @ 8721 [...] Atom udta @ 8721 of size: 32, ends @ 8753 Atom name @ 8729 of size: 24, ends @ 8753 The atom is described here: https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP4939-CH204-BBCCFFGD I have found a mention that HandBrake and subler use this atom: https://github.com/pjan/osx-dotfiles/blob/55d452fae4037a019c85a6095a5b3a0bd11e3d15/.dotfiles/.encode-handheld.pl#L2907 I couldn't figure how to add arbitrary atoms with AtomicParsley, only how to delete them. I do see ffmpeg has a function named mov_write_track_udta_tag(), called from mov_write_trak_tag(), called from mov_write_moov_tag(), but I don't know if it gets used and whether it does the right thing from VLC's point of view, and how to get it to write the right thing. Getting closer, Moritz P.S.: Interesting, because it follows a question I never dared to ask: Where does my PVR/STB get the names of its audio tracks from? (Albeit MPEG-TS.) ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] Naming an audio track
On Mon, Nov 03, 2014 at 12:12:21 +0100, Moritz Barsnick wrote: I do see ffmpeg has a function named mov_write_track_udta_tag(), called from mov_write_trak_tag(), called from mov_write_moov_tag(), but I don't know if it gets used and whether it does the right thing from VLC's point of view, and how to get it to write the right thing. I looked at ffmpeg's source, and figured out that it uses the above functions to write the trak.udta.name atom for its metadata title: $ ffmpeg -y -f lavfi -i testsrc -f lavfi -i sine=f=880 -f lavfi -i sine=f=1000 -map 0 -map 1 -map 2 -t 0.5 -metadata:s:a:0 title=880 sine -metadata:s:a:1 title=1000 sine out_ffmpeg.mp4 AtomicParsley now sees reports the tag, just like it did for HandBrake's file: $ AtomicParsley out_ffmpeg.mp4 -t 1 [...] User data; level: track=2; atom name : 880 sine User data; level: track=3; atom name : 1000 sine So ffmpeg is basically doing the right thing with title. Unfortunately, VLC seems picky about this, and still doesn't display it. This may or may not have to do with the differing major_brand, compatible_brands, or the structure of the MOOV atoms. *shrug* At this point, we'd probably need to look at VLC's source code to figure this out. :-P There is some udta parsing in VLC's modules/demux/mp4/mp4.c, in function MP4_TrackCreate(). It doesn't look picky, but what do I know. Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] gas-preprocessor.pl unknown arch: 'ppc'
On 2014/11/03 4:00, Pavel Koshevoy wrote: Hi, I am trying to (re)build recent ffmpeg master (63e62cfbe23de8b362d94f783668620a2cd2b571) on OSX 10.5 ppc. I have installed latest (2014-08-12) gas-preprocessor.pl from http://git.libav.org/?p=gas-preprocessor.git When configuring the build it still complains and asks to install/update gas-preprocessor. I am not sure whether this is a gas-preprocessor problem, or an ffmpeg build configuration problem. This used to work. I don't know when it broke because configuring without gas-preprocessor is non-fatal, so it may have been broken for months and I haven't noticed. One thing I've noticed is that -arch ppc doesn't work, but -arch powerpc does: $ gas-preprocessor.pl -arch ppc -as-type apple-gas -- gcc -v unknown arch: 'ppc' This happens on line 66 of gas-preprocessor.pl -- it checks the $comments dictionary for 'ppc', doesn't find it and gives up. I've worked around the problem locally by adding 'ppc' = '#' to %comments on line 17. Pavel ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user