Forum Replies Created

Page 9 of 16
  • Reuben Martin

    July 3, 2012 at 2:01 am in reply to: Width and Height reversed

    It doesn’t really matter what the PHP code is if you haven’t yet determined is ffmpeg is reading/encoding/whatever the file with the correct width height parameters.

    Play the file with ffmpeg.
    ffplay myVideoFile.xxx

    Is the orientation and width/height correct during playback? What does the terminal output say about the video stream when you play it? It’s output should include the frame size. If both of those are correct then you can start looking to see if PHP is parsing stdout / stderr correctly.

    Or, if you like, instead of trying to parse all that goop with with PHP, you can just have the shell command return the values to you pre-parsed.

    For width:
    ffprobe -show_streams myVideoFile.xxx 2> /dev/null | grep width= | sed '1 s/.*\=//'

    For height:
    ffprobe -show_streams myVideoFile.xxx 2> /dev/null | grep height= | sed '1 s/.*\=//'

  • Reuben Martin

    July 2, 2012 at 2:27 am in reply to: Width and Height reversed

    Is this a problem with ffmpeg or with the web app you are loading the video to? i.e. does it play correctly on your computer before loading it to the web app?

    If so, I would suspect that the dope who wrote the web app programmed it to assume that the larger of the two values is always the width.

  • Reuben Martin

    July 2, 2012 at 2:05 am in reply to: Unable to add audio to video

    It tells you in the terminal output: [mp4 @ 01D60060] track 1: muxing mp3 at 8000hz is not supported

    You will need to re-sample and re-encode the audio in order to mux it into an mp4 file.

  • Reuben Martin

    June 26, 2012 at 2:49 pm in reply to: extracting key frames with ffmpeg

    This would not be a good idea (and isn’t possible using ffmpeg that I am aware of). P and B frames all reference the I frames, so modifying the I frames and swapping them out will screw up all the other frames referencing them.

  • Reuben Martin

    June 26, 2012 at 2:24 am in reply to: extracting key frames with ffmpeg

    Be aware that the filter functionality has been undergoing a lot of development, so the features and syntax are changing quite a bit between versions. Hence the syntax used is very sensitive to the version being used. The online documentation you grabbed that example from very well may not be for the version you are using.

    This will extract I frames for me (ffmpeg version 0.10.3)

    ffmpeg -i MyFile.foo -vf select="eq(pict_type,I)" -vsync 0 -an keyframes%03d.png

    Also, if you are trying to do this in windows it will suck due to it crappy handling of quotes and escaping.

  • Reuben Martin

    June 26, 2012 at 12:42 am in reply to: Mixing commentary mp3 into mp4 gameplay video?

    ffmpeg isn’t really designed for mixing audio tracks, at best it can trim audio levels and remap streams/channels.

    A better approach would be to split out the audio streams to separate files, and then use something like sox or ecasound to process and mix them as desired to a new file, and then use ffmpeg to encode/mux the video stream and new audio file together.

  • It’s not an error so much as a warning.

    Mov files can contains EDL data that some quicktime based editing apps tend to create. (And it is a rather stupid feature to put in a distribution format) It means that timestamps in the streams can hop around and that the EDL may dictate that parts of streams should be skipped. Obviously this can cause problems. Results may vary depending on the content of the video. It ffmpeg can play it with any weird sync issues, then you can probably just ignore the message.

  • Reuben Martin

    June 7, 2012 at 3:04 am in reply to: combining mpeg files

    cat test_0.mpeg test_12.mpeg | ffmpeg -i - -vcodec copy -acodec copy -f mpeg comp.mpeg

  • Reuben Martin

    June 3, 2012 at 3:39 am in reply to: Multithreading MJPEG

    This isn’t really the place for that type of question. This is just a general help forum.

    The API documentation is auto-generated by doxygen. You can look through it here: https://ffmpeg.org/doxygen/trunk/index.html

    The MJPEG encoder is only single threaded, but it should be fairly trivial to make it multi-threaded since it’s intra frame only. (Round-robin distribution of frames to encoding threads, plus a thread to write the encoded frames handed to it from the encoder threads in the correct order.)

    Michael Niedermayer is listed as the maintainer of the mjpeg codec, so you might start by asking him if he is interested in the contract. If he isn’t, then you could ask for a recommendation of another developer to work on it.

    Also, be aware that about a year ago there was a big disagreement between developers, and the project was forked. There are now 2 separate development projects: ffmpeg and libav. They passive-aggressively co-exists and pull in developments from each other’s code-bases, but over time their code will no doubt diverge to the point where that is no longer easy to do. I’m not sure which code base ffdshow pulls from. There is no MAINTAINERS file in the libav tree, so I’m not sure who is the MJPEG maintainer in that project.

    The development mailing lists are much better for this type of questions.
    ffmpeg: https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel/
    libav: https://lists.libav.org/mailman/listinfo/libav-devel/

  • Reuben Martin

    May 31, 2012 at 2:45 am in reply to: Optimize mp4 for streaming

    Use the MP4Box tool from GPAC.

    MP4Box -hint MyVideoFile.mp4

Page 9 of 16

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy