Copy Audio

classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Carl Eugen Hoyos-2
2018-12-20 0:40 GMT+01:00, Chris <[hidden email]>:
> Merely copying a PCM audio track used to work through v 4.0.

Yes, as explained, this was a regression that allowed to write
invalid files.

> Just make "copy" like it used to be.

Sorry, this is not possible afaict.

> "Anyway, pcm is defined for some types of isom files but
> those are not (yet) supported by FFmpeg, don't hold
> your breath."

Yes, jpeg2000 files allow pcm (iirc) but this has to be implemented,
is not completely trivial and would probably not fix your issue as
these files are again != mp4 (but isom like mp4).

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Andi
In reply to this post by Moritz Barsnick
The camera manufacturers do this to allow audio postproduction.
It would be nice to support the pro's even if the consumer is at the
forefront of all current technology.

Best wishes,

Andrei Chirosca

On Wed, Dec 19, 2018 at 10:28 AM Moritz Barsnick <[hidden email]> wrote:

>
> On Wed, Dec 19, 2018 at 07:22:52 +0000, Chris wrote:
> > FWIW both my Sony and Canon camcorders put out PCM audio in .mp4
> > containers. ffmpeg is merely being asked to copy the existing audio.
>
> Without myself trying to take sides on this, one could argue:
>
>   ffmpeg chooses not to create "illegal" files[1]. It is friendly enough
>   to demux/decode those created by others though, allowing you to carry
>   the data over.
>
> Why do you need to create the same/similar format that Sony and Canon
> do? Do you want the resulting MP4 to be read by a particular software?
> Why does the audio need to be copied losslessly? Why are the MOV or
> Matroska containers not alternatives?
>
> Moritz
>
> [1] Agreed it can in some other cases.
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Gyan
On Wed, Dec 19, 2018 at 10:28 AM Moritz Barsnick <[hidden email]> wrote:
>> Why do you need to create the same/similar format that Sony and Canon
>> do? Do you want the resulting MP4 to be read by a particular
>> software? Why does the audio need to be copied losslessly? Why are
>> the MOV or Matroska containers not alternatives?


Most editing software don't read Matroska files. And if the container is
MOV, non-Mac editors usually rely on antiquated 32-bit Quicktime to open
the file, whereas they normally have native MP4 demuxers. And some
editors don't skip the priming sample in AAC/MP3 streams causing a
desync - in which case PCM is preferable.

Gyan
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Kieran O Leary
On Wed, 26 Dec 2018, 09:17 Gyan <[hidden email] wrote:

> On Wed, Dec 19, 2018 at 10:28 AM Moritz Barsnick <[hidden email]> wrote:
> >> Why do you need to create the same/similar format that Sony and Canon
> >> do? Do you want the resulting MP4 to be read by a particular
> >> software? Why does the audio need to be copied losslessly? Why are
> >> the MOV or Matroska containers not alternatives?
>
>
> Most editing software don't read Matroska files. And if the container is
> MOV, non-Mac editors usually rely on antiquated 32-bit Quicktime to open
> the file, whereas they normally have native MP4 demuxers. And some
> editors don't skip the priming sample in AAC/MP3 streams causing a
> desync - in which case PCM is preferable.
>


Perhaps support could be added for these "illegal" streams if a user adds
the -strict -experimental flag? Or something similar? Where ffmpeg makes it
clear that these are non-standard files that will have interoperability
issues in future.

Best,

Kieran
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Carl Eugen Hoyos-2
2018-12-26 10:25 GMT+01:00, Kieran O Leary <[hidden email]>:

> Perhaps support could be added for these "illegal" streams
> if a user adds the -strict -experimental flag?

Which players support the output file?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Kieran O Leary
On Fri, 28 Dec 2018, 09:15 Carl Eugen Hoyos <[hidden email] wrote:

> 2018-12-26 10:25 GMT+01:00, Kieran O Leary <[hidden email]>:
>
> > Perhaps support could be added for these "illegal" streams
> > if a user adds the -strict -experimental flag?
>
> Which players support the output file?
>

Off the top of my head, XDCAM EX cameras store big endian pcm in MP4 and
VLC plays it correctly,but I'd have to verify this when I have access to
such files next week.

Best,

Kieran
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Kieran O Leary
In reply to this post by Carl Eugen Hoyos-2
On Fri, 28 Dec 2018, 09:15 Carl Eugen Hoyos <[hidden email] wrote:

> 2018-12-26 10:25 GMT+01:00, Kieran O Leary <[hidden email]>:
>
> > Perhaps support could be added for these "illegal" streams
> > if a user adds the -strict -experimental flag?
>
> Which players support the output file?
>

Actually I just found some metadata for such a file and it was pcm_s16be in
MP4 and VLC played it back.

Best,

Kieran.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Carl Eugen Hoyos-2
2018-12-28 11:34 GMT+01:00, Kieran O Leary <[hidden email]>:

