Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an FMS (Flash Media Server 4) that writes out the video streams to .f4v files. As far as I can see and understand, it only writes the video/audio data with no container at all, though I could be mistaken. The url does contain "mp4:" so I think it might be an mpeg-4 container? But when I open it in VLC it doesn't play, and shows no codec information.

So I'm thinking I have to wrap it in a container, and I need it to be as fast as possible and without affecting the actual data (i.e. I don't want to transcode it). I've looked using ffmpeg and mkvtoolnix, but mkvtoolnix can't handle the data at all (produces an error) and I've managed to convert it to a new file using ffmpeg, but the result is a larger file that has a weird 30 second pause in the beginning.

I'm sure there's an easy way to do this but I haven't found it yet.

Here's the output from ffprobe.exe:

C:\Program Files (x86)\ffmpeg\bin>ffprobe.exe time.f4v
ffprobe version N-31627-g9c2651a, Copyright (c) 2007-2011 the FFmpeg developers
  built on Jul 23 2011 15:02:13 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-runtime-cpudetect --
enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --en
able-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 11. 0 / 51. 11. 0
  libavcodec   53.  9. 0 / 53.  9. 0
  libavformat  53.  6. 0 / 53.  6. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 27. 3 /  2. 27. 3
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 003BA280] multiple edit list entries, a/v desync might occur, patch welco
[mov,mp4,m4a,3gp,3g2,mj2 @ 003BA280] multiple edit list entries, a/v desync might occur, patch welco
[mov,mp4,m4a,3gp,3g2,mj2 @ 003BA280] multiple edit list entries, a/v desync might occur, patch welco
[mov,mp4,m4a,3gp,3g2,mj2 @ 003BA280] max_analyze_duration 5000000 reached at 5018000
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'time.f4v':
    major_brand     : f4v
    minor_version   : 0
    compatible_brands: isommp42m4v
    creation_time   : 2016-11-13 05:20:19
  Duration: 00:01:15.74, start: 0.000000, bitrate: 686 kb/s
    Stream #0.0(eng): Video: h264 (Baseline), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], PAR 3:4 DAR 4:3,
 59.94 tbr, 1k tbn, 119.88 tbc
      creation_time   : 2016-11-13 05:20:19
    Stream #0.1(eng): Audio: mp3, 22050 Hz, mono, s16, 48 kb/s
      creation_time   : 2016-11-13 05:20:19
    Stream #0.2(eng): Data: amf0 / 0x30666D61
      creation_time   : 2016-11-13 05:20:19
Unsupported codec with id 0 for input stream 2

The error I get from mkvtoolnix is: Error: Quicktime/MP4 reader: Constant samplesize & variable duration not yet supported. Contact the author if you have such a sample file.

share|improve this question

After figuring out the right keywords to put into google, I found the solution:

C:\Program Files (x86)\ffmpeg\bin>ffmpeg -i .f4v -acodec copy -vcodec copy -y .mkv

My output file is pretty crap though, but I think that may be more related to either my input file or how ffmpeg reads that format.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .