VideoHelp Forum
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. Is there a way to encode video using the Cinepak codec on Linux? FFMPEG can only decode.
    Quote Quote  
  2. You could use VirtualDub and ffdshow under Wine. I assume you're aware that Cinepak is very old and outdated.
    Quote Quote  
  3. Originally Posted by jagabo View Post
    You could use VirtualDub and ffdshow under Wine.
    Where possible I'd like to use only native Linux apps. Are there any for Linux?

    Originally Posted by jagabo View Post
    I assume you're aware that Cinepak is very old and outdated.
    Yeah. I need it for a very specific purpose
    Quote Quote  
  4. Originally Posted by hellocatfood View Post
    Are there any for Linux?
    Not that I know of. But I don't have much experience with Linux. I think the problem is that Cinepak is so old (and proprietary) that nobody has bothered porting it to Linux.
    Quote Quote  
  5. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Mencoder can use the VfW dlls
    (I know this works on Windows,
    not sure if it works on Linux as well) :

    http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-video-for-windows.html
    Quote Quote  
  6. oops, nevermind.
    Quote Quote  
  7. Originally Posted by El Heggunte View Post
    Mencoder can use the VfW dlls
    (I know this works on Windows,
    not sure if it works on Linux as well) :

    http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-video-for-windows.html
    Thanks! Looks like I'm some way there. I've got the iccvid.dll file on my computer (probably from medibuntu).

    It looks like I've only got one more hurdle to jump over.

    From running this code
    Code:
    mencoder infile.avi -vf format=bgr15 -ovc vfw -xvfwopts codec=iccvid.dll -oac mp3lame -o outfile.avi
    I get this error:
    Code:
    Could not find matching colorspace - retrying with -vf scale...
    Opening video filter: [scale]
    The selected video_out device is incompatible with this codec.
    Try appending the scale filter to your filter list,
    e.g. -vf spp,scale instead of -vf spp.
    Could not find matching colorspace - retrying with -vf scale...
    Opening video filter: [scale]
    The selected video_out device is incompatible with this codec.
    Try appending the scale filter to your filter list,
    e.g. -vf spp,scale instead of -vf spp.
    If I swap around the order of the code I get a segmentation fault. Can you tell me where I'm going wrong?
    Quote Quote  
  8. Cinepak requires RGB24 or RGB32 as input. I think the argument you want is "-pix_fmt rgb24".
    Quote Quote  
  9. Just to clarify my issue I'll provide a sample video and my process. I'll be working with this short clip http://ubuntuone.com/p/iJr/

    I converted this to an avi in the rgb24 colourspace
    Code:
    ffmpeg -i vid.mov -vcodec png -pix_fmt bgr24 outfile.avi
    I then tried to convert this to an avi that uses the cinepak codec
    Code:
    mencoder outfile.avi -vf format=bgr24 -ovc vfw -xvfwopts codec=iccvid.dll -oac mp3lame -o outfile_2.avi
    This is where I got my segmentation fault:
    Code:
    MP3 audio selected.
    Could not find matching colorspace - retrying with -vf scale...
    Opening video filter: [scale]
    Opening video filter: [flip]
    Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
    [swscaler @ 0xb6315fc0]using unscaled rgb24 -> bgr24 special converter
    Opening video filter: [expand]
    Expand: -1 x -1, -1 ; -1, osd: 0, aspect: 0.000000, round: 1
    Starting compression:
     Input format:
      biSize 40
      biWidth 1280
      biHeight 720
      biPlanes 1
      biBitCount 24
      biCompression 0x0 ('')
      biSizeImage 2764800
     Output format:
      biSize 40
      biWidth 1280
      biHeight 720
      biPlanes 1
      biBitCount 24
      biCompression 0x64697663 ('cvid')
      biSizeImage 254100
     Output format after query/begin:
      biSize 40
      biWidth 1280
      biHeight 720
      biPlanes 1
      biBitCount 24
      biCompression 0x64697663 ('cvid')
      biSizeImage 254100
    Segmentation fault
    Just to be sure I tried this code with both bgr24 and rgb24 arguments. Same results

    I'm surprised that it still tries to convert to bgr24 when I've specifically told ffmpeg to use bgr24 in the first place.

    As for the segfault, is this a problem with the software or the video that I'm using?
    Quote Quote  
  10. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Hummm...

    --- the file "vid.mov" is not a .MOV, but a .AVI, to begin with

    --- on my XP machine, only ffplay and Mplayer can display something besides 100%-black frames, and that something includes huge artifacts

    Are you using outdated versions of both ffmpeg and Mencoder?
    Quote Quote  
  11. After I updated to the latest Ubuntu (11.04) I updated ffmpeg and mplayer/mencoder to the svn versions and still got segmentation faults. It appears the problem comes from the version of iccvid.dll that comes from the w32codecs package from medibuntu. As described in this bug report the version that is supplied is corrupted in some way, hence the segfaults. After I found an old version from a Windows 98 cd encoding worked for me
    Quote Quote  
  12. Has anyone tried to encode using Cinepak lately in Linux? I'll probably start a new thread to ask the question again, but for encoding using any OS, not just Linux
    Quote Quote  
  13. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    if you search "linux cinepak encoder" you'll lilkely get the same thing I do. A few forum posts from 2011 mentioning a lot of segfaults, damn little else. It's a proprietary codec and these can be a problem in Linux due to licensing issues. Probably best to try a Windows app under Wine.
    Quote Quote  
  14. Originally Posted by cke View Post
    Has anyone tried to encode using Cinepak lately in Linux? I'll probably start a new thread to ask the question again, but for encoding using any OS, not just Linux


    Did you try it recently ? ffmpeg can encode cinepak

    Code:
     DEV.L. cinepak              Cinepak
    It's a valid file, plays with VLC, ffplay etc...
    Quote Quote  
  15. Originally Posted by cke View Post
    Has anyone tried to encode using Cinepak lately in Linux? I'll probably start a new thread to ask the question again, but for encoding using any OS, not just Linux
    I wrote up the results of my experiments on Cinepak encoding from many years ago http://www.hellocatfood.com/adventures-in-vector-quantization/

    Hopefully this is helpful.
    Quote Quote  
  16. Oh wow, how did I miss both of your replies??? there's simply no excuse on my end!

    But, your unintended Vector Quantization experimentation with Cinepak was really insightful hellocatfood, thanks so much for charing this with me and the rest of the forum! Retro will always be cool!

    I'll also see about trying out ffmpeg, poisondeathray I shouldn't shy away from more complex tools if my goal is to encode in my preferred legacy video format but hopefully it won't take five more years to give an update on my experimentation results!
    Quote Quote  
  17. wow, what a blast from the past! Encoding videos with the cinepak codec is now easily possible with ffmpeg (or maybe it was all along but I was still new to the command line and ffmpeg back in 2011).

    ffmpeg -i input.mp4 -c:v cinepak -q:v 1 output.mov

    Encoding options are described here https://ffmpeg.org/ffmpeg-codecs.html#Cinepak

    For my purposes of wanting a glitchy/distorted video I just set the -q:v option to a very high number like 9001. Doesn't produce the same results as what I showed in my blog but it's close.

    Also worth checking out the following for more information on cinepak and vqa encoding

    https://www.andrews-corner.org/cinepak.html
    https://segaxtreme.net/threads/how-to-guide-encoding-cinepak-videos-properly.24487/
    https://forum.videohelp.com/threads/388428-Cinepak-video-encoding
    https://github.com/kannoneer/ClusterVQA

    Good luck!
    Quote Quote  
  18. Sweet, Hellocatfood! I'm so gonna dive into this!! so if understanding the command line just a bit more now (at least, I hope so? lol) how it all works is this:

    install ffmpeg > copy source video in any codec/container into ffmpeg directory > use Windows command prompt to set and run the encoding options as per the cool link you shared > end-up with a Cinepak-encoded video in the same directory

    So am I even close here? (or should I give up now? lol) I think I tanked ages ago bc I tried this very thing (or pretty close to it) but I possibly missed something back then (or maybe ffmpeg just didn't have it in it to do the encode back then?) help me fill in my blanks and I'll (finally!) be golden!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!