tag:blogger.com,1999:blog-2124831850793435411.post4946407872000443414..comments2024-02-14T12:45:14.859+00:00Comments on Linux Tipps, Fixes & More: Fast PAL HD Video encoding in Sync with ffmpeg-svn from AVHCD to Mpeg4 under LinuxUnknownnoreply@blogger.comBlogger30125tag:blogger.com,1999:blog-2124831850793435411.post-896914917772525032009-04-17T18:32:00.000+01:002009-04-17T18:32:00.000+01:00Thise one?
http://ubuntuforums.org/showthread.php?...Thise one?<br />http://ubuntuforums.org/showthread.php?t=1045153Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-86745771173524824692009-03-28T19:11:00.000+00:002009-03-28T19:11:00.000+00:00You're welcome! Oh, where on the forum is it poste...You're welcome! Oh, where on the forum is it posted? I wasn't aware of that.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-79253739292807776552009-03-28T16:27:00.000+00:002009-03-28T16:27:00.000+00:00Thanks for the script posted on the ubuntu forum; ...Thanks for the script posted on the ubuntu forum; it just works !Anonymoushttps://www.blogger.com/profile/07603885950745111456noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-39856115108320814502009-01-20T10:50:00.000+00:002009-01-20T10:50:00.000+00:00I didn't download codecs, so I guess you don&#...I didn't download codecs, so I guess you don't need'em!? Here is the output of a short clip, I removed some info in the middle, it looked just the same, so only the essential output is here.<BR/><BR/>MEncoder dev-SVN-r28342-4.3.2 (C) 2000-2009 MPlayer Team<BR/>CPU: AMD Turion(tm) X2 Dual-Core Mobile RM-70 (Family: 17, Model: 3, Stepping: 1)<BR/>CPUflags: Type: 17 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1<BR/>Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2<BR/><BR/>success: format: 0 data: 0x0 - 0x42c000<BR/>TS file format detected.<BR/>VIDEO H264(pid=4113) AUDIO A52(pid=4352) NO SUBS (yet)! PROGRAM N. 1<BR/>FPS seems to be: 25.000000<BR/>[V] filefmt:29 fourcc:0x10000005 size:0x0 fps:25.000 ftime:=0.0400<BR/>Input fps will be interpreted as 50.000 instead.<BR/>==========================================================================<BR/>Opening audio decoder: [liba52] AC3 decoding with liba52<BR/>Using SSE optimized IMDCT transform<BR/>Using MMX optimized resampler<BR/>AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)<BR/>Selected audio codec: [a52] afm: liba52 (AC3-liba52)<BR/>==========================================================================<BR/>Opening video filter: [expand osd=1]<BR/>Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1<BR/>Opening video filter: [scale w=1280 h=720]<BR/>==========================================================================<BR/>Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family<BR/>Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)<BR/>==========================================================================<BR/>audiocodec: framecopy (format=2000 chans=2 rate=48000 bits=16 B/s=48000 sample-1)<BR/>VDec: vo config request - 1920 x 1080 (preferred colorspace: Planar YV12)<BR/>VDec: using Planar YV12 as output csp (no 0)<BR/>Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.<BR/>SwScaler: reducing / aligning filtersize 7 -> 8<BR/>SwScaler: reducing / aligning filtersize 7 -> 8<BR/>SwScaler: reducing / aligning filtersize 7 -> 6<BR/>SwScaler: reducing / aligning filtersize 7 -> 6<BR/>[swscaler @ 0x2be9af0]BICUBIC scaler, from yuv420p to yuv420p using MMX2<BR/>[swscaler @ 0x2be9af0]using 8-tap MMX scaler for horizontal luminance scaling<BR/>[swscaler @ 0x2be9af0]using 8-tap MMX scaler for horizontal chrominance scaling<BR/>[swscaler @ 0x2be9af0]using n-tap MMX scaler for vertical scaling (YV12 like)<BR/>[swscaler @ 0x2be9af0]1920x1080 -> 1280x720<BR/>videocodec: libavcodec (1280x720 fourcc=34504d46 [FMP4])<BR/>Writing header...<BR/>ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.<BR/>Writing header...<BR/>ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.<BR/>[h264 @ 0x2857da0]B picture before any references, skipping0.000 [0:0]<BR/>[h264 @ 0x2857da0]decode_slice_header error<BR/>[h264 @ 0x2857da0]no frame!<BR/>Error while decoding frame!<BR/>[h264 @ 0x2857da0]B picture before any references, skipping0.002 [0:0]<BR/>[h264 @ 0x2857da0]decode_slice_header error<BR/>[h264 @ 0x2857da0]no frame!<BR/>Error while decoding frame!<BR/><BR/>1 duplicate frame(s)!<BR/>Pos: 0.0s 3f (48%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]<BR/>1 duplicate frame(s)!<BR/>Pos: 0.1s 4f (48%) 0.00fps Trem: 0min 0mb A-V:-0.001 [0:0]<BR/>1 duplicate frame(s)!<BR/>Pos: 2.3s 59f (100%) 13.48fps Trem: 0min 1mb A-V:-0.030 [4197:384]<BR/>Flushing video frames.<BR/>Writing index...<BR/>Writing header...<BR/>ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.<BR/><BR/>Video stream: 4197.628 kbit/s (524703 B/s) size: 1185830 bytes 2.260 secs 59 frames<BR/><BR/>Audio stream: 384.000 kbit/s (48000 B/s) size: 115200 bytes 2.400 secsUrkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-7007399775439191952009-01-20T08:18:00.000+00:002009-01-20T08:18:00.000+00:00Good to hear! I've posted a script with mencoder s...Good to hear! I've posted a script with mencoder somewhere here, too, I think. It's much easier to handle, too. And you are sure the codec package was necessary? Can you post me the output of mencoder?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-8705413538714758882009-01-20T05:01:00.000+00:002009-01-20T05:01:00.000+00:00Ok, my search is over..Codecs fromhttp://www.mplay...Ok, my search is over..<BR/><BR/>Codecs from<BR/>http://www.mplayerhq.hu/design7/dload.html<BR/><BR/>Then<BR/><BR/>svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer<BR/>./configure<BR/>make<BR/>make install<BR/><BR/>Then<BR/><BR/>mencoder 00001.MTS -o 1.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000 -fps 50 -vf scale=1280:720<BR/><BR/>I'm finally able to view my films!Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-3557571086585632842009-01-13T20:31:00.000+00:002009-01-13T20:31:00.000+00:00heres how you can upload a sample and file a bug w...heres how you can upload a sample and file a bug with ffmpeg: <BR/><BR/>-> http://ffmpeg.mplayerhq.hu/bugreports.html <-Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-27430253565185404532009-01-13T19:20:00.000+00:002009-01-13T19:20:00.000+00:00Hmm, where is the link for posting bug/file? I'll ...Hmm, where is the link for posting bug/file? I'll post right away when I see it! (The link might be so close I can't see it... Hah)Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-31045114492013170642009-01-13T16:50:00.000+00:002009-01-13T16:50:00.000+00:00You're welcome!I've asked the ffmpeg developers an...You're welcome!<BR/><BR/>I've asked the ffmpeg developers and they said it'd be nice if you could post a bug and upload a sample. The link above explains how to do that.<BR/><BR/>You may also want to try different videos and see if the results are the same.<BR/><BR/>Unfortunately the Avchd support is not very far yet...<BR/><BR/>Good Luck!<BR/>Any Questions, let me know.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-87553165542329180652009-01-13T14:53:00.000+00:002009-01-13T14:53:00.000+00:00I was not able to sync the video with your tips, t...I was not able to sync the video with your tips, thanks however. I was wondering why the resolution is 1280x540? I tried it with 1280x720. MPLayer gives this output:<BR/>VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)<BR/>VDec: using Planar YV12 as output csp (no 0)<BR/>Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.<BR/>VO: [xv] 1280x720 => 1280x720 Planar YV12 <BR/>A: 90.5 V: 90.9 A-V: -0.460 ct: 0.362 2274/2274 36% 2% 1.7% 5 0 <BR/>GNOME screensaver enabled<BR/><BR/>Whats that 90.5 and 90.9? Related to sync somehow?<BR/><BR/>Hmm, I guess it's not normal for videos to be out of sync in original form?<BR/><BR/>Well, any tips and help still appreciated..Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-73338567282145482952009-01-13T13:33:00.000+00:002009-01-13T13:33:00.000+00:00You could try different switches with ffplay: -syn...You could try different switches with ffplay: -sync (audio/video/ext) or -fast and/or -skipframe, -lowres, -threads 2Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-35918783020177257812009-01-13T13:30:00.000+00:002009-01-13T13:30:00.000+00:00If that doesn't help you may want to upload a samp...If that doesn't help you may want to upload a sample and file a bug with ffmpeg: http://ffmpeg.mplayerhq.hu/bugreports.htmlAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-23452164346150678302009-01-13T13:29:00.000+00:002009-01-13T13:29:00.000+00:00Try to look at what the top command says during ff...Try to look at what the top command says during ffplay. Maybe (one of) your CPUs is used near 100%? You could then try ffplay -threads 2Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-83944450472688464282009-01-13T13:10:00.000+00:002009-01-13T13:10:00.000+00:00ffplay plays it also out of A/V sync!!! I mean the...ffplay plays it also out of A/V sync!!! I mean the original .MTS-file. So... Hmm, what's this all about?Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-7725868507015287262009-01-13T10:35:00.000+00:002009-01-13T10:35:00.000+00:00I've updated the installation instructions. Make s...I've updated the installation instructions. Make sure you configure ffmpeg the right way. THat might make a difference.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-84163046861432652362009-01-13T10:23:00.000+00:002009-01-13T10:23:00.000+00:00btw. Does the video play fine with ffplay? (ffmpeg...btw. Does the video play fine with ffplay? (ffmpeg/ffplay X.m2ts)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-16298465788056793062009-01-13T10:19:00.000+00:002009-01-13T10:19:00.000+00:00You could try removing the "-r 50". That would use...You could try removing the "-r 50". That would use ffmpeg's automatic framerate detection.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-41797551888729067192009-01-13T04:01:00.000+00:002009-01-13T04:01:00.000+00:00I really appreciate your help, this is the only to...I really appreciate your help, this is the only tool (so far) that I can use in my laptop. Other tools (Handbrage, that one .fifo-script) are melting my CPU or taking literally forever to convert my videos.Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-8738022205878185262009-01-12T21:46:00.000+00:002009-01-12T21:46:00.000+00:00I will have to retest and maybe modify the script....I will have to retest and maybe modify the script. I will post the results here when I'm finished.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-87774504388549688502009-01-12T16:08:00.000+00:002009-01-12T16:08:00.000+00:00Good. That's more than before. You can try to ...Good. That's more than before. You can try to add another -r 50 before the "$OUT".<BR/>You can try to start mplayer with -fps 50.<BR/><BR/>btw. If you copy this section:<BR/>Input #0, mpegts, from 'Desktop/Kuvia/00001.MTS':<BR/>Duration: 00:00:45.60, start: 0.374111, bitrate: 16496 kb/s<BR/>Program 1 <BR/>Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25.00 tb(r)<BR/>Stream #0.1[0x1100]: Audio: 0x0000, 48000 Hz, 5.1, s16, 384 kb/s<BR/>Output #0, matroska, to 'Desktop/Kuvia/00001.MTS.mkv':<BR/>Stream #0.0: Video: mpeg4, yuv420p, 1280x540 [PAR 3:4 DAR 16:9], q=2-31, 3000 kb/s, 25.00 tb(c)<BR/>Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s<BR/>Stream mapping:<BR/>Stream #0.0 -> #0.0<BR/>Stream #0.1 -> #0.1<BR/>Press [q] to stop encoding<BR/><BR/>that should be enough. Do you have IRC? I'll be in #linux-tipps on freenode.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-86325225858139450282009-01-12T15:01:00.000+00:002009-01-12T15:01:00.000+00:00Ok, some progress:I checked the latest svn.The scr...Ok, some progress:<BR/><BR/>I checked the latest svn.<BR/><BR/>The script (last line, everything else is unchanged) line looks like this:<BR/>nice $FFM -r 50 -i "$1" -s 1280x540 -vcodec mpeg4 -acodec copy -aspect 16:9 -b ${BR}k "$OUT"<BR/><BR/>Then:<BR/><BR/>Desktop/Kuvia/00001.MTS<BR/>FFmpeg version SVN-r16564, Copyright (c) 2000-2009 Fabrice Bellard, et al.<BR/> configuration: <BR/> libavutil 49.12. 0 / 49.12. 0<BR/> libavcodec 52.10. 0 / 52.10. 0<BR/> libavformat 52.23. 1 / 52.23. 1<BR/> libavdevice 52. 1. 0 / 52. 1. 0<BR/> built on Jan 12 2009 16:42:41, gcc: 4.3.2<BR/>Input #0, mpegts, from 'Desktop/Kuvia/00001.MTS':<BR/> Duration: 00:00:45.60, start: 0.374111, bitrate: 16496 kb/s<BR/> Program 1 <BR/> Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25.00 tb(r)<BR/> Stream #0.1[0x1100]: Audio: 0x0000, 48000 Hz, 5.1, s16, 384 kb/s<BR/>Output #0, matroska, to 'Desktop/Kuvia/00001.MTS.mkv':<BR/> Stream #0.0: Video: mpeg4, yuv420p, 1280x540 [PAR 3:4 DAR 16:9], q=2-31, 3000 kb/s, 25.00 tb(c)<BR/> Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s<BR/>Stream mapping:<BR/> Stream #0.0 -> #0.0<BR/> Stream #0.1 -> #0.1<BR/>Press [q] to stop encoding<BR/>[h264 @ 0x182ca70]B picture before any references, skipping<BR/>[h264 @ 0x182ca70]decode_slice_header error<BR/>[h264 @ 0x182ca70]no frame!<BR/>Error while decoding stream #0.0<BR/>[h264 @ 0x182ca70]B picture before any references, skipping<BR/>[h264 @ 0x182ca70]decode_slice_header error<BR/>[h264 @ 0x182ca70]no frame!<BR/>Error while decoding stream #0.0<BR/>frame= 2275 fps= 6 q=4.2 Lsize= 35731kB time=90.99 bitrate=3216.9kbits/s <BR/>video:33562kB audio:2139kB global headers:0kB muxing overhead 0.084548%<BR/><BR/>I got a matroska-video, that is about 50% of the original size. Ok. But... Audio is ok, but video is sorta slowmotion. MPlayer is giving some error, I don't remember what it was. VLC (nightly build) plays it without error, but video is slowmotion.<BR/><BR/>Aaargh! What now? I feel I'm close to something, but something is wrong...Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-70244433107641306772009-01-12T14:20:00.000+00:002009-01-12T14:20:00.000+00:00Okay. You can1. Try completely without -ilme. That...Okay. You can<BR/>1. Try completely without -ilme. That really should work. But if the source is interlaced, the quality per bitrate will suffer.<BR/><BR/>2. Try to svn update, recompile and try again with the script from above. There might be a problem in the version you've checked out.<BR/><BR/>Let me know how it goes. I'm sure we'll figure it out. If the things above don't work we should probably meet in IRC sometime to make this quicker.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-32711149961854631542009-01-12T12:20:00.000+00:002009-01-12T12:20:00.000+00:00FFmpeg version SVN-r16447, Copyright (c) 2000-2009...FFmpeg version SVN-r16447, Copyright (c) 2000-2009 Fabrice Bellard, et al.<BR/> configuration: <BR/> libavutil 49.12. 0 / 49.12. 0<BR/> libavcodec 52.10. 0 / 52.10. 0<BR/> libavformat 52.23. 1 / 52.23. 1<BR/> libavdevice 52. 1. 0 / 52. 1. 0<BR/> built on Jan 6 2009 09:36:42, gcc: 4.3.2<BR/>Input #0, mpegts, from 'Desktop/Kuvia/00001.MTS':<BR/> Duration: 00:00:45.60, start: 0.374111, bitrate: 16496 kb/s<BR/> Program 1 <BR/> Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25.00 tb(r)<BR/> Stream #0.1[0x1100]: Audio: 0x0000, 48000 Hz, 5.1, s16, 384 kb/s<BR/>Invalid value '-vcodec' for option 'ilme'<BR/><BR/>Hmm, what I'm doing wrong?Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-78384113413338684772009-01-12T11:36:00.000+00:002009-01-12T11:36:00.000+00:00You may try to add a "-vcodec" in front of mpeg4:(...You may try to add a "-vcodec" in front of mpeg4:<BR/>(...) -ilme -vcodec mpeg4 (...)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2124831850793435411.post-59029353475409107162009-01-08T18:09:00.000+00:002009-01-08T18:09:00.000+00:00I made a correction to the path, it's now ffmpeg/f...I made a correction to the path, it's now ffmpeg/ffmpeg instead of just ffmpeg. Now, this is what I get:<BR/><BR/> script Desktop/Kuvia/00001.MTS<BR/>Desktop/Kuvia/00001.MTS<BR/>FFmpeg version SVN-r16447, Copyright (c) 2000-2009 Fabrice Bellard, et al.<BR/> configuration: <BR/> libavutil 49.12. 0 / 49.12. 0<BR/> libavcodec 52.10. 0 / 52.10. 0<BR/> libavformat 52.23. 1 / 52.23. 1<BR/> libavdevice 52. 1. 0 / 52. 1. 0<BR/> built on Jan 6 2009 09:36:42, gcc: 4.3.2<BR/>Input #0, mpegts, from 'Desktop/Kuvia/00001.MTS':<BR/> Duration: 00:00:45.60, start: 0.374111, bitrate: 16496 kb/s<BR/> Program 1 <BR/> Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25.00 tb(r)<BR/> Stream #0.1[0x1100]: Audio: 0x0000, 48000 Hz, 5.1, s16, 384 kb/s<BR/>Invalid value 'mpeg4' for option 'ilme'Urkkihttps://www.blogger.com/profile/00513701613480767200noreply@blogger.com