Converting Quicktime (.mov ) from iPhone to mp4

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

Converting Quicktime (.mov ) from iPhone to mp4

Peter Alderson
On iPhones running iOS 11, if a video is pre-recorded and uploaded I get the following errors:- ( ie, the video is recoded on the iPhone and then uploaded as an attachment ).

$ ./ffmpeg -i <input-file>.mov -vcodec h264 -acodec mp4 test-output.mp4
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
Mac OSX universal build for ffmpegX
  configuration:  --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
  libavutil version: 49.0.0
  libavcodec version: 51.9.0
  libavformat version: 50.4.0
  built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5597b8]mov: header not found !!! (err:0, moov:0, mdat:0) pos:3189455560
<input-file>.mov: Error while opening file
$

If the video is recorded and then transferred to a Desktop uploaded and then converted it works OK.

If I use a ‘live’ recording then all is OK.

I found this…

https://www.howtogeek.com/327689/how-to-make-your-iphone-use-jpg-and-mp4-files-instead-of-heif-and-hevc/ <https://www.howtogeek.com/327689/how-to-make-your-iphone-use-jpg-and-mp4-files-instead-of-heif-and-hevc/>

Which seems to suggest iOS 11 will use different formats, but this appears to make no difference whatever the settings are for ‘High Efficiency / Most Compatible’.

My experience is that it’s iOS 11 devices which are causing this issue.

Any ideas ?

Peter
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

Carl Zwanzig
On 3/24/2020 8:02 AM, Peter Alderson wrote:
> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
                                          ^^^^
You might start with a newer version of ffmpeg- in computer years, that's
pre-dinosaur age.

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

Peter Alderson
It’s what https://www.ffmpeg.org/ <https://www.ffmpeg.org/> is Downloading today !

> On 24 Mar 2020, at 15:18, Carl Zwanzig <[hidden email]> wrote:
>
> On 3/24/2020 8:02 AM, Peter Alderson wrote:
>> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
>                                         ^^^^
> You might start with a newer version of ffmpeg- in computer years, that's pre-dinosaur age.
>
> z!
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

Carl Zwanzig
On 3/24/2020 8:21 AM, Peter Alderson wrote:
> It’s whathttps://www.ffmpeg.org/  <https://www.ffmpeg.org/>  is Downloading today !

Please give the link which is doing that; I just checked the MacOS sites and
they all have up-to-date builds.

Note that the ffmpeg site says "FFmpeg only provides source code. Below are
some links that provide it already compiled and ready to go.", those
download sites are run by other people.

Anyway, start with a 4.2.x or newer build; at least something with a 2020
copyright date. (And preferably use the current "git head" build.)


Also, please do not top-post on this list.

z!

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

Moritz Barsnick
In reply to this post by Peter Alderson
On Tue, Mar 24, 2020 at 15:21:02 +0000, Peter Alderson wrote:
> It’s what https://www.ffmpeg.org/ <https://www.ffmpeg.org/> is Downloading today !

(That page just links to two other external sites. Binaries are not
provided by the project ffmpeg itself.)

No, those are very modern versions of ffmpeg provided there.

Possibly, you failed to use the downloaded version instead of the
preinstalled one.

Try:
$ /path/to/downloaded/ffmpeg [...]
instead of
$ ffmpeg [...]

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

Peter Alderson
How do I stop top-posting?

Also I have now installed 4.2.2. ( 2019 ). ( which is the latest homebrew version )

And I now when converting from .mov ( saved Video ) from iOS 11 I get error...

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff72f801600] moov atom not found

Peter

> On 24 Mar 2020, at 15:31, Moritz Barsnick <[hidden email]> wrote:
>
> On Tue, Mar 24, 2020 at 15:21:02 +0000, Peter Alderson wrote:
>> It’s what https://www.ffmpeg.org/ <https://www.ffmpeg.org/> is Downloading today !
>
> (That page just links to two other external sites. Binaries are not
> provided by the project ffmpeg itself.)
>
> No, those are very modern versions of ffmpeg provided there.
>
> Possibly, you failed to use the downloaded version instead of the
> preinstalled one.
>
> Try:
> $ /path/to/downloaded/ffmpeg [...]
> instead of
> $ ffmpeg [...]
>
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

Carl Zwanzig
On 3/24/2020 9:05 AM, Peter Alderson wrote:
> How do I stop top-posting?

Check the docs for your email client or google it? If you're using gmail in
a browser, click on the three dots at the bottom to expand the quoted text,
then edit from there.

And if you haven't already, take a look at
https://ffmpeg.org/mailing-list-faq.html.


