0

The video which I am trying to convert is uploaded at http://www.filedropper.com/video_17

I am using the following command to convert the file:

ffmpeg -i archive.iva -c copy -map 0 output.mp4 -vsync 2 -y;

The file should be around 1 min in length but after conversion is of only 7 secs

What am I doing wrong?


Edit

Console Output:

rupesh@rupesh-Lenovo-IdeaPad-Y510P:~/video$ ffmpeg -i archive.iva -c copy -map 0 output.mp4 -vsync 2 -y; 
ffmpeg version N-80026-g936751b Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 42.100 / 57. 42.100
  libavformat    57. 36.100 / 57. 36.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 45.100 /  6. 45.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[mjpeg @ 0x3a2eda0] Format mjpeg detected only with low score of 25, misdetection possible!
Input #0, mjpeg, from 'archive.iva':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 25 fps, 25 tbr, 1200k tbn
[mp4 @ 0x3a309c0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf57.36.100
    Stream #0:0: Video: mjpeg (l[0][0][0] / 0x006C), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, q=2-31, 25 fps, 25 tbr, 1200k tbn
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=  190 fps=0.0 q=-1.0 Lsize=    5909kB time=00:00:07.56 bitrate=6403.2kbits/s speed= 127x    
video:5908kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.026134%
  • Your command is not valid. There is no output file name. You need to show the complete console output from the command. – llogan Jun 09 '16 at 06:38
  • @LordNeckbeard The output file name is output.mp4 and I am getting the output with this command. The only problem is that it seems fast forwarded. – Rupesh Parab Jun 09 '16 at 06:42
  • I see. Missed it because your options are being used in an incorrect order. – llogan Jun 09 '16 at 17:44

1 Answers1

1

You don't need streamcopy (-c copy) here. Just simply let FFmpeg to decide about the actual output parameters (it will try to reproduce the same quality of the input video, like keeping the same size, aspect ratio, etc, etc):

ffmpeg -i archive.iva output.mp4

Also, you completely misusing the options.

  • -y tells FFmpeg to automatically say 'yes' to yes/no questions (usually to override output file with the same name. Global option, so it should be used before the -i option.
  • -map: using this option, you can tell FFmpeg wich stream should be processed in the following statement. (e.g.: -map a:1 selects the second audio stream)
  • The -vsync option must be paced in the encoding options; before the output! Also I'm not sure it's nessesary here.
  • -c selects an encoder (or decoder) for one or more streams. So if you want to specify 'h264' for video streams, it should be look like this: -c:v h264. The copy parameter tells FFmpeg to copy the selected streams unchanged to the output. If you'd leave this in, the player couldn't decode the video as an MP4 file.

The structure of a basic FFmpeg command can be roughly outlined like this:

ffmpeg [global options] -i [input file] [encoding/filtering options] [output file]
Gergely Lukacsy
  • 2,881
  • 2
  • 23
  • 28