0

My Video file shows below meta-data with ffprobe/ffmpeg:

Duration: 00:44:27.52, start: 1333.760000, bitrate: 335 kb/s
  Stream #0.0(und): Video: h264 (Main), yuv420p, 640x480, 25 tbr, 90k tbn, 50 tbc

Note: The file does not contain audio.

I am trying to convert this video file to other video file, using ffmpeg/avconv.

This works: (but encodes h.264 video to mpeg4)

ffmpeg -i input.mp4 output.mp4

& it generates output file of proper duration (44:27 - 1333 seconds = 22:14)

This does not work:

ffmpeg -i input.mp4 -vcodec copy output.mp4

Generates file without video.

The output contains:

$ avconv -i input.mp4 -vcodec copy output.mp4

avconv version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:09:46 with gcc 4.8.1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    creation_time   : 2014-01-19 22:43:21
  Duration: 00:44:27.52, start: 1333.760000, bitrate: 335 kb/s
    Stream #0.0(und): Video: h264 (Main), yuv420p, 640x480, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      creation_time   : 2014-01-19 22:43:21
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    creation_time   : 2014-01-19 22:43:21
    encoder         : Lavf53.21.1
    Stream #0.0(und): Video: ![0][0][0] / 0x0021, yuv420p, 640x480, q=2-31, 90k tbn, 90k tbc
    Metadata:
      creation_time   : 2014-01-19 22:43:21
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press ctrl-c to stop encoding
frame=    0 fps=  0 q=-1.0 Lsize=       0kB time=10000000000.00 bitrate=   0.0kbits/s    
video:0kB audio:0kB global headers:0kB muxing overhead inf%
anishsane
  • 20,270
  • 5
  • 40
  • 73
  • To answer why I am converting a video file to another video file, with vcodec copy: I am trying to add audio to it. I skipped those details in the command line showed above, to avoid confusion. & to help debugging. – anishsane Jan 22 '14 at 07:57
  • Please download and test a recent [build of `ffmpeg`](https://ffmpeg.org/download.html#LinuxBuilds) from FFmpeg. Does it also have the same issue? Also see [Who can tell me the difference and relation between ffmpeg, libav, and avconv?](http://stackoverflow.com/a/9477756/1109017) – llogan Jan 22 '14 at 09:05
  • "Please download and test a recent build of ffmpeg from FFmpeg": This indeed solved the issue. Thanks a LOT... – anishsane Jan 22 '14 at 10:24
  • Looks like a YAAB: Yet Another Avconv Bug. – llogan Jan 22 '14 at 19:50
  • @LordNeckbeard: Yes, it is.. :-) Can you add this as answer, so that I can mark it as accepted answer? Someone else can benefit from it. – anishsane Jan 23 '14 at 05:53
  • 1
    There you go. Please note that `ffmpeg` usage questions are better suited for [su] since [so] is only for programming questions (and we [tag:ffmpeg] cli answerers are at [su]). – llogan Jan 25 '14 at 22:43

1 Answers1

3

FFmpeg development is very active

When experiencing an issue it is best to get a new build of ffmpeg from FFmpeg to ensure that you are not encountering a bug that has already been fixed.

Ubuntu uses a fork

Ubuntu does not use ffmpeg from FFmpeg, but an old, fake version from a fork. See Who can tell me the difference and relation between ffmpeg, libav, and avconv?

Get ffmpeg

You can:

Using the build

The build is easy. You just download, extract, and execute (notice the ./ before ffmpeg):

wget http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.$(date +"%F").tar.gz
tar xzvf ffmpeg.static.32bit.$(date +"%F").tar.gz
./ffmpeg -i input -codec copy -map 0 output

Compiling

Compiling ffmpeg allows you to customize it how you like. The compile guide is non-invasive and easy to undo.

Reporting a bug

If a recent build still has the suspected bug then you can get help at the ffmpeg-user mailing list, or perform a search at the FFmpeg Bug Tracker and report it if it is a new bug. If you report the bug make sure to:

  • Check that you are using a recent build.
  • Provide the complete ffmpeg command and the complete ffmpeg console output.
  • Provide all necessary samples.
  • Use the minimal command that still shows the issue.
  • Provide any additional information that is useful for others who will attempt to duplicate the issue.
Community
  • 1
  • 1
llogan
  • 121,796
  • 28
  • 232
  • 243