> Also I have now installed 4.2.2. ( 2019 ). ( which is the latest homebrew version )
"homebrew version"?? Where are you getting ffmpeg? You can get up-to-date
macos builds at https://ffmpeg.zeranoe.com/builds/macos64/ and
https://evermeet.cx/ffmpeg/  (both linked from
https://ffmpeg.org/download.html). But.... see below...


> And I now when converting from .mov ( saved Video ) from iOS 11 I get error...
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff72f801600] moov atom not found

Please provide the -entire- command output. It's very hard to debug a
problem with almost no information.


 From the original email
> If the video is recorded and then transferred to a Desktop uploaded and
> then converted it works OK.
Are you running ffmpeg on the iphone or on a desktop/laptop? That's very
important to know. Have you tried multiple videos? With that error, it's
possible that the video wasn't properly closed when recorded.

Later,

z!


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

kumowoon1025
In reply to this post by Peter Alderson
Hi,

> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
> Mac OSX universal build for ffmpegX

Are you running a PPC Mac? I wonder how you were led to download this.

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

Carl Eugen Hoyos-2
In reply to this post by Peter Alderson
Am Di., 24. März 2020 um 16:07 Uhr schrieb Peter Alderson
<[hidden email]>:

> On iPhones running iOS 11, if a video is pre-recorded and uploaded I get the following
> errors:- ( ie, the video is recoded on the iPhone and then uploaded as an attachment ).
>
> $ ./ffmpeg -i <input-file>.mov -vcodec h264 -acodec mp4 test-output.mp4
> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
> Mac OSX universal build for ffmpegX
>   configuration:  --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
>   libavutil version: 49.0.0
>   libavcodec version: 51.9.0
>   libavformat version: 50.4.0
>   built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5597b8]mov: header not found !!! (err:0, moov:0, mdat:0) pos:3189455560
> <input-file>.mov: Error while opening file

Feel free to provide a sample input file.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: Converting Quicktime (.mov ) from iPhone to mp4

Peter Alderson
In reply to this post by Carl Zwanzig


> On 24 Mar 2020, at 16:21, Carl Zwanzig <[hidden email]> wrote:
>
> On 3/24/2020 9:05 AM, Peter Alderson wrote:
>> How do I stop top-posting?
>
> Check the docs for your email client or google it? If you're using gmail in a browser, click on the three dots at the bottom to expand the quoted text, then edit from there.
>
> And if you haven't already, take a look at https://ffmpeg.org/mailing-list-faq.html.

OK, got it!

>
>
>> Also I have now installed 4.2.2. ( 2019 ). ( which is the latest homebrew version )
> "homebrew version"?? Where are you getting ffmpeg? You can get up-to-date macos builds at https://ffmpeg.zeranoe.com/builds/macos64/ and https://evermeet.cx/ffmpeg/  (both linked from https://ffmpeg.org/download.html). But.... see below…

>
>
>> And I now when converting from .mov ( saved Video ) from iOS 11 I get error...
>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff72f801600] moov atom not found
>
> Please provide the -entire- command output. It's very hard to debug a problem with almost no information.

The Command / Output is...

$ ffmpeg -i <tezt-file>.mov -vcodec h264 -acodec mp2 test-output-21.mp4
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe4de00c000] moov atom not found
<text-file>.mov: Invalid data found when processing input
$

The test file can be found at https://s3-eu-west-1.amazonaws.com/app.netframe.io/another-test.mov <https://s3-eu-west-1.amazonaws.com/app.netframe.io/another-test.mov>

>
>
> From the original email
>> If the video is recorded and then transferred to a Desktop uploaded and
>> then converted it works OK.
> Are you running ffmpeg on the iphone or on a desktop/laptop? That's very important to know. Have you tried multiple videos? With that error, it's possible that the video wasn't properly closed when recorded.
>

ffmpeg is running on Desktop, the Video is captured on iPhone. ( and transferred via Upload in Browser ).

After investigation the issue seems to relate to how the Video is transferred.

Works...

1) From iPhone by email ( iOS Mail is actually converting the Video to a link, and not attaching the Video itself ).
2) From Phone when recoded ‘live’, ie, not saved in Photo Library.
3) From Phone when saved in Picture Library when using iOS 12.4.5 or earlier.

Fails…

1) From iPhone when save in Picture Library when using later than iOS 12.4.5 ( only have access to few devices, but know that 13.3.1 fails ).

So it appears the issue is NOT with ffmpeg, but some stage behaviour in Safari / Webkit.

However, any suggestions would be appreciated.

> Later,
>
> z!
>
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

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

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