slhck / ffmpeg-normalize

Audio Normalization for Python/ffmpeg
MIT License
1.24k stars 116 forks source link

ffmpeg-normalization of .mp4 fails on minimum need #49

Closed nspader closed 6 years ago

nspader commented 6 years ago

I am trying to normalize a directory of .mp4 files to 0 db so I dont have to have my receiver cranked up. When it reaches a file that its says is below minimum to normalize it stops. I really want it to go through the entire directory and normalize everything needed. I am using Ubuntu 16.04 on an Odroid to perform this.

Is this normal behavior or something wrong?

michaelcrossland commented 6 years ago

Look at the main GitHub page. There is a switch that you use so that the minimum limit is ignored. The way it set if the file don't need more then I "think" is -1 dB it will not try to level that file.

On Jan 20, 2018 7:55 AM, "nspader" notifications@github.com wrote:

I am trying to normalize a directory of .mp4 files to 0 db so I dont have to have my receiver cranked up. When it reaches a file that its says is below minimum to normalize it stops. I really want it to go through the entire directory and normalize everything needed. I am using Ubuntu 16.04 on an Odroid to perform this.

Is this normal behavior or something wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/slhck/ffmpeg-normalize/issues/49, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhMBCrETXnlIP5G4FK7XuvCU4ZuAQ1Sks5tMfBngaJpZM4Rlch7 .

slhck commented 6 years ago

When it reaches a file that its says is below minimum to normalize it stops.

That should not happen – it might skip files that are below the threshold. Set --threshold to 0 to always normalize a file.

nspader commented 6 years ago

what if the file is 0 already. some are but most arent. I will try again and see if that allows it to skip. but it is definitely stopping.

michaelcrossland commented 6 years ago

It will stop because ffmpeg throws a error when that happens then the script will stop as the ffmpeg process ID it was using has terminated. I found that out the hard way. But the flag that was talking about it will let the script and ffmpeg to continue to work even if the files level is at 0.

On Jan 20, 2018 8:44 AM, "nspader" notifications@github.com wrote:

what if the file is 0 already. some are but most arent. I will try again and see if that allows it to skip. but it is definitely stopping.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/slhck/ffmpeg-normalize/issues/49#issuecomment-359176350, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhMBCKlU5KWSgwPprcSuvEh3efjQ146ks5tMfvBgaJpZM4Rlch7 .

nspader commented 6 years ago

so that worked on movies just barely below 0 but got this on the first movie that was at 0..

Any ideas?

INFO: normalized file written to normalized/Mayhem (2017).mp4 INFO: reading file 3 of 9 - The Intern (2015).mp4 INFO: mean volume: -27.5 INFO: max volume: 0.0 INFO: file needs 0.0 dB gain to reach maximum WARNING: Merging audio with the original file, but encoder was automatically cho sen. Set '--acodec' to overwrite. ERROR: error running command: ['/usr/bin/ffmpeg', '-nostdin', '-y', '-i', 'The I ntern (2015).mp4', '-strict', '-2', '-c:v', 'copy', '-c:s', 'copy', '-map_metada ta', '0', '-map', '0', '-filter:a', 'volume=0.0dB', 'normalized/The Intern (2015 ).mp4'] ERROR: ffmpeg version 3.3.3-5ubuntu1 Copyright (c) 2000-2017 the FFmpeg develope rs built with gcc 5.4.1 (Ubuntu/Linaro 5.4.1-2ubuntu1~16.04) 20160904 configuration: --prefix=/usr --extra-version=5ubuntu1 --toolchain=hardened --l ibdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --e nable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnu tls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable -libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libf reetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband - -enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable- libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable -libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-s dl2 --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable- vda --disable-vdpau --disable-videotoolbox --enable-v4l2_m2m --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --e nable-libx264 --enable-shared libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'The Intern (2015).mp4': Metadata: major_brand : mp42 minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 2036-02-06T06:28:16.000000Z encoder : HandBrake 0.10.2 2015060900 Duration: 02:01:32.33, start: 0.000000, bitrate: 1279 kb/s Chapter #0:0: start 0.000000, end 571.154000 Metadata: title : Chapter 1 Chapter #0:1: start 571.154000, end 1195.444000 Metadata: title : Chapter 2 Chapter #0:2: start 1195.444000, end 1830.078000 Metadata: title : Chapter 3 Chapter #0:3: start 1830.078000, end 2478.559000 Metadata: title : Chapter 4 Chapter #0:4: start 2478.559000, end 3018.766000 Metadata: title : Chapter 5 Chapter #0:5: start 3018.766000, end 3634.047000 Metadata: title : Chapter 6 Chapter #0:6: start 3634.047000, end 4219.090000 Metadata: title : Chapter 7 Chapter #0:7: start 4219.090000, end 4756.502000 Metadata: title : Chapter 8 Chapter #0:8: start 4756.502000, end 5459.996000 Metadata: title : Chapter 9 Chapter #0:9: start 5459.996000, end 6168.537000 Metadata: title : Chapter 10 Chapter #0:10: start 6168.537000, end 6671.248000 Metadata: title : Chapter 11 Chapter #0:11: start 6671.248000, end 7002.078000 Metadata: title : Chapter 12 Chapter #0:12: start 7002.078000, end 7291.826000 Metadata: title : Chapter 13 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte1 70m/smpte170m/bt709), 720x478 [SAR 32:27 DAR 1280:717], 1112 kb/s, 23.98 fps, 23 .98 tbr, 90k tbn, 47.95 tbc (default) Metadata: creation_time : 2036-02-06T06:28:16.000000Z handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, flt p, 160 kb/s (default) Metadata: creation_time : 2036-02-06T06:28:16.000000Z handler_name : Stereo Stream #0:2(eng): Data: bin_data (text / 0x74786574) Metadata: creation_time : 2036-02-06T06:28:16.000000Z handler_name : SubtitleHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Stream #0:2 -> #0:2 (copy) [mp4 @ 0x55afd0] Could not find tag for codec bin_data in stream #2, codec not c urrently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invali d argument Error initializing output stream 0:1 -- [aac @ 0x55d630] Qavg: nan Conversion failed!

