[FFmpeg-user] Right audio channel shifted
Alex
doenerbudenchef at yahoo.de
Tue Oct 14 17:10:41 CEST 2014
Moritz Barsnick wrote
> On Tue, Oct 14, 2014 at 06:35:07 -0700, Alex wrote:
>> thanks for your help, works great! The mapping thing is still a bit
>> confusing to me. :)
>
> :-)
>
>> One last problem: I would like to set the sample format of the second
>> stream
>> back to s32. I tried the follwoing, but it won't work:
>
> In this case, since you didn't include the output, I was quite lost. I
> use "-loglevel debug" to inspect the filter chain, by the way.
>
>> ffmpeg -i test.mxf -vcodec copy -map 0:v -map 0:1 -sample_fmt s32 -c:a:0
>> copy -c:a:1 pcm_s24le -sample_fmt:a:1 s32 -filter_complex
>> "[a:1]atrim=start=0.035[ashifted]" -map "[ashifted]" test_new.mxf
>
> Using one artificial audio source, I was able to experiment a bit.
>
> It appears that it's only the default output of pcm_s16le that is
> incorrectly selected for you, your choice of -c:a pcm_s24le is fine,
> and atrim seems to handle s32 fine.
>
> In other words: "-c:a:0 copy -c:a:1 pcm_s24le" should work fine in your
> case, you can omit "-sample_fmt:a:1 s32". Furthermore, I was able to
> make "-c:a:1 pcm_s24le -sample_fmt:a:1 s32" work. Perhaps your first
> "-sample_fmt s32" is incorrect (apart from being unneeded). I can't
> even tell what it applies to.
>
> As I said: No output messages, no idea. :-)
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user@
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Thanks for your time Moritz.
You are right, I forgot to remove the first -sample_fmt 32, sorry. I run the
command again:
C:\>ffmpeg -i test.mxf -vcodec copy -map 0:v -map 0:1 -c:a:0 copy -c:a:1
pcm_s24le -sample_fmt:a:1 s32 -filter_complex
"[a:1]atrim=start=0.035[ashifted]" -map "[ashifted]" test_new.mxf
ffmpeg version N-66809-g20df026 Copyright (c) 2000-2014 the FFmpeg
developers
built on Oct 11 2014 23:42:02 with gcc 4.9.1 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs
--enable-libxvid --enable-zlib
libavutil 54. 10.100 / 54. 10.100
libavcodec 56. 4.101 / 56. 4.101
libavformat 56. 9.100 / 56. 9.100
libavdevice 56. 1.100 / 56. 1.100
libavfilter 5. 1.103 / 5. 1.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 1.100 / 53. 1.100
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Input #0, mxf, from 'test.mxf':
Metadata:
uid : adab4424-2f25-4dc7-92ff-29bd000b0000
generation_uid : adab4424-2f25-4dc7-92ff-29bd000b0001
company_name : FFmbc
product_name : OP1a Muxer
product_version : 53.6.0
product_uid : adab4424-2f25-4dc7-92ff-29bd000b0002
modification_date: 2014-03-28 11:58:57
timecode : 00:00:00:00
Duration: 00:03:32.59, start: 0.000000, bitrate: 52515 kb/s
Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080
[SAR 1:1 DAR 16:9], 50000 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 47.95 tbc
Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
File 'test_new.mxf' already exists. Overwrite ? [y/N] y
Output #0, mxf, to 'test_new.mxf':
Metadata:
uid : adab4424-2f25-4dc7-92ff-29bd000b0000
generation_uid : adab4424-2f25-4dc7-92ff-29bd000b0001
company_name : FFmbc
product_name : OP1a Muxer
product_version : 53.6.0
product_uid : adab4424-2f25-4dc7-92ff-29bd000b0002
modification_date: 2014-03-28 11:58:57
timecode : 00:00:00:00
encoder : Lavf56.9.100
Stream #0:0: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR 16:9],
q=2-31, 50000 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono (24 bit), 1152 kb/s
Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
encoder : Lavc56.4.101 pcm_s24le
Stream mapping:
Stream #0:2 (pcm_s24le) -> atrim
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
atrim -> Stream #0:2 (pcm_s24le)
Press [q] to stop, [?] for help
[mxf @ 0000000002b64460] -d10_channelcount requires MXF D-10 and will be
ignored
Last message repeated 1 times
[mxf @ 0000000002b64460] missing frames2kB time=00:03:29.75
bitrate=52557.5kbits/s
frame= 5097 fps=516 q=-1.0 Lsize= 1362548kB time=00:03:32.58
bitrate=52505.4kbits/s
video:1297530kB audio:59779kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.385942%
VLC still said:
http://s14.directupload.net/images/141014/r7h73d5b.jpg
One other thing: I checked my database again and I have to verify over 300
videos which are possibly affected by this bug. Is there a possibility with
ffmpeg to repair those files automatically or at least see if a file is
affected. Otherwise I am going to do this job manually via a vectorscope. :)
Thanks,
Alex
--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Right-audio-channel-shifted-tp4667730p4667771.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
More information about the ffmpeg-user
mailing list