FORUMS: list search recent posts

AVCHD->PhotoJPEG bit rate?

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Tim Burgess
AVCHD->PhotoJPEG bit rate?
on Aug 29, 2010 at 11:20:51 am

I'm doing a conversion from Panasonic AVCHD (.mts) to PhotoJPEG using the following:
ffmpeg -i arthur_bay_lookout.mts -pix_fmt yuv420p -vcodec mjpeg -b 96000k -f mov -y arthur_bay_lookout.mov

FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
built on Aug 29 2010 08:11:55 with gcc 4.2.1 (Apple Inc. build 5646) (dot 1)
configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --enable-nonfree --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 1.11. 0 / 1.11. 0
libpostproc 51. 2. 0 / 51. 2. 0

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 59.94 (60000/1001)
Input #0, mpegts, from 'arthur_bay_lookout.mts':
Duration: 00:00:47.07, start: 0.766967, bitrate: 23079 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
Output #0, mov, to 'arthur_bay_lookout.mov':
Metadata:
encoder : Lavf52.64.2
Stream #0.0: Video: mjpeg, yuvj420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 96000 kb/s, 60k tbn, 59.94 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[h264 @ 0x121815a00]missing picture in access unit85 bitrate=95981.6kbits/s
frame= 1408 fps= 14 q=3.1 Lsize= 552028kB time=47.02 bitrate=96179.1kbits/s
video:551630kB audio:368kB global headers:0kB muxing overhead 0.005328%

Using VLC, the original clip has virtually no noise. However in the new PhotoJPEG file, part of the image has noise. My end delivery is for stock purposes so I'd really like to eliminate the noise. The original AVCHD stream is 24kbit/s and I have upped the PhotoJPEG bit rate to '-b 96000k' as above. But I still get this noise. Is there a rule of thumb as to a PhotoJPEG bit rate from AVCHD or is there some other aspect I am missing?

Tim


Return to posts index

Michael Rampe
Re: AVCHD->PhotoJPEG bit rate?
on Aug 30, 2010 at 7:57:32 am

You are targeting q=2-31 as this is the default. Instead of setting bitrate, try to limit the q factor.

For example:
ffmpeg -i arthur_bay_lookout.mts -vcodec mjpeg -qmax 1 -qmin 1 arthur_bay_lookout.mov

This should increase file size as well as quality.

Michael

"half-way to world domination A.K.A. the belligerent blue bike shed"


Return to posts index

Tim Burgess
Re: AVCHD->PhotoJPEG bit rate?
on Aug 30, 2010 at 10:12:07 am

Thanks for the info Michael!

I suspected it was related to the qflags but was uncertain how to set them. I will know for sure when I view the transcoded MJPEG files in detail on my HD monitor but it seems to have reduced the noise somewhat. I guess that any codec change will inherently up noise and so maybe I need to think about running some noise removal after my color grade in my delivered clips...

Cheers, Tim


Return to posts index


Michael Rampe
Re: AVCHD->PhotoJPEG bit rate?
on Sep 1, 2010 at 8:31:54 am

Let me know if it helps.

Just out of interest, why photojpeg and not something more efficient like H.264?

Also, my experience with grading AVCHD footage (which is just another use of H.264) is that it doesn't hold up very well to anything beyond subtle grading. Noise removal would help if it is just noise but the macroblock artifacts produced by AVCHD can be very difficult to remove (maybe a deblocking filter before the grade).

Michael

"half-way to world domination A.K.A. the belligerent blue bike shed"


Return to posts index

Tim Burgess
Re: AVCHD->PhotoJPEG bit rate?
on Sep 1, 2010 at 10:13:52 pm

My camera codec is AVCHD (so H.264) at 24Mbit and it does produce very nice images. However as I submit footage for stock purposes, my end customer requires MotionJPEG (or what Apple calls PhotoJPEG). This seems to be pretty standard throughout the stock industry.

To date, I have been doing an ingest into ProRes422, then doing a mild color grade in Color and then I go via Compressor to get output. But looking at some of my clips, I'm beginning to suspect I could get better quality (i.e. eliminate some slight noise) by using ffmpeg to go to MJPEG, then color correcting (and maybe some noise reduction) in After Effects and then exporting to MJPEG. I'm aware I may be simply coming up against AVCHD limits but am keen to see if that is the case.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]