Hi,
please help my cat : as source attached (sourceCat.avi) I would like transcode his video it in .mp4
please help me!!!
I have use this commandline with ffmpeg:
The problem is this: with VLC out.mp4 is playable, but with TMPGenc file is openable but is all blankCode:ffmpeg.exe -y -i v:\sourcecat.avi -c:v libx264 -pix_fmt yuv422p -profile:v high422 -level:v 3 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -x264opts tff=1:ref=1 -c:a libvo_aacenc -b:a 256k -aspect 16:9 out.mp4
I have a multimedia box adapter "DVICO TVX multimedia adapter" that with it I usually open the .mp4 files generated with TMPGenc. But strangely it don't playback files generated with ffmpeg. Why?
This is the mediainfo of the ffmpeg one:
General
Complete name : v:\out.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 5.46 MiB
Duration : 7s 920ms
Overall bit rate : 5 780 Kbps
Writing application : Lavf55.21.102
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:2:2@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 7s 920ms
Bit rate : 5 778 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : MBAFF
Bits/(Pixel*Frame) : 0.557
Stream size : 5.45 MiB (100%)
Writing library : x264 core 140 r2377 1ca7bb9
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=tff / bluray_compat=0 / constrained_intra=0 / bframes=1 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=0 / keyint=33 / keyint_min=3 / scenecut=40 / intra_refresh=0 / rc_lookahead=33 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
And this is the mediainfo of the .mp4 playable in the TVX box that are generated with tmpenc:
General
Complete name : v:\outtmpgenc.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 2.27 MiB
Duration : 7s 957ms
Overall bit rate : 2 394 Kbps
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Format settings, GOP : M=1, N=33
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 7s 957ms
Source duration : 7s 920ms
Bit rate mode : Variable
Bit rate : 2 287 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.221
Stream size : 2.17 MiB (96%)
Source stream size : 2.27 MiB (100%)
Writing library : MainConcept H.264/AVC Codec 2.1.0
Language : ehs
mdhd_Duration : 7920
How can I resolve? maybe is the different scan type (interlaced for the tmpgenc one, and MBAFF for ffmpeg)? thanks
Files generated with tmpgenc are playable, and files generated with ffmpeg no
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 60
Thread
-
-
mmm I think you have reason, now I have try using the 4:1:1 encoding but seems to me that is a problem of incorrect fielding -
use 4:2:0, your hardware player will probably not support anything else
-
yes, it is: only now I have understand
kindness I have a question: in attachment my mew source
considering this source.avi
I have use:
Code:ffmpeg.exe -y -i v:\source.avi -c:v libx264 -pix_fmt yuv420p -profile:v main -level:v 3 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -x264opts tff=1:ref=1 -c:a libvo_aacenc -b:a 192k -aspect 16:9 out.mp4
but playback in my hardware box is wrong, seems an "half progressive". I have try also invert fields into the source but playback is not good
Using same source.avi I have try encode in mp4 by tmpgenc, and the output of tmpgenc is ok! so I have attach TMPGENC.mp4
What is the differences? thanks -
-
seems not interlaced, is not smooth. I don't know if matters, but in the mediainfo the tmpgenc one's is
Scan type : Interlaced
meanwhile the ffmpeg one's is MBAFF
Is there a way to have a pure interlaced .mp4 file with ffmpeg?Last edited by marcorocchini; 29th Jun 2014 at 20:01.
-
I already explained in the other thread; MBAFF is a type of interlaced encoding. Look at the file in a non deinterlacing software media player and you will see combing from distinct fields. Maybe that your device doesn't support it automatically, or you have to manually activate deinterlacer. Eitherway - x264 doesn't support PAFF, only MBAFF . Most devices don't have problems with MBAFF (e.g. it's even supported on blu-ray) . But field wise, the file is fine. You check it in VLC and activate the deinterlacer
This is another topic but tmpgenc file hasn't converted the file correctly (non interlaced aware chroma scaling). Look at the chroma problem "ghosting" in individual field (look at the billboard sign, discolored arm)
TMPGEnc
ffmpeg with interl scaling, levels force
If you don't use the interl=1 , there will be chroma ghosting in the fields as well
mjpeg is not a great intermediate for ffmpeg, because it's decoded at full range. Some programs clamp to std range , other go full. It 's a big headache . So when you go full range yuvj422p to yuv420p, you will get a PC=>TV levels conversion and low contrast. That was discussed in one of your other threads. You need to pay specially attention to -vf scale with the range flags when using mjpeg, and interlaced scaling with interl=1 . But becareful how you export mjpeg, because if it contains actual full range values, bright swill be blown, darks will be clipped . For example , there are significats of highlights > Y=235 . You avoid all this by using mjpeg
Code:-vf scale=w=720:h=576:interl=1:in_range=tv:out_range=tv
The tmpgenc file doesn't use b-frames either (-bf 0 in ffmpeg) -
mmm thanks poison, in this moment I have found that if I add -vf yadif=1,interlace at the original commanline, playback is ok (but seems have a little less detail)
so the commandline should be:
ffmpeg.exe -y -i v:\source.avi -vf yadif=1,interlace -c:v libx264 -pix_fmt yuv420p -profile:v main -level:v 3 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -x264opts tff=1:ref=1 -c:a libvo_aacenc -b:a 192k -aspect 16:9 out.mp4
but now I have the problem of levels, please I remember you suggest do a pipe in rawvideo, I have try many times but I can not find the solution, how can I change the commandline to resolve? thanks -
in the meantime I think I have the solution:
v:\automazioneclip\core\ffmpeg.exe -y -i "%CD%\%~n1.avi" -pix_fmt yuv420p -f rawvideo -vcodec rawvideo - | v:\automazioneclip\core\ffmpeg.exe -y -f rawvideo -s 720x576 -r 25 -i - -i "%Audio%" -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 1 -crf 18 -flags +ilme+ildct -top 1 -c:a libvo_aacenc -b 256k -aspect 16:9 %WorkFolder%\%~n1perTgrBologna.mp4
for files YUY2 .avi source
and:
v:\automazioneclip\core\ffmpeg.exe -y -i "%CD%\%~n1.avi" -pix_fmt yuvj420p -f rawvideo -vcodec rawvideo - | v:\automazioneclip\core\ffmpeg.exe -y -f rawvideo -s 720x576 -r 25 -i - -i "%Audio%" -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 1 -crf 18 -flags +ilme+ildct -top 1 -c:a libvo_aacenc -b 256k -aspect 16:9 %WorkFolder%\%~n1perTgrBologna.mp4
for MJPG .avi files -
poison, sorry, an answer:
the
-vf scale=w=720:h=576:interl=1:in_range=tvut_range=tv
have to be used only when I convert from yuv422p --> yuv420p or in all cases? -
and what does mean: -x264opts tff=1:ref=1
is there difference if I use -x264opts tff=1 or -x264opts tff=1:ref=1
The -x264opts tff=1:ref=1 I have to use alwais or only when source is mjpeg?
thank you^^ -
please poison I have use:
Code:ffmpeg.exe -y -i c0075.mxf -vf crop=720:576:0:32,scale=interl=1:in_range=tv:out_range=tv -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 1 -crf 18 -flags +ilme+ildct -aspect 16:9 -an out.mp4
in this moment I'm upload on my dropbox the C0075.mxf however I think there is chroma ghost, but I think have use the -interl have you idea to resolve? thanks -
All interlaced cases, whenever you caled the clip; or convert interlaced 422=> interlaced 420 even without scaling the clip dimensions, you are infact scaling the chroma. Both Cb , Cr planes are scaled. So even if you want to keep same frame dimension but still go from 422=>420, interl=1 must be used. If you want same input = output dimensions, you can use w=-1,h=-1 . The "-1" means keep same as source
tff=1 means top field first (field order) , when used with x264opts, it specifically signals to libx264 to encode interlaced, top field first . It is related to source characteristics, not necessarily mjpeg. For example , original mxf was TFF as well, if you encode mxf directly and want to encode interlaced, you would use that when encoding with libx264 as well
ref=1 means 1 reference frame. This is a libx264 encoding option, unrelated to mjpeg. Recall you attempted to match the file specs tmpgenc ? It's uncessary IMO, even 4 reference frames ad HD are supported by almost all media players -
-
mm it emply 2 hours to upload in my dropbox (here don't allow to attach a .mxf) however I try to add the -x264opts tff=1 but seems to me that chroma ghost remains
-
mmm is almost the same, however 1 hour left
i guilty of my cat, that have choosed a clip of 670 MB
exaxt point of the ghost is at 01:07:12 -
Is there only 1 "ghost ?" or does it occur anytime there is movement ?
Can't you cut a smaller clip around that section ?
You can use ffmpeg with -c:v copy and -ss for start time , and -t for duration
670MB isn't very "friendly" size to download -
but now I can upload the segment exported in morgan avi, it should be "clean" of ghost and is almost the same of the mxf. In the meantime it upload on the dropbox
-
Code:
ffmpeg.exe -y -i v:\c0075morgan.avi -vf scale=interl=1:in_range=tv:out_range=tv -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 1 -crf 18 -flags +ilme+ildct -x264opts tff=1:ref=1 -aspect 16:9 -an z:\out.mp4
-
No ghost here on the morgan sample
Code:ffmpeg -i C0075Morgan.avi -vf scale=w=-1:h=-1:interl=1:in_range=tv:out_range=tv -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 1 -crf 18 -flags +ilme+ildct -x264opts tff=1:ref=1:colorprim=bt470bg:transfer=bt470bg:colormatrix=bt470bg:vbv-maxrate=10000:vbv-bufsize=10000 -an -aspect 16:9 C0075Morgan.avi.mp4
Note - I left this flagged as bt470bg, assuming this was SD source, and the color workflow prior was done correctly (this doesn't affect chroma ghost, just for completeness)Last edited by poisondeathray; 5th Jul 2014 at 12:12.
-
did get it figured out?
did you go back and use old ffmpeg build again
look at the log file to see if any errors, or if commands got passed through correctly
You can see the effect interl=0 vs. interl=1, same commandline as previous post except for interl=0 vs. 1
These are separate fields:
interl=1
interl=0
-
mmm this time I have used ffmpeg 3 july 2014 (the latest from zeranoe) however I see the ghosts in image
I have use:
Code:ffmpeg -i v:\C0075Morgan.avi -vf scale=w=-1:h=-1:interl=1:in_range=tv:out_range=tv -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 1 -crf 18 -flags +ilme+ildct -x264opts tff=1:ref=1:colorprim=bt470bg:transfer=bt470bg:colormatrix=bt470bg:vbv-maxrate=10000:vbv-bufsize=10000 -an -aspect 16:9 z:\C0075Morgan3.mp4
-
"C0075Morgan3.mp4" is fine
It's a playback problem (likely your software is upsampling to RGB using progressive algorithm)
How are you viewing it ? What software, how is it configured -
I have download your C0075Morgan.avi.mp4 : is ghost-free it? because seems to me to see jet ghost
-
Both are "chroma ghost" free. Again, it's a playback problem. You can prove this by viewing individual fields, or viewing it properly
However, the earlier tmpg file has real ghosts (they are encoded into the fields) , "C0075Morgan.avi_interl=0.mp4" has real ghosts as well -
I open the mp4 with virtualdub with the ffmpeg plugin
and save it as uncompressed avi (yuy2)
and then I place in timeline the uncompressed avi in S****R**** 5.51 connected to a Matrox Digisuite system and seen image on a crt monitor ....
but the strange is this: the commandline that generate a 422 mp4 does not do the problem. Ghost are visibile only in 411 mp4 files -
The reason is 4:2:0 vs 4:2:2 handling of interlaced material . Your *NLE* upsamples 4:2:0 YV12 like vdub. Interlaced 4:2:0 material doesn't exist according to some definitions. So it upsamples interlaced 4:2:0 using progressive algorithm