concat issue

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

concat issue

johnd
I am not able to concat to vids...

john@ldev:ffmpeg -y -i concat:"0.mp4|1.mp4" -vcodec libx264  -acodec \
libfdk_aac  output.mp4
ffmpeg version N-49127-ge4eebc2 Copyright (c) 2000-2013 the FFmpeg
developers
  built on Jan 21 2013 16:01:42 with gcc 4.7.1 (GCC)
    configuration: --enable-filter=color --enable-libx264 --enable-gpl
    --enable-libfdk-aac --enable-nonfree
      libavutil      52. 15.100 / 52. 15.100
        libavcodec     54. 90.100 / 54. 90.100
          libavformat    54. 61.102 / 54. 61.102
            libavdevice    54.  3.102 / 54.  3.102
              libavfilter     3. 33.100 /  3. 33.100
                libswscale      2.  2.100 /  2.  2.100
                  libswresample   0. 17.102 /  0. 17.102
                    libpostproc    52.  2.100 / 52.  2.100
                    [aac @ 0x24a19a0] Number of bands (24) exceeds limit
                    (5).
                    [h264 @ 0x24a9820] AVC: nal size 1575592468
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1263225676
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1263225676
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1515870810
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1515870810
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1515870810
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -120364129
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 111204019
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1250404508
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1600400352
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 991568310
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1604535266
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1861900960
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1286548360
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1445134667
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 771987317
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1111107670
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -538367178
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1265155375
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 283515522
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 901365378
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1335290674
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1219218352
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1595924205
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1316516881
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1668755956
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1880867235
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1797224352
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1370821625
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1930708857
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 1079057234
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size -1829272157
                    [h264 @ 0x24a9820] no frame!
                    [h264 @ 0x24a9820] AVC: nal size 2050080175
                    [h264 @ 0x24a9820] no frame!

                    <repeats>


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2489f80] max_analyze_duration 5000000
reached at 5015510 microseconds
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2489f80] decoding for stream 3 failed
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2489f80] Could not find codec parameters
for stream 3 (Video: h264 (avc1 / 0x31637661), 320x180, 111 kb/s):
unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:0.mp4|1.mp4':
  Metadata:
    compatible_brands: isomiso2avc1mp41
    major_brand     : isom
    minor_version   : 512
    encoder         : Lavf54.61.102
  Duration: 00:00:05.32, start: 0.046440, bitrate: 539 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
320x180, 174 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 128 kb/s
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono,
fltp, 128 kb/s
    Metadata:
      handler_name    : SoundHandler
    Stream #0:3(eng): Video: h264 (avc1 / 0x31637661), 320x180, 111
kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 23976 tbc
    Metadata:
      handler_name    : VideoHandler
[libx264 @ 0x24c46e0] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.1 Cache64
[libx264 @ 0x24c46e0] profile High, level 1.3
[libx264 @ 0x24c46e0] 264 - core 129 r2 bc13772 - H.264/MPEG-4 AVC codec
- Copyleft 2003-2013 - http://www.videolan.org/x264.html - options:
  cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    compatible_brands: isomiso2avc1mp41
    major_brand     : isom
    minor_version   : 512
    encoder         : Lavf54.61.102
    Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
