Problem concatenating .mp4 files - dimensions not set

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

Problem concatenating .mp4 files - dimensions not set

David Favor
Trying to concatenate a set of .mp4 files together
with no intermediate disk space and having no luck.

Looks like something simple is missing.

Suggestions welcome. Thanks.

Version of ffmpeg is...

David-Favor-iMac> ffmpeg -version 2>&1 | grep version
ffmpeg version 0.7.3, Copyright (c) 2000-2011 the FFmpeg developers

Files are...

David-Favor-iMac> for file in 00*.mp4 ; do ffmpeg -i $file 2>&1 | grep Video ; done
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22698 kb/s, 59.94 fps, 59.94 tbr, 30k
tbn, 59.94 tbc
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22699 kb/s, 59.94 fps, 59.94 tbr, 30k
tbn, 59.94 tbc
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22699 kb/s, 59.94 fps, 59.94 tbr, 30k
tbn, 59.94 tbc
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22700 kb/s, 59.94 fps, 59.94 tbr, 30k
tbn, 59.94 tbc
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22695 kb/s, 59.94 fps, 59.94 tbr, 30k
tbn, 59.94 tbc

Command (one of many attempted) is...

cat 00*.mp4 | ffmpeg -benchmark -y -f mp4 -s 1920x1080 -i - -vcodec copy -acodec copy -f mp4 -s 1920x1080 test.mp4

Errors are...

David-Favor-iMac> cat 00*.mp4 | ffmpeg -benchmark -y -f mp4 -s 1920x1080 -i - -vcodec copy -acodec copy -f mp4 -s
1920x1080 test.mp4
ffmpeg version 0.7.3, Copyright (c) 2000-2011 the FFmpeg developers
   built on Aug 23 2011 08:57:36 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
   configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter
--enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libxvid
--enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads
--disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm
   libavutil    50. 43. 0 / 50. 43. 0
   libavcodec   52.122. 0 / 52.122. 0
   libavformat  52.110. 0 / 52.110. 0
   libavdevice  52.  5. 0 / 52.  5. 0
   libavfilter   1. 80. 0 /  1. 80. 0
   libswscale    0. 14. 1 /  0. 14. 1
   libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x102054400] multiple edit list entries, a/v desync might occur, patch welcome
     Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x102054400] stream 0, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x102054400] Could not find codec parameters (Video: h264, 22698 kb/s)

Seems stream 0 codec frame rate differs from container frame rate: 60000.00 (60000/1) -> 30000.00 (60000/2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     creation_time   : 1970-01-01 00:00:00
     encoder         : Lavf52.110.0
   Duration: 00:11:20.70, bitrate: N/A
     Stream #0.0(und): Video: h264, 22698 kb/s, 59.94 fps, 30k tbr, 30k tbn, 60k tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
     Stream #0.1(und): Audio: ac3, 48000 Hz, 2 channels, s16, 256 kb/s
     Metadata:
       creation_time   : 1970-01-01 00:00:00
[mp4 @ 0x102047600] dimensions not set
Output #0, mp4, to 'test.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     creation_time   : 1970-01-01 00:00:00
     encoder         : Lavf52.110.0
     Stream #0.0(und): Video: libx264, q=2-31, 22698 kb/s, 90k tbn, 30k tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
     Stream #0.1(und): Audio: ac3, 48000 Hz, 2 channels, 256 kb/s
     Metadata:
       creation_time   : 1970-01-01 00:00:00
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
Could not write header for output file #0 (incorrect codec parameters ?)


--
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem concatenating .mp4 files - dimensions not set

Etienne Buira
On Tue, Sep 06, 2011 at 09:22:22AM -0500, David Favor wrote:
> Trying to concatenate a set of .mp4 files together
> with no intermediate disk space and having no luck.

Hi.

This should not be very hard to do with MP4Box.

AFAIK, ffmpeg can only concatenate streams when fed using a concatenable
format (mpegts for instance).

Regards.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem concatenating .mp4 files - dimensions notset

David Favor
Etienne Buira wrote:
> On Tue, Sep 06, 2011 at 09:22:22AM -0500, David Favor wrote:
>> Trying to concatenate a set of .mp4 files together
>> with no intermediate disk space and having no luck.
>
> Hi.
>
> This should not be very hard to do with MP4Box.

Unfortunately MP4Box audio drifts out of sync for
every added file. Concatenate 5-6 files and the
final file is way out of sync.

> AFAIK, ffmpeg can only concatenate streams when fed using a concatenable
> format (mpegts for instance).
>
> Regards.

Thanks.

--
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Need help rewrapping vixia hfs100 .mts files and concatenating to .mp4

David Favor
Flow seems to be...

1) rewrap

2) concatenate files

To rewrap I've tried these commands:

    ffmpeg -y -i $name.mts -vcodec copy -acodec copy $name.mp4

    ffmpeg -y -i $name.mts -f mp4 -vcodec copy -acodec libfaac -ab 256000 -ac 2 $name.mp4

To concatenate:

    mp4box -cat 00178.mp4 -cat 00179.mp4 -cat 00180.mp4 -cat 00181.mp4 -cat 00182.mp4 -new final.mp4

Problem is audio drifts out of sync with each new file concatenated.

So... It appears I have to transcode these files.

This being the case, if anyone has a command set that works for
either general .mts clips or specifically vixia clips, pass
it along to me.

Thanks.

--
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Need help rewrapping vixia hfs100 .mts files and concatenating to .mp4

pgoldweic
I use myself a somewhat different command for concatenating mp4s with MP4Box. You might want to try it and see if this works better for you perhaps:

MP4Box -force-cat -add <input1>.mp4 -cat <input2>.mp4 -new <output>.mp4

-Patricia


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Favor
Sent: Tuesday, September 06, 2011 12:21 PM
To: FFmpeg user questions and RTFMs
Subject: [FFmpeg-user] Need help rewrapping vixia hfs100 .mts files and concatenating to .mp4

Flow seems to be...

1) rewrap

2) concatenate files

To rewrap I've tried these commands:

    ffmpeg -y -i $name.mts -vcodec copy -acodec copy $name.mp4

    ffmpeg -y -i $name.mts -f mp4 -vcodec copy -acodec libfaac -ab 256000 -ac 2 $name.mp4

To concatenate:

    mp4box -cat 00178.mp4 -cat 00179.mp4 -cat 00180.mp4 -cat 00181.mp4 -cat 00182.mp4 -new final.mp4

Problem is audio drifts out of sync with each new file concatenated.

So... It appears I have to transcode these files.

This being the case, if anyone has a command set that works for either general .mts clips or specifically vixia clips, pass it along to me.

Thanks.

--
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user