Im trying to fix the audio levels of my video files using sox to normalize but im having a few problems, in 3 steaps Script $FFMPEG -i "$file" -vn -y extracted.wav echo Now Normalizing the audio $SOX extracted.wav normal.wav -V3 echo Now converting "$file" to "$tsfile" $FFMPEG -threads 0 -i "$file" -i normal.wav -map 0:0 -map 1 -vcodec libx264 -preset superfast -x264opts keyint=75 -x264opts vbv-maxrate=900 -vf scale=720:288 -bufsize 2M -r 25 -acodec libfaac -ab 128k -ar 32k -ac 2 -async 1 -f mpegts "$DEST_DIR/$tsfile" Step 1 Now extracting audio from /mnt/media1/Jukebox_upload/Front 242 - Headhunter.mpg ffmpeg version N-44994-gf077e1f Copyright (c) 2000-2012 the FFmpeg developers built on Oct 3 2012 00:15:57 with gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264 libavutil 51. 73.101 / 51. 73.101 libavcodec 54. 63.100 / 54. 63.100 libavformat 54. 29.105 / 54. 29.105 libavdevice 54. 3.100 / 54. 3.100 libavfilter 3. 19.102 / 3. 19.102 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 16.100 / 0. 16.100 libpostproc 52. 1.100 / 52. 1.100 [mpeg @ 0x30fb240] max_analyze_duration 5000000 reached at 5005000 Input #0, mpeg, from '/mnt/media1/Jukebox_upload/Front 242 - Headhunter.mpg': Duration: 00:03:21.03, start: 0.659989, bitrate: 1394 kb/s Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p, 352x240 [SAR 200:219 DAR 880:657], 1150 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s Output #0, wav, to 'extracted.wav': Metadata: encoder : Lavf54.29.105 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s Stream mapping: Stream #0:1 -> #0:0 (mp2 -> pcm_s16le) Press [q] to stop, [?] for help incomplete frametime=00:02:36.21 bitrate=1409.6kbits/s Error while decoding stream #0:1: Invalid data found when processing input size= 34547kB time=00:03:20.54 bitrate=1411.2kbits/s video:0kB audio:34546kB subtitle:0 global headers:0kB muxing overhead 0.000130% Step 2 /usr/bin/sox: SoX v14.3.1 /usr/bin/sox INFO formats: detected file format type `wav' Input File : 'extracted.wav' Channels : 2 Sample Rate : 44100 Precision : 16-bit Duration : 00:03:20.54 = 8843904 samples = 15040.7 CDDA sectors File Size : 35.4M Bit Rate : 1.41M Sample Encoding: 16-bit Signed Integer PCM Endian Type : little Reverse Nibbles: no Reverse Bits : no /usr/bin/sox INFO sox: Overwriting `normal.wav' Output File : 'normal.wav' Channels : 2 Sample Rate : 44100 Precision : 16-bit Duration : 00:03:20.54 = 8843904 samples = 15040.7 CDDA sectors Sample Encoding: 16-bit Signed Integer PCM Endian Type : little Reverse Nibbles: no Reverse Bits : no Comment : 'Processed by SoX' /usr/bin/sox INFO sox: effects chain: input 44100Hz 2 channels /usr/bin/sox INFO sox: effects chain: output 44100Hz 2 channels Step 3 Now converting /mnt/media1/Jukebox_upload/Front 242 - Headhunter.mpg to Front 242 - Headhunter.ts ffmpeg version N-44994-gf077e1f Copyright (c) 2000-2012 the FFmpeg developers built on Oct 3 2012 00:15:57 with gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264 libavutil 51. 73.101 / 51. 73.101 libavcodec 54. 63.100 / 54. 63.100 libavformat 54. 29.105 / 54. 29.105 libavdevice 54. 3.100 / 54. 3.100 libavfilter 3. 19.102 / 3. 19.102 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 16.100 / 0. 16.100 libpostproc 52. 1.100 / 52. 1.100 [mpeg @ 0x19ed340] max_analyze_duration 5000000 reached at 5005000 Input #0, mpeg, from '/mnt/media1/Jukebox_upload/Front 242 - Headhunter.mpg': Duration: 00:03:21.03, start: 0.659989, bitrate: 1394 kb/s Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p, 352x240 [SAR 200:219 DAR 880:657], 1150 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s [wav @ 0x19f4400] max_analyze_duration 5000000 reached at 5015510 Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, wav, from 'normal.wav': Duration: 00:03:20.54, bitrate: 1411 kb/s Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s Unknown decoder 'libx264' Ive tried the "-i normal.wav" at the begining and after the video parameters, but seem to get this error every time, any ideas why it seems the audio as a 2 channel wav and wants to decode it? joolz
JULIAN GARDNER <joolzg <at> btinternet.com> writes:
$FFMPEG -threads 0 -i "$file" -i normal.wav -map 0:0 -map 1 -vcodec libx264 -preset superfast -x264opts keyint=75 -x264opts vbv-maxrate=900 -vf scale=720:288 -bufsize 2M -r 25 -acodec libfaac -ab 128k -ar 32k -ac 2 -async 1 -f mpegts "$DEST_DIR/$tsfile"
You should try as hard as possible not to use variables in the command lines you post here. (I don't see the problem in above line although there obviously is one - perhaps you can change your script so it does print what it executes or add -report)
Unknown decoder 'libx264'
Carl Eugen
________________________________ From: Carl Eugen Hoyos <cehoyos@ag.or.at> To: ffmpeg-user@ffmpeg.org Sent: Monday, 3 December 2012, 17:25 Subject: Re: [FFmpeg-user] Replacing audio track failing
JULIAN GARDNER <joolzg <at> btinternet.com> writes:
$FFMPEG -threads 0 -i "$file" -i normal.wav -map 0:0 -map 1 -vcodec libx264 -preset superfast -x264opts keyint=75 -x264opts vbv-maxrate=900 -vf scale=720:288 -bufsize 2M -r 25 -acodec libfaac -ab 128k -ar 32k -ac 2 -async 1 -f mpegts "$DEST_DIR/$tsfile"
You should try as hard as possible not to use variables in the command lines you post here. (I don't see the problem in above line although there obviously is one - perhaps you can change your script so it does print what it executes or add -report)
Unknown decoder 'libx264'
Carl Eugen
OK will do, but as you have everything including command line and UNCUT output i did not see this as a problem. replace "$file" with "/mnt/media1/Jukebox_upload/Front 242 - Headhunter.mpg" replace "$DEST_DIR/$tsfile" with "/mnt/media1/Jukebox/Front 242 - Headhunter.ts" or to be pedantic replace "$DEST_DIR" with "/mnt/media1/Jukebox" and replace "$tsfile" with "Front 242 - Headhunter.ts" joolz
----- Original Message -----
From: JULIAN GARDNER <joolzg@btinternet.com> To: FFmpeg user questions <ffmpeg-user@ffmpeg.org> Cc: Sent: Monday, 3 December 2012, 17:32 Subject: Re: [FFmpeg-user] Replacing audio track failing
________________________________ From: Carl Eugen Hoyos <cehoyos@ag.or.at> To: ffmpeg-user@ffmpeg.org Sent: Monday, 3 December 2012, 17:25 Subject: Re: [FFmpeg-user] Replacing audio track failing
JULIAN GARDNER <joolzg <at> btinternet.com> writes:
$FFMPEG -threads 0 -i "$file" -i normal.wav -map 0:0 -map 1 -vcodec libx264 -preset superfast -x264opts keyint=75 -x264opts vbv-maxrate=900
-vf scale=720:288 -bufsize 2M -r 25 -acodec libfaac -ab 128k -ar 32k -ac 2 -async 1 -f mpegts "$DEST_DIR/$tsfile"
You should try as hard as possible not to use variables in the command lines you post here. (I don't see the problem in above line although there obviously is one - perhaps you can change your script so it does print what it executes or add -report)
Unknown decoder 'libx264'
Carl Eugen
OK will do, but as you have everything including command line and UNCUT output i did not see this as a problem. replace "$file" with "/mnt/media1/Jukebox_upload/Front 242 - Headhunter.mpg" replace "$DEST_DIR/$tsfile" with "/mnt/media1/Jukebox/Front 242 - Headhunter.ts"
or to be pedantic
replace "$DEST_DIR" with "/mnt/media1/Jukebox" and replace "$tsfile" with "Front 242 - Headhunter.ts"
joolz
encoder@encoder21:~/.services/JukeboxC$ /usr/local/bin/ffmpeg -threads 0 -i "/mnt/media1/Jukebox_upload/Front 242 - Headhunter.mpg" -i normal.wav -map 0:0 -map 1 -vcodec libx264 -preset superfast -x264opts keyint=75 -x264opts vbv-maxrate=900 -vf scale=720:288 -bufsize 2M -r 25 -i extracted.wav -acodec libfaac -ab 128k -ar 32k -ac 2 -async 1 -f mpegts a.ts ffmpeg version N-44994-gf077e1f Copyright (c) 2000-2012 the FFmpeg developers built on Oct 3 2012 00:15:57 with gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264 libavutil 51. 73.101 / 51. 73.101 libavcodec 54. 63.100 / 54. 63.100 libavformat 54. 29.105 / 54. 29.105 libavdevice 54. 3.100 / 54. 3.100 libavfilter 3. 19.102 / 3. 19.102 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 16.100 / 0. 16.100 libpostproc 52. 1.100 / 52. 1.100 [mpeg @ 0x3053340] max_analyze_duration 5000000 reached at 5005000 Input #0, mpeg, from '/mnt/media1/Jukebox_upload/Front 242 - Headhunter.mpg': Duration: 00:03:21.03, start: 0.659989, bitrate: 1394 kb/s Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p, 352x240 [SAR 200:219 DAR 880:657], 1150 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s [wav @ 0x305a400] max_analyze_duration 5000000 reached at 5015510 Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, wav, from 'normal.wav': Duration: 00:03:20.54, bitrate: 1411 kb/s Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s Unknown decoder 'libx264' Its a pretty simple script, take a file, strip the audio, normalize the audio, transcode the file to a lower rate with the normalized audio. joolz
On 2012-12-03 19:47, JULIAN GARDNER wrote:
... -i extracted.wav -acodec libfaac -ab 128k -ar 32k -ac 2 -async 1 -f mpegts a.ts ^^^^^^^^^^^^^^^^ Here's your problem. You have a stray -i later in your command line.
----- Original Message -----
From: James Darnley <james.darnley@gmail.com> To: FFmpeg user questions <ffmpeg-user@ffmpeg.org> Cc: Sent: Monday, 3 December 2012, 20:01 Subject: Re: [FFmpeg-user] Replacing audio track failing
On 2012-12-03 19:47, JULIAN GARDNER wrote:
... -i extracted.wav -acodec libfaac -ab 128k -ar 32k -ac 2 -async 1 -f mpegts a.ts ^^^^^^^^^^^^^^^^ Here's your problem. You have a stray -i later in your command line.
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Thanks could not see the wood for the trees, you look at something so many times you just dont see simple errors joolz
participants (3)
-
Carl Eugen Hoyos -
James Darnley -
JULIAN GARDNER