allen2 Posted June 23, 2013 Share Posted June 23, 2013 (edited) Of course your video isn't really one : it is a picture sequence hence the codec is JPEG.The proper way to work on it would be to convert it first uncompressed avi or using a lossless compression codec (like huffyuv or FFV1) then you should be able to play it anywhere with wmp as long as the size isn't too big (that won't work because the hard drive won't read the data fast enough) and you have the right codec (huffyuv or FFV1 if you choose one of them). The file will be biger of course (i got 32MB uncompressed and 19MB with huffyuv).You might also try tweaking the ffmpeg parameters as you said you lost quality when converted to h264. Some command line examples are available there. Edited June 23, 2013 by allen2 Link to comment Share on other sites More sharing options...
DiracDeBroglie Posted June 24, 2013 Author Share Posted June 24, 2013 This is not running smooth here. Spent a lot of time googling around, but no solution found yet.I've converted the MOV file to uncompressed video into an AVI container and just plain-copied the PCM audio.With MediaInfo I got the following info for the uncompressed video:Video ID : 0 Format : YUV Codec ID : Y42B Codec ID/Info : YUV 4:2:2 Planar Duration : 3s 267msBit rate : 18.4 MbpsWidth : 320 pixelsHeight : 240 pixelsDisplay aspect ratio : 4:3Frame rate : 15.000 fpsColor space : YUVHowever, in WMP12 the AVI file does NOT at all play the video, only the audio is played. So again a problem with the video. The commands I used in ffmpeg were:ffmpeg -i E:\PB250024.mov -c:v rawvideo -c:a copy E:\PB250024ffmpegvrawvideoacopy.aviffmpeg -i E:\PB250024.mov -c:v huffyuv -c:a copy E:\PB250024ffmpegvhuffyuvacopy.aviSo, any idea why the rawvideo decompression does not work in WMP12?I was just wondering, are there any options to -c:v rawvideo , like -c:v rawvideo/UYVY (UYVY is from MicroSoft), or any other options that create a YUV which is really an international standard that can be interpreted/played by all Media Players?BTW, also the huffyuv did not work for the video in WMP12, but most like the codec is missing for huffyuv, I'm not sure though.Still working on finding out how to get high quality video (low compression) when converting to H264.Thanks in advance, j Link to comment Share on other sites More sharing options...
allen2 Posted June 25, 2013 Share Posted June 25, 2013 Once converted to huyuv, you'll need either the codec huffyuv to play the video in wmp12 or ffdshow filter (just like ffmpeg it can handle almost any format).For uncompressed, i used virtualdub then loaded the huffyuv video and saved it uncompressed. Ffmpeg can do a lot of uncompressed formats that might be used if you don't need them to play in wmp but if you need them as a step before working on the video and encoding at the final format (using avisynth for example) then they are really usefull. Of course avisynth is a lot more complex and could process the video without intermediate steps with the right settings and directshow filters. Link to comment Share on other sites More sharing options...
cdob Posted June 25, 2013 Share Posted June 25, 2013 Here is the video file:With MP4Cam2AVI repacked the MOV to a AVI, no conversion. Equal Video data: MJPEG data stillGraphEdit renders the avi media file.A default Windows 7 x64 WMP12 plays the AVI file.CLSID: {301056D0-6DFF-11D2-9EEB-006008039E37}FriendlyName: [MJPEG Decompressor]C:\Windows\SysWOW64\quartz.dll Link to comment Share on other sites More sharing options...
DiracDeBroglie Posted June 25, 2013 Author Share Posted June 25, 2013 Here is the video file:With MP4Cam2AVI repacked the MOV to a AVI, no conversion. Equal Video data: MJPEG data stillGraphEdit renders the avi media file.A default Windows 7 x64 WMP12 plays the AVI file.CLSID: {301056D0-6DFF-11D2-9EEB-006008039E37}FriendlyName: [MJPEG Decompressor]C:\Windows\SysWOW64\quartz.dllI've already done a conversion from MOV to AVI while preserving the video (JPEG) and audio (PCM), but the resulting AVI file does not show video in WMP12 while audio is not a problem. The main problem is that WMP12 probably cannot play JPEG movies, only MJPEG (MJPG codec) movies are OK for WMP12.j Link to comment Share on other sites More sharing options...
DiracDeBroglie Posted June 25, 2013 Author Share Posted June 25, 2013 (edited) Once converted to huyuv, you'll need either the codec huffyuv to play the video in wmp12 or ffdshow filter (just like ffmpeg it can handle almost any format).For uncompressed, i used virtualdub then loaded the huffyuv video and saved it uncompressed. Ffmpeg can do a lot of uncompressed formats that might be used if you don't need them to play in wmp but if you need them as a step before working on the video and encoding at the final format (using avisynth for example) then they are really usefull. Of course avisynth is a lot more complex and could process the video without intermediate steps with the right settings and directshow filters.With "uncompressed formats", I assume you mean some YUV or a derivative like UYVY or IYUV format? Or are there any other/more 'uncompressed' formats out there?I was under the impression that after decompression, one was left with some kind of a 2-D Bit Map for each video frame, where every pixel is represented by a 24 or 32 bit word covering luminance (luma) and color, I think it is called RAW. But that doesn't seem to be the case, does it?j Edited June 25, 2013 by DiracDeBroglie Link to comment Share on other sites More sharing options...
DiracDeBroglie Posted June 25, 2013 Author Share Posted June 25, 2013 As for my JPEG/MOV videofiles, I will now focus on the conversion to H264/MP4. I have great difficulties in finding out in ffmpeg how to H264 compress a video using LOW compression (so high quality video with lots of detail; the drawback would be large video files but that I can live with). If anyone knows the switches or options to be added to .... -c:v libx264 ... in the ffmpeg command, then please drop it here.j Link to comment Share on other sites More sharing options...
DiracDeBroglie Posted June 25, 2013 Author Share Posted June 25, 2013 Oh yes, I almost forgot. Isn't there any way to stitch a series of JPEG frames together into a MJPEG (MJPG) video string, without having to decompress and re-compress the video?j Link to comment Share on other sites More sharing options...
allen2 Posted June 26, 2013 Share Posted June 26, 2013 Oh yes, I almost forgot. Isn't there any way to stitch a series of JPEG frames together into a MJPEG (MJPG) video string, without having to decompress and re-compress the video?jI looked for that solution and didn't found away that wouldn't loose quality in the process.With "uncompressed formats", I assume you mean some YUV or a derivative like UYVY or IYUV format? Or are there any other/more 'uncompressed' formats out there?I was under the impression that after decompression, one was left with some kind of a 2-D Bit Map for each video frame, where every pixel is represented by a 24 or 32 bit word covering luminance (luma) and color, I think it is called RAW. But that doesn't seem to be the case, does it?jI meant uncompressed native windows format so it is RGB (some kind of BMP) and so it is not an yuv or any of there derivative (i tried all available uncompressed format in ffmpeg but all require a codec).As for my JPEG/MOV videofiles, I will now focus on the conversion to H264/MP4. I have great difficulties in finding out in ffmpeg how to H264 compress a video using LOW compression (so high quality video with lots of detail; the drawback would be large video files but that I can live with). If anyone knows the switches or options to be added to .... -c:v libx264 ... in the ffmpeg command, then please drop it here.j"Loseless h264" might be the solution you need but will increase the size of output video but isn't most likely really loseless. If you take the an uncompressed video and encode it loseless h264 then convert it again to uncompressed format the video won't have the same size and if extract a frame as bmp from both a binary comparison will show a lot of differences.But as you wanted to use a future proof codec, using x264 codec with its best quality will be the best option. Link to comment Share on other sites More sharing options...
DiracDeBroglie Posted June 26, 2013 Author Share Posted June 26, 2013 I'm getting there bit by bit. Still a few questions. About the fileformat (filename extension), I assume MP4 is the (or one of the) most 'future proof' video file format(s); correct me if you think I'm wrong.While converting to MP4, I noticed that FFmpeg did not plain-copy the original PCM(u8) audio to the output file; in fact FFmpeg just quited the conversion, leaving a MP4 file with not even any video in the MP4 file. So I left the decision about the audio conversion to FFmpeg, which it made AAC, profile LC.For mono audio (and also stereo audio), what is in your opinion the most 'future proof' AND compatible (among Players) audio format (codec) under the MP4 file format (or any other more future proof video file format)? Is that really MP3 (as mentioned in post 5), or is there another more future proof and compatible audio format? What about settings and options when converting audio? Are there any audio compatibility issues among Players (like with QuickTime when the video format profile is higher than 'main' in H264, see the "lossless H264" link in previous post)?Thanks in advance,j Link to comment Share on other sites More sharing options...
allen2 Posted June 27, 2013 Share Posted June 27, 2013 Mp4 or Mkv are most likely the best future proof containers : while mp4 is more widely used on most portable device, i would prefer mkv as it offer more features and is more open.As for audio,i'd stay with mp3 for future proof compatibility but flac is the most widely used loseless audio codec. Link to comment Share on other sites More sharing options...
DiracDeBroglie Posted June 28, 2013 Author Share Posted June 28, 2013 I'm running FFmpeg on Windows 7, and tried to use libfdk_aac for high quality audio encoding, but it turned out libfdk_aac is not enabled. So how can one enable libfdk_aac under windows? I've found some instructions for doing that under Linux/Unix (--enable-libfdk_aac), but I could not find anything for Windows.Thanks in advance,j Link to comment Share on other sites More sharing options...
DiracDeBroglie Posted June 28, 2013 Author Share Posted June 28, 2013 In FFmpeg I would like to know what all the available profiles are for h264, using the FFmpeg help in the command line. I triedffmpeg -h -codecswhich just list me a collection of codec, but the cmdffmpeg -h -codecs -h264 -profiles, or any similar syntax without the dashes '-' or with -fullhelp, does not give me a list of available profiles for that video encoder.Any suggestions how to get deeper in the ffmpeg help funtion?Thanks,j Link to comment Share on other sites More sharing options...
allen2 Posted June 29, 2013 Share Posted June 29, 2013 As said there, you can't redistribute ffmpeg with aac support due to license restriction (while i don't really understand why), you have to compile it yourself as explained there with mingw32 or linux (so cross-compile in this case).The profiles and other x264 options are described there. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now