320x180, q=-1--1, 11988 tbn, 29.97 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz,
stereo, s16, 128 kb/s
    Metadata:
      handler_name    : SoundHandler
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (aac -> libfdk_aac)
Press [q] to stop, [?] for help
frame=  151 fps=0.0 q=-1.0 Lsize=     185kB time=00:00:05.06 bitrate=
299.7kbits/s dup=1 drop=0    
video:98kB audio:80kB subtitle:0 global headers:0kB muxing overhead
3.596521%
[libx264 @ 0x24c46e0] frame I:15    Avg QP:21.82  size:  3619
[libx264 @ 0x24c46e0] frame P:48    Avg QP:23.05  size:   765
[libx264 @ 0x24c46e0] frame B:88    Avg QP:24.60  size:   101
[libx264 @ 0x24c46e0] consecutive B-frames: 19.2%  6.6%  7.9% 66.2%
[libx264 @ 0x24c46e0] mb I  I16..4: 22.9% 43.9% 33.2%
[libx264 @ 0x24c46e0] mb P  I16..4:  5.8%  7.9%  2.9%  P16..4: 27.4%
13.6%  4.9%  0.0%  0.0%    skip:37.5%
[libx264 @ 0x24c46e0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 28.0%
0.9%  0.1%  direct: 0.2%  skip:70.8%  L0:41.5% L1:54.5% BI: 3.9%
[libx264 @ 0x24c46e0] 8x8 transform intra:45.2% inter:67.9%
[libx264 @ 0x24c46e0] coded y,uvDC,uvAC intra: 52.6% 4.8% 3.0% inter:
4.6% 5.7% 1.1%
[libx264 @ 0x24c46e0] i16 v,h,dc,p: 62% 23%  7%  8%
[libx264 @ 0x24c46e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 25% 17%  4%  4%
5%  5%  6%  6%
[libx264 @ 0x24c46e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 40% 23% 10%  4%  5%
5%  5%  4%  4%
[libx264 @ 0x24c46e0] i8c dc,h,v,p: 94%  4%  2%  0%
[libx264 @ 0x24c46e0] Weighted P-Frames: Y:2.1% UV:0.0%
[libx264 @ 0x24c46e0] ref P L0: 75.8% 14.9%  5.5%  1.9%  1.9%
[libx264 @ 0x24c46e0] ref B L0: 93.2%  5.6%  1.2%
[libx264 @ 0x24c46e0] ref B L1: 95.4%  4.6%
[libx264 @ 0x24c46e0] kb/s:158.64

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

Re: concat issue

Liam Condron-Farnos
The concat protocol works at the file level, and as such it only works with
a select few container formats. MP4 is not one of those formats; so you can
either convert your files to mpeg transport streams, or use the concat *
demuxer* instead.

See the community
wiki<https://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20concatenate%20(join%2C%20merge)%20media%20files>for
more information.

On 23 January 2013 00:04, johnd <[hidden email]> wrote:

> I am not able to concat to vids...
>
> john@ldev:ffmpeg -y -i concat:"0.mp4|1.mp4" -vcodec libx264  -acodec \
> libfdk_aac  output.mp4
> ffmpeg version N-49127-ge4eebc2 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Jan 21 2013 16:01:42 with gcc 4.7.1 (GCC)
>     configuration: --enable-filter=color --enable-libx264 --enable-gpl
>     --enable-libfdk-aac --enable-nonfree
>       libavutil      52. 15.100 / 52. 15.100
>         libavcodec     54. 90.100 / 54. 90.100
>           libavformat    54. 61.102 / 54. 61.102
>             libavdevice    54.  3.102 / 54.  3.102
>               libavfilter     3. 33.100 /  3. 33.100
>                 libswscale      2.  2.100 /  2.  2.100
>                   libswresample   0. 17.102 /  0. 17.102
>                     libpostproc    52.  2.100 / 52.  2.100
>                     [aac @ 0x24a19a0] Number of bands (24) exceeds limit
>                     (5).
>                     [h264 @ 0x24a9820] AVC: nal size 1575592468
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1263225676
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1263225676
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1515870810
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1515870810
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1515870810
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -120364129
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 111204019
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1250404508
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1600400352
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 991568310
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1604535266
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1861900960
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1286548360
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1445134667
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 771987317
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1111107670
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -538367178
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1265155375
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 283515522
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 901365378
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1335290674
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1219218352
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1595924205
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1316516881
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1668755956
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1880867235
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1797224352
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1370821625
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1930708857
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 1079057234
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size -1829272157
>                     [h264 @ 0x24a9820] no frame!
>                     [h264 @ 0x24a9820] AVC: nal size 2050080175
>                     [h264 @ 0x24a9820] no frame!
>
>                     <repeats>
>
>
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2489f80] max_analyze_duration 5000000
> reached at 5015510 microseconds
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2489f80] decoding for stream 3 failed
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2489f80] Could not find codec parameters
> for stream 3 (Video: h264 (avc1 / 0x31637661), 320x180, 111 kb/s):
> unspecified pixel format
> Consider increasing the value for the 'analyzeduration' and 'probesize'
> options
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:0.mp4|1.mp4':
>   Metadata:
>     compatible_brands: isomiso2avc1mp41
>     major_brand     : isom
>     minor_version   : 512
>     encoder         : Lavf54.61.102
>   Duration: 00:00:05.32, start: 0.046440, bitrate: 539 kb/s
>     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 320x180, 174 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc
>     Metadata:
>       handler_name    : VideoHandler
>     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
> fltp, 128 kb/s
>     Metadata:
>       handler_name    : SoundHandler
>     Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono,
> fltp, 128 kb/s
>     Metadata:
>       handler_name    : SoundHandler
>     Stream #0:3(eng): Video: h264 (avc1 / 0x31637661), 320x180, 111
> kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 23976 tbc
>     Metadata:
>       handler_name    : VideoHandler
> [libx264 @ 0x24c46e0] using cpu capabilities: MMX2 SSE2Fast SSSE3
> FastShuffle SSE4.1 Cache64
> [libx264 @ 0x24c46e0] profile High, level 1.3
> [libx264 @ 0x24c46e0] 264 - core 129 r2 bc13772 - H.264/MPEG-4 AVC codec
> - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options:
>   cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
> psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
> cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
> lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
> bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
> b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
> keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
> mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
> aq=1:1.00
> Output #0, mp4, to 'output.mp4':
>   Metadata:
>     compatible_brands: isomiso2avc1mp41
>     major_brand     : isom
>     minor_version   : 512
>     encoder         : Lavf54.61.102
>     Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
> 320x180, q=-1--1, 11988 tbn, 29.97 tbc
>     Metadata:
>       handler_name    : VideoHandler
>     Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz,
> stereo, s16, 128 kb/s
>     Metadata:
>       handler_name    : SoundHandler
>       handler_name    : SoundHandler
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 -> libx264)
>   Stream #0:1 -> #0:1 (aac -> libfdk_aac)
> Press [q] to stop, [?] for help
> frame=  151 fps=0.0 q=-1.0 Lsize=     185kB time=00:00:05.06 bitrate=
> 299.7kbits/s dup=1 drop=0
> video:98kB audio:80kB subtitle:0 global headers:0kB muxing overhead
> 3.596521%
> [libx264 @ 0x24c46e0] frame I:15    Avg QP:21.82  size:  3619
> [libx264 @ 0x24c46e0] frame P:48    Avg QP:23.05  size:   765
> [libx264 @ 0x24c46e0] frame B:88    Avg QP:24.60  size:   101
> [libx264 @ 0x24c46e0] consecutive B-frames: 19.2%  6.6%  7.9% 66.2%
> [libx264 @ 0x24c46e0] mb I  I16..4: 22.9% 43.9% 33.2%
> [libx264 @ 0x24c46e0] mb P  I16..4:  5.8%  7.9%  2.9%  P16..4: 27.4%
> 13.6%  4.9%  0.0%  0.0%    skip:37.5%
> [libx264 @ 0x24c46e0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 28.0%
> 0.9%  0.1%  direct: 0.2%  skip:70.8%  L0:41.5% L1:54.5% BI: 3.9%
> [libx264 @ 0x24c46e0] 8x8 transform intra:45.2% inter:67.9%
> [libx264 @ 0x24c46e0] coded y,uvDC,uvAC intra: 52.6% 4.8% 3.0% inter:
> 4.6% 5.7% 1.1%
> [libx264 @ 0x24c46e0] i16 v,h,dc,p: 62% 23%  7%  8%
> [libx264 @ 0x24c46e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 25% 17%  4%  4%
> 5%  5%  6%  6%
> [libx264 @ 0x24c46e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 40% 23% 10%  4%  5%
> 5%  5%  4%  4%
> [libx264 @ 0x24c46e0] i8c dc,h,v,p: 94%  4%  2%  0%
> [libx264 @ 0x24c46e0] Weighted P-Frames: Y:2.1% UV:0.0%
> [libx264 @ 0x24c46e0] ref P L0: 75.8% 14.9%  5.5%  1.9%  1.9%
> [libx264 @ 0x24c46e0] ref B L0: 93.2%  5.6%  1.2%
> [libx264 @ 0x24c46e0] ref B L1: 95.4%  4.6%
> [libx264 @ 0x24c46e0] kb/s:158.64
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: concat issue

Carl Eugen Hoyos
In reply to this post by johnd
johnd <john <at> jjdev.com> writes:

> I am not able to concat to vids...
>
> john <at> ldev:ffmpeg -y -i concat:"0.mp4|1.mp4"

Apart from the concat demuxer (that will work fine
for your use case) there is also a concat filter,
see the fine documentation.
Both are better choices than recoding to transport
streams.

Carl Eugen

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

Re: concat issue

Liam Condron-Farnos
You certainly *can* remux h.264 video and AAC audio into a transport
stream, though you have to use a couple of bitstream
filters<http://ffmpeg.org/ffmpeg-bitstream-filters.html>
:

    ffmpeg -i 01.mp4 -c copy -bsf:v h264_mp4toannexb 01.ts
    ffmpeg -i 02.mp4 -c copy -bsf:v h264_mp4toannexb 02.ts
    ffmpeg -i "concat:01.ts|02.ts" -c copy -bsf:a aac_adtstoasc output.mp4

However, I would strongly recommend using the concat demuxer, as it avoids
creating those intermediate files. Really, with recent ffmpeg you should
only use the concat protocol if your input files are already in one of the
formats that supports file-level concatenation (like mpeg, vob, or ts
files).

On 23 January 2013 08:30, Carl Eugen Hoyos <[hidden email]> wrote:

> johnd <john <at> jjdev.com> writes:
>
> > I am not able to concat to vids...
> >
> > john <at> ldev:ffmpeg -y -i concat:"0.mp4|1.mp4"
>
> Apart from the concat demuxer (that will work fine
> for your use case) there is also a concat filter,
> see the fine documentation.
> Both are better choices than recoding to transport
> streams.
>
> Carl Eugen
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: concat issue

johnd
On Wed, Jan 23, 2013 at 09:51:37AM +0000, Liam Condron-Farnos wrote:
>
> However, I would strongly recommend using the concat demuxer, as it avoids
> creating those intermediate files.
ok

I have played with the concat filter like this:

ffmpeg -y -i 0.mp4  -i 1.mp4  -i 2.mp4  -filter_complex \
concat=n=3:v=1:a=1 output.mp4

which works great (if I can accept many intermediate files), this will
be plan B

hopefully I can do plan A: concat demuxer

I'm reading the man page now

Thanks for pointing me in this direction


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

Re: concat issue

Carl Eugen Hoyos
John de la Garza <john <at> jjdev.com> writes:

> hopefully I can do plan A: concat demuxer
>
> I'm reading the man page now

Here is the documentation for the concat filter:
https://ffmpeg.org/ffmpeg-filters.html#concat

Carl Eugen

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

Re: concat issue

Liam Condron-Farnos
...and here is the documentation for the concat demuxer:
http://ffmpeg.org/ffmpeg-formats.html#concat

IMO the following page from the community wiki is easier to understand than
the official documentation (and covers all three of the concatenation
options with ffmpeg):
https://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20concatenate%20%28join%2C%20merge%29%20media%20files


On 23 January 2013 23:38, Carl Eugen Hoyos <[hidden email]> wrote:

> John de la Garza <john <at> jjdev.com> writes:
>
> > hopefully I can do plan A: concat demuxer
> >
> > I'm reading the man page now
>
> Here is the documentation for the concat filter:
> https://ffmpeg.org/ffmpeg-filters.html#concat
>
> Carl Eugen
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: concat issue

johnd
In reply to this post by Carl Eugen Hoyos
On Wed, Jan 23, 2013 at 11:38:45PM +0000, Carl Eugen Hoyos wrote:
> John de la Garza <john <at> jjdev.com> writes:
>
> > hopefully I can do plan A: concat demuxer
> >
> > I'm reading the man page now
>
> Here is the documentation for the concat filter:
> https://ffmpeg.org/ffmpeg-filters.html#concat

yes, I have that working already I am trying to figure out how to use
the concat demuxer.  I'm searching for documentation.  The man page for
ffmpeg talks about having a script, but I can't find any specifics on
how to make the script.  
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: concat issue

Liam Condron-Farnos
That community wiki page explains how to use the demuxer in plain language.

On 24 January 2013 00:03, John de la Garza <[hidden email]> wrote:

> On Wed, Jan 23, 2013 at 11:38:45PM +0000, Carl Eugen Hoyos wrote:
> > John de la Garza <john <at> jjdev.com> writes:
> >
> > > hopefully I can do plan A: concat demuxer
> > >
> > > I'm reading the man page now
> >
> > Here is the documentation for the concat filter:
> > https://ffmpeg.org/ffmpeg-filters.html#concat
>
> yes, I have that working already I am trying to figure out how to use
> the concat demuxer.  I'm searching for documentation.  The man page for
> ffmpeg talks about having a script, but I can't find any specifics on
> how to make the script.
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: concat issue

johnd
In reply to this post by Liam Condron-Farnos
On Wed, Jan 23, 2013 at 09:51:37AM +0000, Liam Condron-Farnos wrote:
> However, I would strongly recommend using the concat demuxer, as it avoids
> creating those intermediate files. Really, with recent ffmpeg you should
> only use the concat protocol if your input files are already in one of the
> formats that supports file-level concatenation (like mpeg, vob, or ts
> files).

I have read the docs, but don't still don't understand how the concat
demuxer will help me avoid creating intermediate files.

From what I am understanding, it seems like I would still cut up the
file and concat it back.  The docs say to create a file with the
names of the files you want to concat.  Are those the intermediate
files?


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

Re: concat issue

Liam Condron-Farnos
To use the concat protocol, your files need to be one of a limited number
of container formats, lkike mpeg ts. If they are MP4s, you have to create
intermediate .ts files in the way I described upthread.

With the demuxer, you don't need to do that, it can take any input from any
container, as long as they have the same resolution and codecs. So even if
you want to concatenate an MP4 and an FLV files, you can do that, so long
as they both have h.264 video/AAC audio. Because the demuxer doesn't care
about the container format, there is no need to create those intermediate
.ts files, it can work straight from your initial MP4s.

If you create a folder called inputs.txt in your working directory, and
have it contain lines like:

file '01.mp4'
file '02.mp4'
file '03.mp4'

...then you can use the demuxer like so:

ffmpeg -f concat -i inputs.txt -c copy output.mp4

...which will concatenate the files in the order described in the
inputs.txt file.

IF you are saying that you want to cut up & re-arrange a file on a single
command-line, without creating those smaller MP4 files... well, I daresay
that you could kludge something together with the split, select and concat
filters, if you really wanted to... but personally that's the point where
I'd just fire up an NLE.

On 24 January 2013 00:21, John de la Garza <[hidden email]> wrote:

> On Wed, Jan 23, 2013 at 09:51:37AM +0000, Liam Condron-Farnos wrote:
> > However, I would strongly recommend using the concat demuxer, as it
> avoids
> > creating those intermediate files. Really, with recent ffmpeg you should
> > only use the concat protocol if your input files are already in one of
> the
> > formats that supports file-level concatenation (like mpeg, vob, or ts
> > files).
>
> I have read the docs, but don't still don't understand how the concat
> demuxer will help me avoid creating intermediate files.
>
> From what I am understanding, it seems like I would still cut up the
> file and concat it back.  The docs say to create a file with the
> names of the files you want to concat.  Are those the intermediate
> files?
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: concat issue

Nicolas George-2
In reply to this post by johnd
Le quartidi 4 pluviôse, an CCXXI, John de la Garza a écrit :
> yes, I have that working already I am trying to figure out how to use
> the concat demuxer.  I'm searching for documentation.  The man page for
> ffmpeg talks about having a script, but I can't find any specifics on
> how to make the script.  

http://ffmpeg.org/ffmpeg-formats.html#Syntax

The syntax is very limited at this time, that is why there is so little
about it.

Regards,

--
  Nicolas George

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

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: concat issue

johnd
In reply to this post by Liam Condron-Farnos
On Thu, Jan 24, 2013 at 10:29:52AM +0000, Liam Condron-Farnos wrote:

> To use the concat protocol, your files need to be one of a limited number
> of container formats, lkike mpeg ts. If they are MP4s, you have to create
> intermediate .ts files in the way I described upthread.
>
> With the demuxer, you don't need to do that, it can take any input from any
> container, as long as they have the same resolution and codecs. So even if
> you want to concatenate an MP4 and an FLV files, you can do that, so long
> as they both have h.264 video/AAC audio. Because the demuxer doesn't care
> about the container format, there is no need to create those intermediate
> .ts files, it can work straight from your initial MP4s.

So in my case, I am starting with some videos (they could all be
different codecs/containers).  I cut them up into  h.264/mp4,
create some black silent videos of teh same codec/container.

At the end I have a bunch of clips that are all h.264/mp4.  Is there
any advantage in using the concat demuxer  as opposed to the
concat filter?


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

Re: concat issue

Liam Condron-Farnos
 >> To use the concat protocol, your files need to be one of a limited
number
>> of container formats, lkike mpeg ts. If they are MP4s, you have to create
>> intermediate .ts files in the way I described upthread.
>>
>> With the demuxer, you don't need to do that, it can take any input from
any
>> container, as long as they have the same resolution and codecs. So even
if
>> you want to concatenate an MP4 and an FLV files, you can do that, so long
>> as they both have h.264 video/AAC audio. Because the demuxer doesn't care
>> about the container format, there is no need to create those intermediate
>> .ts files, it can work straight from your initial MP4s.

>So in my case, I am starting with some videos (they could all be
>different codecs/containers).  I cut them up into  h.264/mp4,
>create some black silent videos of teh same codec/container.
>
>At the end I have a bunch of clips that are all h.264/mp4.  Is there
>any advantage in using the concat demuxer  as opposed to the
>concat filter?

*If* you put them into .ts files in the first place, rather than MP4s, then
no, there is no advantage to using the demuxer - in fact, I've found that
the protocol uses less resources (but only so long as your input files are
in one of those container formats that support file-level concatenation).
You will have to use `-bsf:a aac_adtstoasc` in your ocmmand-line, though.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user