Re: [CinCV] Crash when rendering AC3
Paul Taggart writes: > Let's try again and see if the formatting works better. > diff -ur cinelerra-cv_orig/cinelerra/fileac3.C > cinelerra-cv_fixed/cinelerra/fileac3.C > --- cinelerra-cv_orig/cinelerra/fileac3.C 2011-09-06 12:00:27.0 > -0400 > +++ cinelerra-cv_fixed/cinelerra/fileac3.C 2011-09-05 15:10:15.0 > -0400 Thanks for this patch! One typo, though: > + if(asset->channels = 6) > + codec_context->channel_layout = AV_CH_LAYOUT_5POINT1; this should of course be: if(asset->channels == 6) Julian ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Crash when rendering AC3
On Tue, 2011-09-06 at 19:52 -0400, Paul Taggart wrote: > It has been a long time since March (I just joined this group today) > but the cause of your problem is due to an upgrade in ffmpeg. The > current versions of ffmpeg have two ac3 codecs (ac3 & ac3_fixed). > Cinelerra uses the ac3 codec without defining a sample format. The ac3 > codec only supports floating-point samples while your audio samples > are most likely 16bit fixed point. The following patch should fix this > problem: > Let's try again and see if the formatting works better. diff -ur cinelerra-cv_orig/cinelerra/fileac3.C cinelerra-cv_fixed/cinelerra/fileac3.C --- cinelerra-cv_orig/cinelerra/fileac3.C 2011-09-06 12:00:27.0 -0400 +++ cinelerra-cv_fixed/cinelerra/fileac3.C 2011-09-05 15:10:15.0 -0400 @@ -86,7 +86,8 @@ { avcodec_init(); avcodec_register_all(); - codec = avcodec_find_encoder(CODEC_ID_AC3); +// codec = avcodec_find_encoder(CODEC_ID_AC3); + codec = avcodec_find_encoder_by_name( "ac3_fixed" ); if(!codec) { eprintf("codec not found.\n"); @@ -96,9 +97,14 @@ codec_context->bit_rate = asset->ac3_bitrate * 1000; codec_context->sample_rate = asset->sample_rate; codec_context->channels = asset->channels; + codec_context->sample_fmt = AV_SAMPLE_FMT_S16; + if(asset->channels = 6) + codec_context->channel_layout = AV_CH_LAYOUT_5POINT1; +//printf("FileAC3::open_file 1 Rate=%d Sample=%d Channels=%d Codec=0x%x \n", codec_context->bit_rate, codec_context->sample_rate, codec_c ontext->channels, codec); if(avcodec_open(codec_context, codec)) { eprintf("failed to open codec.\n"); +//printf("FileAC3::open_file 2 failed to open codec.\n"); return 1; } ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Crash when rendering AC3
It has been a long time since March (I just joined this group today) but the cause of your problem is due to an upgrade in ffmpeg. The current versions of ffmpeg have two ac3 codecs (ac3 & ac3_fixed). Cinelerra uses the ac3 codec without defining a sample format. The ac3 codec only supports floating-point samples while your audio samples are most likely 16bit fixed point. The following patch should fix this problem: diff -ur cinelerra-cv_orig/cinelerra/fileac3.C cinelerra-cv_fixed/cinelerra/fileac3.C --- cinelerra-cv_orig/cinelerra/fileac3.C 2011-09-06 12:00:27.0 -0400 +++ cinelerra-cv_fixed/cinelerra/fileac3.C 2011-09-05 15:10:15.0 -0400 @@ -86,7 +86,8 @@ { avcodec_init(); avcodec_register_all(); - codec = avcodec_find_encoder(CODEC_ID_AC3); +// codec = avcodec_find_encoder(CODEC_ID_AC3); + codec = avcodec_find_encoder_by_name( "ac3_fixed" ); if(!codec) { eprintf("codec not found.\n"); @@ -96,9 +97,14 @@ codec_context->bit_rate = asset->ac3_bitrate * 1000; codec_context->sample_rate = asset->sample_rate; codec_context->channels = asset->channels; + codec_context->sample_fmt = AV_SAMPLE_FMT_S16; + if(asset->channels = 6) + codec_context->channel_layout = AV_CH_LAYOUT_5POINT1; +//printf("FileAC3::open_file 1 Rate=%d Sample=%d Channels=%d Codec=0x%x \n", codec_context->bit_rate, codec_context->sample_rate, codec_c ontext->channels, codec); if(avcodec_open(codec_context, codec)) { eprintf("failed to open codec.\n"); +//printf("FileAC3::open_file 2 failed to open codec.\n"); return 1; }
Re: [CinCV] Crash when rendering AC3
Eli, Thanks for the suggestion. I've found that the method I've been using has worked well the last couple years. I have noticed that I can render audio to mp3 file and then merge it with video in ffmpeg. That method will work for what I'm currently doing ( some home movies of the grandkids to post on facebook). Fortunately the script I wrote to merge multiple files a few years ago allows for either ac3 or mp3 audio formats. I think it put the mp3 option in the last time the ac3 problem showed up. I have had other issues in the past with Cinelerra crashing during render operations, and have found some work arounds to get the desired results. As you say, it's sometimes the simplest way to get the job done. Thanks for your input, Ron On Sunday 06 March 2011 19:12:55 Eli Billauer wrote: > Hi, > > > If I were you, I would render the video using PCM coding for audio, and > then use mencoder with -ovc copy to re-encode the audio to AC3. The > video data will remain intact this way, and the audio meet the required > format. This is not an ideal, but this step has to be taken only once -- > on the release version. All trial renders will play on your local video > player exactly the same. > > > Not really a solution, but in the world of video editing, a fairly > cumbersome workaround is sometimes the simplest way to get back to work. > > > Good luck, > > Eli > ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Crash when rendering AC3
Hi, If I were you, I would render the video using PCM coding for audio, and then use mencoder with -ovc copy to re-encode the audio to AC3. The video data will remain intact this way, and the audio meet the required format. This is not an ideal, but this step has to be taken only once -- on the release version. All trial renders will play on your local video player exactly the same. Not really a solution, but in the world of video editing, a fairly cumbersome workaround is sometimes the simplest way to get back to work. Good luck, Eli Ron Sparks wrote: I was hoping someone had a simple fix for this. I was thinking it might be some kind of version conflicts. -- Web: http://www.billauer.co.il ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Crash when rendering AC3
Hi E, Yes, I'm looking forward to the 11.4 release. I've had poor luck with the odd numbered versions of openSUSE ( 10.1, 10.3 and 11.1) so have held on to the 11.2 for quite a while. I have been able to use Cinelerra under 11.2 with very few issues. Until this update, I was able to render ac3 audio without any issues. If I remember correctly, the version before this was released on Packman back in August. I was hoping someone had a simple fix for this. I was thinking it might be some kind of version conflicts. Thanks Ron On Sunday 06 March 2011 17:27:38 E Chalaron wrote: > Hi Ron, > > Using both 11.2 and 11.3 I do recommend that you shift at least to 11.3 > or wait a bit until it becomes available on 11.4 which is due shortly. > I have too many issues on 11.2 as well. It will be upgraded to 11.4 asap. > Cheers > E > ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Crash when rendering AC3
Hi Ron, Using both 11.2 and 11.3 I do recommend that you shift at least to 11.3 or wait a bit until it becomes available on 11.4 which is due shortly. I have too many issues on 11.2 as well. It will be upgraded to 11.4 asap. Cheers E > I updated my installation today and now Cinelerra crashes when I try to > render ac3. > > I recall seeing this problem before but can't remember what the solution was. > I recall it was an > issue with ffmpeg, but I'm not sure. > > Some information - > > My system is openSuse 11.2 > > ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
[CinCV] Crash when rendering AC3
Good day! I updated my installation today and now Cinelerra crashes when I try to render ac3. I recall seeing this problem before but can't remember what the solution was. I recall it was an issue with ffmpeg, but I'm not sure. Some information - My system is openSuse 11.2 The rpm came from the Packman repository The version is cinelerra-2.1.5cv20110222-1.pm.18.12.x86_64 ffmpeg was also updated. The version is ffmpeg-0.6.201102261447git-1.pm.2.2.x86_64 The output from the command line start of cinelerra: Cinelerra 2.1.5CV Packman build (C) 2010 Heroine Virtual Ltd. External ffmpeg Compiled on Sun Mar 6 15:59:46 UTC 2011 Cinelerra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for Cinelerra. BRenderThread::start 1 map=11842695 equivalent=0 brender_start=0 result=0 end=0 RenderFarmClient::main_loop: client started RenderFarmClientThread::run: Session finished. BRenderThread::start 1 map=0 equivalent=0 brender_start=0 result=0 end=26477 Render::run 1 Render::run 2 Render::run 3 Render::run 4 Render::run 5 Render::run 6 Render::run 7 Render::run 8 Render::run 8.1 Render::run 8.2 Render::run 8.3 Render::run 9 Render::run 10 RenderFarmClientThread::run: Session finished. ac3 @ [0x7f3297d59580] Specified sample_fmt is not supported. signal_entry: got SIGSEGV my pid=18775 execution table size=16: filempeg.C: read_frame: 1187 filempeg.C: read_frame: 1216 filempeg.C: read_frame: 1181 filempeg.C: read_frame: 1187 filempeg.C: read_frame: 1216 filempeg.C: read_frame: 1181 filempeg.C: read_frame: 1187 filempeg.C: read_frame: 1216 filempeg.C: read_frame: 1181 filempeg.C: read_frame: 1187 filempeg.C: read_frame: 1216 BRenderThread::send_command 1 BRenderThread::send_command 10 BRenderThread::send_command 20 filempeg.C: open_file: 185 filempeg.C: open_file: 516