michaelcrossland commented 6 years ago

Only thing I could see here is that you may have not installed the non free codecs. You have to turn on a Repository that isn't turned. Called Universal software sources. Or something along those lines. As your running a pkg version of ffmpeg not built from source. So the pkg versions are built with almost all the codec support turned on but it don't have any of the codces built-in it. You have download a codec package from a Repository.

On Jan 20, 2018 10:04 AM, "nspader" notifications@github.com wrote:

so that worked on movies just barely below 0 but got this on the first movie that was at 0..

Any ideas?

INFO: normalized file written to normalized/Mayhem (2017).mp4 INFO: reading file 3 of 9 - The Intern (2015).mp4 INFO: mean volume: -27.5 INFO: max volume: 0.0 INFO: file needs 0.0 dB gain to reach maximum WARNING: Merging audio with the original file, but encoder was automatically cho sen. Set '--acodec' to overwrite. ERROR: error running command: ['/usr/bin/ffmpeg', '-nostdin', '-y', '-i', 'The I ntern (2015).mp4', '-strict', '-2', '-c:v', 'copy', '-c:s', 'copy', '-map_metada ta', '0', '-map', '0', '-filter:a', 'volume=0.0dB', 'normalized/The Intern (2015 ).mp4'] ERROR: ffmpeg version 3.3.3-5ubuntu1 Copyright (c) 2000-2017 the FFmpeg develope rs built with gcc 5.4.1 (Ubuntu/Linaro 5.4.1-2ubuntu1~16.04) 20160904 configuration: --prefix=/usr --extra-version=5ubuntu1 --toolchain=hardened --l ibdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --e nable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnu tls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable -libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libf reetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband - -enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable- libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable -libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-s dl2 --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable- vda --disable-vdpau --disable-videotoolbox --enable-v4l2_m2m --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --e nable-libx264 --enable-shared libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'The Intern (2015).mp4': Metadata: major_brand : mp42 minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 2036-02-06T06:28:16.000000Z encoder : HandBrake 0.10.2 2015060900 <(201)%20506-0900> Duration: 02:01:32.33, start: 0.000000, bitrate: 1279 kb/s Chapter #0:0: start 0.000000, end 571.154000 Metadata: title : Chapter 1 Chapter #0:1: start 571.154000, end 1195.444000 Metadata: title : Chapter 2 Chapter #0:2: start 1195.444000, end 1830.078000 Metadata: title : Chapter 3 Chapter #0:3: start 1830.078000, end 2478.559000 Metadata: title : Chapter 4 Chapter #0:4: start 2478.559000, end 3018.766000 Metadata: title : Chapter 5 Chapter #0:5: start 3018.766000, end 3634.047000 Metadata: title : Chapter 6 Chapter #0:6: start 3634.047000, end 4219.090000 Metadata: title : Chapter 7 Chapter #0:7: start 4219.090000, end 4756.502000 Metadata: title : Chapter 8 Chapter #0:8: start 4756.502000, end 5459.996000 Metadata: title : Chapter 9 Chapter #0:9: start 5459.996000, end 6168.537000 Metadata: title : Chapter 10 Chapter #0:10: start 6168.537000, end 6671.248000 Metadata: title : Chapter 11 Chapter #0:11: start 6671.248000, end 7002.078000 Metadata: title : Chapter 12 Chapter #0:12: start 7002.078000, end 7291.826000 Metadata: title : Chapter 13 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte1 70m/smpte170m/bt709), 720x478 [SAR 32:27 DAR 1280:717], 1112 kb/s, 23.98 fps, 23 .98 tbr, 90k tbn, 47.95 tbc (default) Metadata: creation_time : 2036-02-06T06:28:16.000000Z handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, flt p, 160 kb/s (default) Metadata: creation_time : 2036-02-06T06:28:16.000000Z handler_name : Stereo Stream #0:2(eng): Data: bin_data (text / 0x74786574) Metadata: creation_time : 2036-02-06T06:28:16.000000Z handler_name : SubtitleHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Stream #0:2 -> #0:2 (copy) [mp4 @ 0x55afd0] Could not find tag for codec bin_data in stream #2 https://github.com/slhck/ffmpeg-normalize/pull/2, codec not c urrently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invali d argument Error initializing output stream 0:1 -- [aac @ 0x55d630] Qavg: nan Conversion failed!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/slhck/ffmpeg-normalize/issues/49#issuecomment-359181767, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhMBI8nIEnyHO-dce-PbyIevTOX2Cg4ks5tMg5xgaJpZM4Rlch7 .

