[FFmpeg-user] When I cut a mp4-file, the cut-file has lost its video-codec

scenator info at scenator.de
Sun Aug 23 16:45:19 CEST 2015


*Hello,

I need your help.

1. Problem: When I cut a mp4-video-file a first time, the cut-file has lost
its video-codec.
I think, this causes the second problem:

2. Problem: When I cut a mp4-video-file a second time, the result-videofile
is 0 kb!

It would be very kind f you, to answer to my 3 questions below.

Best Regards,
  Frank

I cut a scene from the original mp4-File:
=> file-info original-file:*
ffmpeg version N-74525-gdb91e0e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.3 (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-libdcadec --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-lzma
--enable-decklink --enable-zlib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 58.100 / 56. 58.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 35.100 /  5. 35.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'C:\Users\Frank\Documents\Downloads\2015_08_16_Halbzeit1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.19.100
  Duration: 00:40:24.65, start: 0.042667, bitrate: 2633 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), *yuv420p*,
1280x720 [SAR 1:1 DAR 16:9], 2499 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
(default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[NULL @ 0555f020] Unable to find a suitable output format for 'showinfo'
showinfo: Invalid argument
***********************************************************************************************
*1. ffmpeg-call:
ffmpeg.exe -ss 332.15 -i "C:\Users\Frank\DOCUME~1\DOWNLO~1\2015_0~1.MP4" -y
-ss 1.75 -acodec copy -vcodec copy  -t 20 
"d:\Temp\Stop!1.HZ!00.05.44.59!!!.mp4"*

***********************************************************************************************
ffmpeg-console-output:
ffmpeg version N-74525-gdb91e0e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.3 (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-libdcadec --e
nable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmp3lame --enable-libopencore-am
rnb --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-lzma --enable-decklink --enable-zlib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 58.100 / 56. 58.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 35.100 /  5. 35.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'C:\Users\Frank\DOCUME~1\DOWNLO~1\2015_0~1.MP4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.19.100
  Duration: 00:40:24.65, start: 0.042667, bitrate: 2633 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 2499 kb/s, 25 fps, 25 tbr, 128
00 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
*[mp4 @ 057709e0] Codec for stream 0 does not use global headers but
container format requires global headers
[mp4 @ 057709e0] Codec for stream 1 does not use global headers but
container format requires global headers*
Output #0, mp4, to 'd:\Temp\Stop!1.HZ!00.05.44.59!!!.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
    Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2499 kb/s, 25 fps, 25 tb
r, 12800 tbn, 12800 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo,
127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  296 fps=0.0 q=-1.0 Lsize=    4104kB time=00:00:20.00
bitrate=1680.4kbits/s
video:3780kB audio:312kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.284213%

***********************************************************************************************
*Question1: How can I manage to use <...global headers...> for this
container?*

***********************************************************************************************
=> file-info cut-file1:
ffmpeg version N-74525-gdb91e0e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.3 (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-libdcadec --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-lzma
--enable-decklink --enable-zlib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 58.100 / 56. 58.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 35.100 /  5. 35.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
*[mov,mp4,m4a,3gp,3g2,mj2 @ 04a55be0] Could not find codec parameters for
stream 0 (Video: h264 (avc1 / 0x31637661), none, 1280x720, 2615 kb/s):
unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize'
options*
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\Temp\STOP!1~4.MP4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
  Duration: 00:00:19.99, start: 0.017000, bitrate: 1681 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), *none*, 1280x720,
2615 kb/s, 25 fps, 25 tbr, 12800 tbn, 25600 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[NULL @ 051d0060] Unable to find a suitable output format for 'showinfo'
showinfo: Invalid argument

***********************************************************************************************
*I think,. this is the main error: As you can see, the video-codec <yuv420p>
is lost (Stream #0:0 .... , none, ...)

Question2: How is it possible to lose the video-codec <yuv420p>?
Question3: How can I set the original or a differen video-codec?
Question4: Is it possible, to install the <yuv420p>-codec, this way, that
the first cut will not "delete" the codec?


When i take a second cut (from cut-file1, the resultfile is 0 kb!
2. ffmpeg-call:
ffmpeg.exe  -i "d:\Temp\STOP!1~1.MP4" -y -ss 4.75 -acodec copy -vcodec copy 
-t 5.25  "d:\Temp\Stop!1.HZ!00.00.34.68!!!.mp4"*

***********************************************************************************************
ffmpeg-console-output:
ffmpeg version N-74525-gdb91e0e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.3 (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-libdcadec --e
nable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmp3lame --enable-libopencore-am
rnb --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-lzma --enable-decklink --enable-zlib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 58.100 / 56. 58.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 35.100 /  5. 35.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
*[mov,mp4,m4a,3gp,3g2,mj2 @ 02bd5fe0] Could not find codec parameters for
stream 0 (Video: h264 (avc1 / 0x31637661), none, 1280x720
, 2615 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize'
options*
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\Temp\STOP!1~4.MP4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
  Duration: 00:00:19.99, start: 0.017000, bitrate: 1681 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1280x720, 2615
kb/s, 25 fps, 25 tbr, 12800 tbn, 25600 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[mp4 @ 053e0060] Codec for stream 0 does not use global headers but
container format requires global headers
[mp4 @ 053e0060] Codec for stream 1 does not use global headers but
container format requires global headers
Output #0, mp4, to 'd:\Temp\Stop!1.HZ!00.05.44.59!!!.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
    Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), none, 1280x720,
q=2-31, 2615 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tb
c (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo,
128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 02bd5fe0] stream 1, offset 0x18062: partial file
d:\Temp\STOP!1~4.MP4: Invalid data found when processing input
frame=    0 fps=0.0 q=-1.0 Lsize=      26kB time=00:00:01.61 bitrate=
132.3kbits/s
video:0kB audio:25kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 4.128780%


***********************************************************************************************
=> file-inof result-file:
ffmpeg version N-74525-gdb91e0e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.3 (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-libdcadec --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-lzma
--enable-decklink --enable-zlib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 58.100 / 56. 58.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 35.100 /  5. 35.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\Temp\STOP!1~4.MP4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
  Duration: 00:00:03.29, start: 0.018000, bitrate: 131 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[NULL @ 02be8500] Unable to find a suitable output format for 'showinfo'
showinfo: Invalid argument



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/When-I-cut-a-mp4-file-the-cut-file-has-lost-its-video-codec-tp4671941.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list