> On Fri, 28 Dec 2018, 09:15 Carl Eugen Hoyos <[hidden email] wrote:
>
>> 2018-12-26 10:25 GMT+01:00, Kieran O Leary <[hidden email]>:
>>
>> > Perhaps support could be added for these "illegal" streams
>> > if a user adds the -strict -experimental flag?
>>
>> Which players support the output file?
>
> Actually I just found some metadata for such a file and it was
> pcm_s16be in MP4 and VLC played it back.

Did you test this with a file created by (broken) FFmpeg?

The more interesting applications are probably WMP and QT.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Kieran O Leary
On Fri, 28 Dec 2018, 10:47 Carl Eugen Hoyos <[hidden email] wrote:

> 2018-12-28 11:34 GMT+01:00, Kieran O Leary <[hidden email]>:
> > On Fri, 28 Dec 2018, 09:15 Carl Eugen Hoyos <[hidden email] wrote:
> >
> >> 2018-12-26 10:25 GMT+01:00, Kieran O Leary <[hidden email]>:
> >>
> >> > Perhaps support could be added for these "illegal" streams
> >> > if a user adds the -strict -experimental flag?
> >>
> >> Which players support the output file?
> >
> > Actually I just found some metadata for such a file and it was
> > pcm_s16be in MP4 and VLC played it back.
>
> Did you test this with a file created by (broken) FFmpeg?
>

No, I've never created a pcm/MP4 file.


> The more interesting applications are probably WMP and QT.
>

I only tried QT with XDCAM EX and it would not play back the file.

Best,

Kieran
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Kieran O'Leary
Hi,

So on OSX El Capitan - VLC 3.4, ffplay 4.1, mpv 0.29.1 will play back 16-bit twos within MP4. Quicktime player will not play back the file. VLC throws up an unsupported codec warning but it still plays it back.

$ ffplay '/Volumes/kieran_tests/zip_sip_outputs/aaa0013/2a215d97-39a7-4bf4-9ca6-46cd7fd766d8/objects/Card 5/BPAV/CLPR/432_4407_01/432_4407_01.MP4'
ffplay version 4.1 Copyright (c) 2003-2018 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libass --enable-libfreetype --enable-libtesseract --enable-opencl --enable-videotoolbox --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fa6ce007800] st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fa6ce007800] st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/kieran_tests/zip_sip_outputs/aaa0013/2a215d97-39a7-4bf4-9ca6-46cd7fd766d8/objects/Card 5/BPAV/CLPR/432_4407_01/432_4407_01.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42
    creation_time   : 2010-04-27T07:39:09.000000Z
  Duration: 00:01:39.08, start: 0.000000, bitrate: 36550 kb/s
    Stream #0:0(eng): Video: mpeg2video (Main) (mp4v / 0x7634706D), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 35011 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2010-04-27T07:39:09.000000Z
      handler_name    : Video Media Handler
    Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2010-04-27T07:39:09.000000Z
      handler_name    : Sound Media Handler
   1.54 A-V: -0.030 fd=   0 aq=  203KB vq= 4403KB sq=    0B f=0/0  
------
This email has been scanned for spam and malware by The Email Laundry.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Kieran O'Leary
p.s
ffplay from git master performs the same way.

$ ./ffplay '/Volumes/kieran_tests/zip_sip_outputs/aaa0013/2a215d97-39a7-4bf4-9ca6-46cd7fd766d8/objects/Card 5/BPAV/CLPR/432_4407_01/432_4407_01.MP4'
ffplay version N-92900-gaf5b6b45b4 Copyright (c) 2003-2019 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration:
  libavutil      56. 25.100 / 56. 25.100
  libavcodec     58. 43.100 / 58. 43.100
  libavformat    58. 25.100 / 58. 25.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f89ed015e00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f89ed015e00] st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/kieran_tests/zip_sip_outputs/aaa0013/2a215d97-39a7-4bf4-9ca6-46cd7fd766d8/objects/Card 5/BPAV/CLPR/432_4407_01/432_4407_01.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42
    creation_time   : 2010-04-27T07:39:09.000000Z
  Duration: 00:01:39.08, start: 0.000000, bitrate: 36550 kb/s
    Stream #0:0(eng): Video: mpeg2video (Main) (mp4v / 0x7634706D), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 35011 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2010-04-27T07:39:09.000000Z
      handler_name    : Video Media Handler
    Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2010-04-27T07:39:09.000000Z
      handler_name    : Sound Media Handler
  27.46 A-V: -0.030 fd=   0 aq=  207KB vq= 4453KB sq=    0B f=0/0  

------
This email has been scanned for spam and malware by The Email Laundry.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Copy Audio

Carl Eugen Hoyos-2
In reply to this post by Kieran O'Leary
2019-01-02 16:06 GMT+01:00, Kieran O'Leary <[hidden email]>:

> So on OSX El Capitan - VLC 3.4, ffplay 4.1, mpv 0.29.1 will play
> back 16-bit twos within MP4.

> Quicktime player will not play back the file.

Good to know that we fixed this bug!

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
12