Forum Replies Created

Page 9 of 24
  • Michael Rampe

    May 10, 2011 at 11:26 pm in reply to: Lossless encoding 16bpp images to movie file

    Hmmmmm….

    Tricky;-)

    The only way I successfully got 16bit grey out of ffmpeg was using raw video as a still image sequence.

    ffmpeg -i newtest3.mp4 -pix_fmt gray16be -an -f image2 test%d.raw

    I then opened in Photoshop and could output as a lossless png which cut down the size a lot. Unfortunately, I couldn’t go straight to png from ffmpeg as it would not allow grey16be and auto scaled to rgb24. You might be able to automate this but it may end up more clunky than using two compressed 8bit streams.

    As far as using a video intermediate, I suspect the same to be true…. must be rawvideo as none of the codecs or containers are set to allow this pixel format.

    I will keep thinking…..

    Michael

  • Michael Rampe

    May 10, 2011 at 10:05 pm in reply to: Lossless encoding 16bpp images to movie file

    Hi Laurent,

    I have tried to replicate your issues and found a few things….

    Putting the -pix-fmt after the input does work but the codec you have selected is not compatible with this colour space:

    ffmpeg -i newtest3.mp4 -pix_fmt gray16be -an -vcodec ffv1 16grey.mov
    produces this error:
    “Incompatible pixel format ‘gray16be’ for codec ‘ffv1’, auto-selecting format ‘yuv420p'”

    I then tried rawvideo but then had problems with container compatibility. The more I looked into it, I couldn’t find any codec/container combinations that will support this pixel format which I guess makes sense as no displays support this format.

    I guess the real question is, what are you trying to achieve by using this pixel format? Is it for delivery to viewers or an intermediary step?

    [Laurent Nguyen] “It seems that I cannot use filters… What do I need to install to be able to use it ? Is it libavfilter ?”

    yes. Try the latest git version. Mine is:

    ffmpeg version git-N-29577-gc402ce4, Copyright (c) 2000-2011 the FFmpeg developers
    built on May 4 2011 09:56:05 with gcc 4.2.1 (Apple Inc. build 5664)
    configuration: –prefix=/opt/local –enable-gpl –enable-postproc –enable-swscale –enable-avfilter –enable-libmp3lame –enable-libfaac –enable-libx264 –enable-libfreetype –enable-nonfree –enable-shared –arch=x86_64
    libavutil 51. 2. 0 / 51. 2. 0
    libavcodec 53. 3. 0 / 53. 3. 0
    libavformat 53. 0. 3 / 53. 0. 3
    libavdevice 53. 0. 0 / 53. 0. 0
    libavfilter 2. 4. 0 / 2. 4. 0
    libswscale 0. 14. 0 / 0. 14. 0
    libpostproc 51. 2. 0 / 51. 2. 0

  • Michael Rampe

    May 10, 2011 at 4:45 am in reply to: Lossless encoding 16bpp images to movie file

    [Laurent Nguyen] “When put BEFORE and AFTER, the movie is encoded as yuv420p.
    I’m wondering why he’s doing this.”

    What version do you have installed? Can you post the command line output? Newer versions have added this as an option in the -vf filter chain which might yield the desired result.

    Michael

  • Michael Rampe

    May 5, 2011 at 6:04 am in reply to: FFMpeg in Applet

    [David Muhar] “I wanted to know what I have to do in order to prevent any legal issues in regard to FFMPEG.”

    Sorry David, I cannot offer any advice here as I am not a lawyer and would not want to offer anything misleading for both of our sakes. I suggest you read the LGPL carefully and ask the developers for any tips. If all else fails, I guess the best approach would be to consult a lawyer.

    Michael

  • Michael Rampe

    May 5, 2011 at 12:33 am in reply to: Duplicated keyframe

    [alejandro alves] “After changing the bitrate of a video with the two pass I get a duplitace keyframe…I get two 0 timestamps…

    Can you post a sample of the terminal output showing this?

    [alejandro alves] “ffmpeg -i $1 -an -pass 1 -passlogfile $2 -vcodec libx264 -vpre slow_firstpass -b 120000 -threads 0 $3 -v 0 2>&1

    You shouldn’t need the passlogfile when using x264 as it generates one itself. Maybe try to remove this…..

    Michael

  • Michael Rampe

    May 5, 2011 at 12:31 am in reply to: Lossless encoding 16bpp images to movie file

    [Laurent Nguyen] “Are there options to add so that it keeps my movie as grayscale 16bpp ?”

    Try to put “-pix_fmt gray16be” AFTER the -i input file rather than before.

    Michael

  • Michael Rampe

    May 5, 2011 at 12:27 am in reply to: ffmeg write text on a video

    [jefferson Goven] “Hello i installed ffmeg with the drawtext option, I do:

    ffmpeg -i file.mov -vf drawtext=”fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf:text=’Text to write’:fontsize=20:fontcolor=black:x=100:y=100″ final.mov”

    I recompiled and tried this and it works well. Last time I tried it had several issues. One feature I am looking for is “centre justified” text which seems not to be an option. Any ideas?

    [jefferson Goven] “it works but i would like to make the text appear at a specific time around 3 or 5 sec after the video start

    No ideas specifically using libavfilter….. I will have a look into it. A workaround would be to generate an overlay “movie” first with alpha with text that doesn’t start until this time. Of course, this would not be using the drawtext filter but the overlay filter…….. I will keep thinking.

    Michael

  • Michael Rampe

    April 27, 2011 at 4:43 am in reply to: 4CIF H263 video fails to decode

    [Ankuj Gupta] “[NULL @ 0x5115420]Format detected only with low score of 24, misdetection possible!”

    This shows that it cannot determine the format itself.

    Have you tried to force the format by putting -f h263 BEFORE the -i flag?

    Michael

  • Michael Rampe

    April 27, 2011 at 4:41 am in reply to: MPEG-2 Program Stream Muxing

    [jefferson Goven] “The two files anime.mp2 and bertrand.mp2 mux together in final.mpg but the sound quality is bad.”

    This is really just putting two streams into one file, not mixing the two files together into one stream. AFAIK, FFmpeg will not mix two audio files into one stream. Have a look at SoX for a good solution to mix two together.

    Michael

  • Michael Rampe

    April 27, 2011 at 4:03 am in reply to: Reading Source File Frame Rate

    [Manuel Frust] “Is there a line of code that would allow ffmpeg to read the original frame rate from the source file and then use that when converting to various formats?”

    FFmpeg does this by default if you do not specify a rate (-r). It is not always foolproof so doing a header read with $ ffmpeg -i inputfile will give you the framerate. You might also want to have a look into ffprobe which has similar functions.

    Michael

Page 9 of 24

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