slhck commented 6 years ago

No, missing codecs is not the problem.

Seems it wants to copy over the input stream number 2 (bin_data), which ffmpeg cannot re-mux to the output file. I guess the only possibility would be to remove that data from the file before processing it with ffmpeg-normalize. But then again, you don't need to (peak-)normalize the file anyway since its maximum is at 0 dB.

This will strip the bin_data from the file:

ffmpeg -i input.mp4 -c copy -map 0:v -map 0:a output.mp4
nspader commented 6 years ago

thats why i would like to skip the ones that are already normalized. I tried your command and reran normalize and failed the same way. seems that doesnt strip the bin_data.

auricgoldfinger commented 6 years ago

FYI: my threshold is on 0.5 as I found out that after normalisation, a lot of files (audio and video) are still at 0.3 or something. I can't hear the difference with 0.0 compared to other files.

Problem is, if you rerun, they'll keep being picked up for normalisation, being processed only to end up with a file that's 0.3 again.

You don't need a flag to mark a file as normalised. You need the level.

Even so, when you one day decide to set the level at -5db, those files wouldn't process anymore.

So for your problem, since it's already at 0.0, maybe set a threshold to 0.1 so that the file is skipped

slhck commented 6 years ago

Note that in the meantime I've released a version 1.0 that now defaults to EBU R128 normalization and changes the CLI syntax a bit.

I don't know how to handle the problem with bin_data; a sample would be good.

As for skipping files that do not need to be normalized, I'm working on a feature where it simply copies everything to the target file (dependent on a user-definable threshold). So it won't just skip them but always copy them to the output file.

nspader commented 6 years ago

what do you need for a sample? also how do I upgrade it. I installed from the repository. will it upgrade itself? If you want a movie file sample just let me know where to upload.

slhck commented 6 years ago

what do you need for a sample? If you want a movie file sample just let me know where to upload.

If you do:

ffmpeg -i input.mp4 -c copy -map_metadata 0 -t 1 test.mp4

you could upload that to some file sharing site and send it to me. Should be enough to have the same bin_data in there that is causing problems.

also how do I upgrade it. I installed from the repository. will it upgrade itself?

Your packages won't automatically update. Run pip install --upgrade ffmpeg_normalize to update.

nspader commented 6 years ago

I will do the first part today. SO I upgrade and ran the same command I have been running on got the below message. What changed?

$ sudo ffmpeg-normalize -vuofm -l 0 -t 0 *.mp4

usage: ffmpeg-normalize [-h] [-o OUTPUT [OUTPUT ...]] [-of OUTPUT_FOLDER] [-f] [-d] [-v] [-n] [--version] [-nt {ebu,rms,peak}] [-t TARGET_LEVEL] [-lrt LOUDNESS_RANGE_TARGET] [-tp TRUE_PEAK] [--offset OFFSET] [--dual-mono] [-c:a AUDIO_CODEC] [-b:a AUDIO_BITRATE] [-ar SAMPLE_RATE] [-vn] [-c:v VIDEO_CODEC] [-sn] [-mn] [-e EXTRA_OUTPUT_OPTIONS] [-ofmt OUTPUT_FORMAT] [-ext EXTENSION] input [input ...] ffmpeg-normalize: error: argument -v/--verbose: ignored explicit argument 'uofm'

slhck commented 6 years ago

Quoting from above:

Note that […] version 1.0 […] changes the CLI syntax a bit.

The merge option is no longer necessary. See Examples for more info. You have to adjust your call to do peak normalization of a particular input file, to a target of 0 dB with AAC audio encoding (copying the original codec isn't possible and PCM WAV cannot be written to MP4 files):

ffmpeg-normalize input.mp4 -o output.mp4 -v -f -nt peak -t 0 -c:a aac

(sudo shouldn't be necessary though.)

nspader commented 6 years ago

I have tried the above and now I am getting the below. I dont know what I am doing wrong.

$ ffmpeg-normalize *.mp4 -v -f -nt peak -t 0 -c:a aac

Traceback (most recent call last): File "/usr/local/bin/ffmpeg-normalize", line 9, in load_entry_point('ffmpeg-normalize==1.0.1', 'console_scripts', 'ffmpeg-normalize')() File "/usr/local/lib/python2.7/dist-packages/ffmpeg_normalize/main.py", line 287, in main dry_run=cli_args.dry_run File "/usr/local/lib/python2.7/dist-packages/ffmpeg_normalize/_ffmpeg_normalize.py", line 66, in init target_level, -70, -5, name='target_level' File "/usr/local/lib/python2.7/dist-packages/ffmpeg_normalize/_ffmpeg_normalize.py", line 29, in check_range raise e TypeError: super() takes at least 1 argument (0 given)

slhck commented 6 years ago

Ah, that was a bug in handling the target value, please update to 1.0.2 and try again.

nspader commented 6 years ago

The test file is uploaded here: http://www.filedropper.com/test_133

nspader commented 6 years ago

upgrade to the latest and ran with below error:

#$ sudo ffmpeg-normalize -v -f -nt peak -t 0 -c:a aac *.mp4 Traceback (most recent call last): File "/usr/local/bin/ffmpeg-normalize", line 9, in <module> load_entry_point('ffmpeg-normalize==1.0.2', 'console_scripts', 'ffmpeg-normalize')() File "/usr/local/lib/python2.7/dist-packages/ffmpeg_normalize/__main__.py", line 313, in main ffmpeg_normalize.add_media_file(input_file, output_file) File "/usr/local/lib/python2.7/dist-packages/ffmpeg_normalize/_ffmpeg_normalize.py", line 143, in add_media_file mf = MediaFile(self, input_file, output_file) File "/usr/local/lib/python2.7/dist-packages/ffmpeg_normalize/_media_file.py", line 39, in __init__ self.parse_streams() File "/usr/local/lib/python2.7/dist-packages/ffmpeg_normalize/_media_file.py", line 61, in parse_streams output = run_command(cmd) File "/usr/local/lib/python2.7/dist-packages/ffmpeg_normalize/_cmd_utils.py", line 74, in run_command raise RuntimeError("Error running command {}: {}".format(cmd, str(stderr))) RuntimeError: Error running command ['/usr/bin/ffmpeg', '-i', '13 Hours - The Secret Soldiers Of Benghazi (2016).mp4', '-t', '0', '-map', '0', '-f', 'null', '/dev/null']: ffmpeg version 3.3.3-5ubuntu1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.1 (Ubuntu/Linaro 5.4.1-2ubuntu1~16.04) 20160904 configuration: --prefix=/usr --extra-version=5ubuntu1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-v4l2_m2m --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '13 Hours - The Secret Soldiers Of Benghazi (2016).mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf57.71.100 Duration: 02:24:29.59, start: 0.000000, bitrate: 2184 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 2049 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 130 kb/s (default) Metadata: handler_name : SoundHandler [h264_v4l2m2m @ 0x4dbd20] driver 'exynos-gsc' on card 'exynos-gsc gscaler' Last message repeated 1 times [h264_v4l2m2m @ 0x4dbd20] driver 's5p-jpeg' on card 's5p-jpeg decoder' [h264_v4l2m2m @ 0x4dbd20] driver 's5p-jpeg' on card 's5p-jpeg encoder' [h264_v4l2m2m @ 0x4dbd20] driver 's5p-jpeg' on card 's5p-jpeg decoder' [h264_v4l2m2m @ 0x4dbd20] driver 's5p-jpeg' on card 's5p-jpeg encoder' [h264_v4l2m2m @ 0x4dbd20] Could not find a valid device [h264_v4l2m2m @ 0x4dbd20] can't configure decoder Stream mapping: Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> wrapped_avframe (native)) Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native)) Error while opening decoder for input stream #0:0 : Invalid argument

slhck commented 6 years ago

That seems to be an issue with your system / your ffmpeg build. Does the following command work?

/usr/bin/ffmpeg -i input.mp4 -t 0 -map 0 -c copy -f null /dev/null

If so, that would be an edge case that I can fix in a next version.

slhck commented 6 years ago

Works for me with your sample file and recent ffmpeg stable. If it doesn't work with the latest version (please update to 1.0.5), I think it's a problem with your ffmpeg configuration.